
/* Lector de Accesibilidad — estilos.
   Todo cuelga de #lacc-widget para ganar especificidad frente al tema activo. */

:root {
	--lacc-color: #1a56db;
	--lacc-ink: #16181d;
	--lacc-muted: #4b5262;
	--lacc-line: #d6dae3;
	--lacc-bg: #ffffff;
	--lacc-focus: #ffbf47;
}

#lacc-widget {
	position: fixed;
	right: 45px;
	bottom: 120px;
	left: auto;
	top: auto;
	z-index: 2147483000;
	margin: 0;
	padding: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.4;
	color: var(--lacc-ink);
	text-align: left;
}


@media screen and (max-width: 900px) {
	body.admin-bar #lacc-widget {
		top: auto;
		bottom: 100px;
        right: 32px;

	}
}

#lacc-widget *,
#lacc-widget *::before,
#lacc-widget *::after {
	box-sizing: border-box;
}

/* ---------- Botón (icono) ---------- */

#lacc-widget .lacc-toggle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: 0;
	padding: 0;
	border: 3px solid #fff;
	border-radius: 50%;
	background: var(--lacc-color);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
	transition: transform .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

#lacc-widget .lacc-toggle:hover {
	transform: scale(1.06);
}

#lacc-widget .lacc-toggle svg {
	display: block;
	width: 28px;
	height: 28px;
	pointer-events: none;
}

/* Punto verde: indica que el lector está activo */

#lacc-widget .lacc-dot {
	display: none;
	position: absolute;
	right: -3px;
	bottom: -3px;
	width: 16px;
	height: 16px;
	border: 3px solid #fff;
	border-radius: 50%;
	background: #1f9d55;
}

#lacc-widget.is-reading .lacc-dot {
	display: block;
}

/* ---------- Panel desplegable ---------- */

#lacc-widget .lacc-panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + 10px);
	top: auto;
	left: auto;
	width: 300px;
	max-width: calc(100vw - 32px);
	padding: 18px;
	border: 1px solid var(--lacc-line);
	border-radius: 14px;
	background: var(--lacc-bg);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
	transform-origin: bottom right;
	animation: lacc-open .16s ease-out;
}

#lacc-widget .lacc-panel[hidden] {
	display: none;
}

@keyframes lacc-open {
	from {
		opacity: 0;
		transform: translateY(6px) scale(.97);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

#lacc-widget .lacc-title {
	margin: 0 0 14px;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--lacc-ink);
}

/* ---------- Interruptor ---------- */

#lacc-widget .lacc-switch {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 2px solid var(--lacc-line);
	border-radius: 10px;
	background: #f6f7fa;
	color: var(--lacc-ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

#lacc-widget .lacc-switch[aria-checked="true"] {
	border-color: var(--lacc-color);
	background: #eef3ff;
}

#lacc-widget .lacc-switch-text {
	display: flex;
	flex-direction: column;
}

#lacc-widget .lacc-switch-name {
	font-weight: 600;
}

#lacc-widget .lacc-switch-state {
	font-size: 14px;
	color: var(--lacc-muted);
}

#lacc-widget .lacc-track {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
	border-radius: 13px;
	background: #6b7280;
	transition: background .15s ease;
}

#lacc-widget .lacc-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s ease;
}

#lacc-widget .lacc-switch[aria-checked="true"] .lacc-track {
	background: var(--lacc-color);
}

#lacc-widget .lacc-switch[aria-checked="true"] .lacc-thumb {
	transform: translateX(20px);
}

/* ---------- Deslizadores ---------- */

#lacc-widget .lacc-field {
	margin: 0 0 14px;
}

#lacc-widget .lacc-field label {
	display: flex;
	justify-content: space-between;
	margin: 0 0 6px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--lacc-ink);
}

#lacc-widget .lacc-field output {
	font-weight: 400;
	color: var(--lacc-muted);
}

#lacc-widget .lacc-field input[type="range"] {
	display: block;
	width: 100%;
	height: 24px;
	margin: 0;
	padding: 0;
	accent-color: var(--lacc-color);
	cursor: pointer;
}

/* ---------- Botón secundario y ayuda ---------- */

#lacc-widget .lacc-btn {
	display: block;
	width: 100%;
	margin: 4px 0 0;
	padding: 10px 14px;
	border: 2px solid var(--lacc-ink);
	border-radius: 10px;
	background: transparent;
	color: var(--lacc-ink);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

#lacc-widget .lacc-btn:hover {
	background: var(--lacc-ink);
	color: #fff;
}

#lacc-widget .lacc-hint {
	margin: 12px 0 0;
	padding: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--lacc-muted);
}

/* ---------- Foco visible ---------- */

#lacc-widget button:focus-visible,
#lacc-widget input:focus-visible {
	outline: 3px solid var(--lacc-focus);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--lacc-ink);
}

/* ---------- Elemento que se está leyendo en la página ---------- */

.lacc-reading {
	outline: 3px solid var(--lacc-color) !important;
	outline-offset: 3px !important;
}

.lacc-reading:not(img):not(svg) {
	background-color: rgba(255, 224, 102, .45) !important;
}

/* ---------- Reducir animaciones ---------- */

@media (prefers-reduced-motion: reduce) {
	#lacc-widget .lacc-panel {
		animation: none;
	}

	#lacc-widget .lacc-toggle,
	#lacc-widget .lacc-track,
	#lacc-widget .lacc-thumb {
		transition: none;
	}
}

/* ---------- Móvil ---------- */

@media screen and (max-width: 480px) {
	#lacc-widget {
		right: 12px;
		bottom: 12px;
	}

	#lacc-widget .lacc-panel {
		width: 300px;
		max-width: calc(100vw - 24px);
	}
}
