/**
 * accessibility.css - Panel de accesibilidad del sitio (tema hijo).
 *
 * Creado el 2026-11-10. Todo vive bajo #lg-a11y (el panel) o bajo las clases
 * html.lga-* (los ajustes que el visitante activa). Si el visitante no activa
 * nada, este archivo no cambia nada del sitio salvo dibujar el boton.
 */

/* ==========================================================================
   Boton y panel
   ========================================================================== */

#lg-a11y {
	--lga-blue: var(--e-global-color-secondary, #0076E3);
	--lga-blue-dark: #005CB1;
	--lga-ink: var(--e-global-color-primary, #1E222B);
	--lga-muted: #5F7696;
	--lga-line: #E1E7EF;
	--lga-soft: #F3F7FC;
	--lga-active: #E8F2FF;
	--lga-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

	font-family: "Assistant", "Segoe UI", Arial, sans-serif;
	color: var(--lga-ink);
	line-height: 1.3;
	letter-spacing: normal;
	word-spacing: normal;
}

#lg-a11y *,
#lg-a11y *::before,
#lg-a11y *::after {
	box-sizing: border-box;
}

#lg-a11y [hidden] {
	display: none !important;
}

/* Los estilos globales de botones del sitio (nowrap, mayusculas, sombras,
   fondo al pasar el mouse) no deben llegar al panel. */
#lg-a11y button {
	white-space: normal;
	text-transform: none;
	letter-spacing: normal;
	text-decoration: none;
	box-shadow: none;
	min-width: 0;
}

/* Pestana pegada al borde izquierdo. */
#lg-a11y .lga-trigger {
	position: fixed;
	left: 0;
	top: 62%;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0 14px 14px 0;
	background: var(--lga-blue);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 18px -6px rgba(0, 59, 117, 0.55);
	transform: translateY(-50%);
	transition: width 0.25s var(--lga-ease), background-color 0.25s ease;
}

#lg-a11y .lga-trigger:hover {
	width: 52px;
	background: var(--lga-blue-dark);
}

#lg-a11y .lga-trigger svg {
	width: 26px;
	height: 26px;
	display: block;
}

#lg-a11y .lga-trigger[aria-expanded="true"] {
	background: var(--lga-ink);
}

/* Punto que avisa que hay ajustes activos. */
#lg-a11y .lga-trigger .lga-dot {
	position: absolute;
	top: 7px;
	right: 7px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #E2FF65;
	box-shadow: 0 0 0 2px var(--lga-blue);
}

#lg-a11y .lga-trigger[aria-expanded="true"] .lga-dot {
	box-shadow: 0 0 0 2px var(--lga-ink);
}

/* Panel compacto que sale al lado del boton. */
#lg-a11y .lga-panel {
	position: fixed;
	left: 58px;
	top: 62%;
	z-index: 100000; /* encima del boton de WhatsApp (99999) mientras esta abierto */
	width: 316px;
	max-width: calc(100vw - 70px);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 14px;
	border: 1px solid var(--lga-line);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 48px -20px rgba(30, 34, 43, 0.35), 0 2px 6px rgba(30, 34, 43, 0.06);
	opacity: 0;
	visibility: hidden;
	transform: translate(-8px, -50%);
	transition: opacity 0.22s ease, transform 0.28s var(--lga-ease), visibility 0s linear 0.28s;
}

#lg-a11y.is-open .lga-panel {
	opacity: 1;
	visibility: visible;
	transform: translate(0, -50%);
	transition: opacity 0.22s ease, transform 0.28s var(--lga-ease), visibility 0s;
}

#lg-a11y .lga-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 12px;
}

#lg-a11y .lga-title {
	margin: 0;
	font-family: "Poppins", "Segoe UI", Arial, sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--lga-ink);
}

#lg-a11y .lga-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--lga-soft);
	color: var(--lga-ink);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

#lg-a11y .lga-close:hover {
	background: var(--lga-line);
}

#lg-a11y .lga-close svg {
	width: 14px;
	height: 14px;
}

/* Tamano del texto: una fila con selector -/+. */
#lg-a11y .lga-size {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 10px;
	padding: 8px 8px 8px 12px;
	border-radius: 12px;
	background: var(--lga-soft);
}

#lg-a11y .lga-size-label {
	font-size: 14px;
	font-weight: 600;
}

#lg-a11y .lga-stepper {
	display: flex;
	align-items: center;
	gap: 4px;
}

#lg-a11y .lga-step {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--lga-line);
	border-radius: 9px;
	background: #fff;
	color: var(--lga-ink);
	font-family: "Poppins", "Segoe UI", Arial, sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

#lg-a11y .lga-step:hover:not(:disabled) {
	border-color: var(--lga-blue);
	color: var(--lga-blue);
}

#lg-a11y .lga-step:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

#lg-a11y .lga-size-value {
	min-width: 46px;
	text-align: center;
	font-size: 14px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* Opciones: chips horizontales en dos columnas. */
#lg-a11y .lga-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#lg-a11y .lga-grid li {
	margin: 0;
	padding: 0;
}

/* Siete opciones: la ultima ocupa la fila completa. */
#lg-a11y .lga-grid li:last-child:nth-child(odd) {
	grid-column: 1 / -1;
}

#lg-a11y .lga-option {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid var(--lga-line);
	border-radius: 12px;
	background: #fff;
	color: var(--lga-ink);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

