/* Accesibilidad multimodal (EP-ADM-15): clases que aplica dashboard/components/accessibility.py en <html>. */

/* Foco visible siempre al navegar con teclado */
:focus-visible {
  outline: 3px solid #f59e0b !important;
  outline-offset: 2px !important;
}

/* Saltar al contenido: visible solo al recibir el foco */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 2000;
  background: #1d4ed8;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
}
.skip-link:focus { left: 8px; }

/* Panel de opciones */
.a11y-toolbar {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1500;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  font-size: 14px;
  max-width: calc(100vw - 32px);
}
.a11y-toolbar > summary {
  cursor: pointer;
  padding: 8px 14px;
  font-weight: 600;
  list-style: none;
}
.a11y-panel { padding: 4px 14px 12px; min-width: 240px; }
.a11y-label { font-weight: 600; margin-top: 8px; }
.a11y-voice { margin: 4px 6px 4px 0; }

/* Tamaño del texto: también escala los tamaños fijos de las páginas */
html.a11y-font-125 { font-size: 125%; }
html.a11y-font-150 { font-size: 150%; }
html.a11y-font-125 #page-content { zoom: 1.2; }
html.a11y-font-150 #page-content { zoom: 1.4; }

/* Fuente legible (útil para dislexia y baja visión) */
html.a11y-readable body,
html.a11y-readable body * {
  font-family: "Atkinson Hyperlegible", Verdana, Tahoma, sans-serif !important;
  letter-spacing: .03em !important;
  word-spacing: .12em !important;
  line-height: 1.6 !important;
}

/* Reducir animaciones (también respeta la preferencia del sistema) */
html.a11y-motion *,
html.a11y-motion *::before,
html.a11y-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Alto contraste: fondo negro, texto blanco, enlaces amarillos (cubre estilos en línea) */
html.a11y-contrast body,
html.a11y-contrast body * {
  background-color: #000 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.a11y-contrast a,
html.a11y-contrast a * { color: #ffeb3b !important; text-decoration: underline !important; }
html.a11y-contrast button,
html.a11y-contrast .btn { border: 2px solid #fff !important; }
html.a11y-contrast input,
html.a11y-contrast textarea,
html.a11y-contrast select { border: 2px solid #ffeb3b !important; }
html.a11y-contrast img,
html.a11y-contrast video { filter: none !important; background-color: transparent !important; }
html.a11y-contrast :focus-visible { outline-color: #00e5ff !important; }

/* Selector de idioma (EP-ADM-17) */
.lang-switch {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 2px 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  font-size: 14px;
}
