/* Aksesibilitas widget */
.a11y-toggle-btn {
	position: fixed;
	top: 50%;
	left: 0;
	transform: translateY(-50%);
	width: 56px;
	height: 56px;
	border-radius: 0 50% 50% 0;
	background: #0cc485;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	z-index: 99990;
	border: none;
	transition: width 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.a11y-toggle-btn:hover {
	width: 62px;
	background: #0aa873;
}

.a11y-toggle-btn .a11y-tooltip {
	position: absolute;
	left: 68px;
	top: 50%;
	transform: translateY(-50%);
	background: #1a1a1a;
	color: #fff;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 13px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.a11y-toggle-btn .a11y-tooltip::after {
	content: '';
	position: absolute;
	top: 50%;
	left: -6px;
	transform: translateY(-50%);
	border-width: 6px 6px 6px 0;
	border-style: solid;
	border-color: transparent #1a1a1a transparent transparent;
}

.a11y-toggle-btn:hover .a11y-tooltip {
	opacity: 1;
}

.a11y-panel.a11y-open ~ .a11y-toggle-btn {
	opacity: 0;
	pointer-events: none;
}

.a11y-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 99988;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.a11y-overlay.a11y-open {
	opacity: 1;
	pointer-events: auto;
}

.a11y-panel {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 320px;
	max-width: 88vw;
	background: #fff;
	box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
	z-index: 99989;
	transform: translateX(-100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	font-family: inherit;
}

.a11y-panel.a11y-open {
	transform: translateX(0);
}

.a11y-panel-header {
	background: #141d38;
	color: #fff;
	padding: 18px 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}

.a11y-panel-header .a11y-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
}

.a11y-panel-header h4 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #fff;
}

.a11y-panel-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 8px 0;
}

.a11y-option {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 20px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	color: #222;
	user-select: none;
}

.a11y-option:hover {
	background: #f5f7fa;
}

.a11y-option.a11y-active {
	background: #e6f9f2;
	color: #0aa873;
}

.a11y-option .a11y-icon {
	width: 22px;
	text-align: center;
	font-size: 17px;
	flex: 0 0 auto;
}

.a11y-option .a11y-label {
	font-size: 15px;
}

.a11y-option .a11y-value {
	margin-left: auto;
	font-size: 12px;
	color: #888;
}

.a11y-panel-footer {
	flex: 0 0 auto;
	padding: 12px 20px;
	border-top: 1px solid #eee;
}

.a11y-reset-btn {
	width: 100%;
	background: #141d38;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 10px;
	font-size: 14px;
	cursor: pointer;
}

.a11y-reset-btn:hover {
	background: #0d142a;
}

/* --- Efek yang diterapkan ke halaman --- */

body.a11y-bold-text,
body.a11y-bold-text * {
	font-weight: 700 !important;
}

body.a11y-highlight-links a {
	background: #ffe600 !important;
	color: #000 !important;
	outline: 2px solid #000 !important;
	text-decoration: underline !important;
}

body.a11y-cursor-white,
body.a11y-cursor-white * {
	cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M6 3 L6 34 L14 26 L19 36 L24 34 L19 24 L30 24 Z' fill='%23ffffff' stroke='%23000000' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 4 4, auto !important;
}

body.a11y-cursor-black,
body.a11y-cursor-black * {
	cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M6 3 L6 34 L14 26 L19 36 L24 34 L19 24 L30 24 Z' fill='%23000000' stroke='%23ffffff' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 4 4, auto !important;
}

body.a11y-zoom-area .a11y-zoom-target {
	transition: transform 0.15s ease;
	position: relative;
	z-index: 1;
}

body.a11y-zoom-area .a11y-zoom-target:hover {
	transform: scale(1.15);
	z-index: 99980;
	box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.15);
}

body.a11y-tts .a11y-tts-target {
	cursor: pointer;
}

body.a11y-tts .a11y-tts-target:hover {
	outline: 2px dashed #0cc485;
	outline-offset: 2px;
	background: rgba(12, 196, 133, 0.08);
}

body.a11y-tts .a11y-tts-speaking {
	outline: 2px solid #0cc485;
	outline-offset: 2px;
	background: rgba(12, 196, 133, 0.15);
}

.a11y-tts-indicator {
	position: fixed;
	left: 20px;
	bottom: 20px;
	background: #141d38;
	color: #fff;
	padding: 10px 16px;
	border-radius: 24px;
	font-size: 13px;
	display: none;
	align-items: center;
	gap: 10px;
	z-index: 99991;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.a11y-tts-indicator.a11y-show {
	display: flex;
}

.a11y-tts-indicator button {
	background: #fff;
	color: #141d38;
	border: none;
	border-radius: 16px;
	padding: 4px 12px;
	font-size: 12px;
	cursor: pointer;
}

@media (max-width: 576px) {
	.a11y-toggle-btn {
		width: 46px;
		height: 46px;
		font-size: 20px;
	}
}