#lg-a11y .lga-option:hover {
	border-color: #B9C9DD;
	background: #fff;
	color: var(--lga-ink);
}

#lg-a11y .lga-option[aria-pressed="true"]:hover {
	background: var(--lga-active);
	color: var(--lga-blue-dark);
}

#lg-a11y .lga-option svg {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	color: var(--lga-muted);
	transition: color 0.2s ease;
}

#lg-a11y .lga-option[aria-pressed="true"] {
	border-color: var(--lga-blue);
	background: var(--lga-active);
	color: var(--lga-blue-dark);
}

#lg-a11y .lga-option[aria-pressed="true"] svg {
	color: var(--lga-blue);
}

#lg-a11y .lga-foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin: 12px 0 0;
	padding: 10px 2px 0;
	border-top: 1px solid var(--lga-line);
}

#lg-a11y .lga-note {
	font-size: 12px;
	color: var(--lga-muted);
}

#lg-a11y .lga-reset {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px 8px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--lga-blue);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

#lg-a11y .lga-reset:hover {
	background: var(--lga-soft);
}

#lg-a11y .lga-reset svg {
	width: 14px;
	height: 14px;
}

/* Foco visible y consistente en todo el panel. */
#lg-a11y button:focus {
	outline: none;
}

#lg-a11y button:focus-visible {
	outline: 3px solid var(--lga-blue);
	outline-offset: 2px;
}

#lg-a11y .lga-trigger:focus-visible {
	outline-color: #E2FF65;
}

/* Movil: boton mas pequeno y el panel sube desde abajo. */
@media (max-width: 767px) {
	#lg-a11y .lga-trigger {
		width: 40px;
		height: 40px;
		top: 58%;
	}

	#lg-a11y .lga-trigger:hover {
		width: 40px;
	}

	#lg-a11y .lga-trigger svg {
		width: 22px;
		height: 22px;
	}

	#lg-a11y .lga-panel {
		left: 10px;
		right: 10px;
		top: auto;
		bottom: 10px;
		width: auto;
		max-width: none;
		max-height: calc(100vh - 80px);
		transform: translateY(16px);
	}

	#lg-a11y.is-open .lga-panel {
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	#lg-a11y .lga-trigger,
	#lg-a11y .lga-panel,
	#lg-a11y.is-open .lga-panel {
		transition: none;
	}
}

@media print {
	#lg-a11y {
		display: none !important;
	}
}

/* ==========================================================================
   Ajustes que el visitante activa (clases en <html>)
   ========================================================================== */

/* Alto contraste y escala de grises se combinan en un solo filtro. El filtro
   va en <html> porque ahi no rompe los elementos fijos (header, botones). */
html.lga-contrast {
	filter: contrast(1.35) saturate(1.1);
}

html.lga-grayscale {
	filter: grayscale(1);
}

html.lga-contrast.lga-grayscale {
	filter: grayscale(1) contrast(1.35);
}

/* Resaltar enlaces. */
html.lga-links a:not(#lg-a11y a) {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: 3px !important;
	outline: 2px solid #FFB020 !important;
	outline-offset: 2px !important;
}

/* Fuente legible: tipografias del sistema muy claras. Se excluyen los
   iconos para no romper las fuentes de iconos. */
html.lga-font body *:not(#lg-a11y, #lg-a11y *, i, svg, svg *, .elementor-icon, [class*="eicon"], [class*="fa-"], [class^="icon-"], [class*=" icon-"]) {
	font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important;
	letter-spacing: 0.01em !important;
}

/* Mas espacio entre lineas y letras. */
html.lga-spacing body :is(p, li, dd, dt, td, th, label, blockquote, figcaption, span, a, div):not(#lg-a11y, #lg-a11y *) {
	line-height: 1.8 !important;
	letter-spacing: 0.03em !important;
	word-spacing: 0.12em !important;
}

html.lga-spacing body :is(h1, h2, h3, h4, h5, h6):not(#lg-a11y *) {
	line-height: 1.45 !important;
	letter-spacing: 0.02em !important;
	word-spacing: 0.1em !important;
}

/* Detener animaciones: todo salta a su estado final. */
html.lga-motion *,
html.lga-motion *::before,
html.lga-motion *::after {
	animation-duration: 0s !important;
	animation-delay: 0s !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0s !important;
	transition-delay: 0s !important;
	scroll-behavior: auto !important;
}

html.lga-motion .elementor-invisible {
	visibility: visible !important;
	opacity: 1 !important;
}

/* Cursor grande. */
html.lga-cursor,
html.lga-cursor body,
html.lga-cursor body * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M6 3l28 15-12 3 7 14-6 3-7-14-10 8z' fill='%231E222B' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}

html.lga-cursor body :is(a, button, [role="button"], label, select, summary, .swiper-pagination-bullet, input[type="checkbox"], input[type="radio"]),
html.lga-cursor body :is(a, button, [role="button"]) * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M15 5a3 3 0 0 1 6 0v13l2-1a3 3 0 0 1 4 1l1 1a3 3 0 0 1 4 1l1 1a3 3 0 0 1 4 2v8c0 6-4 10-10 10h-4c-4 0-6-2-8-5l-7-10a3 3 0 0 1 4-4l3 3z' fill='%230076E3' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 17 4, pointer !important;
}
