/*
 * Usabilidad por miembro — estilos comunes de las webapps del portal (2026-12-03).
 * Clases que pone assets/templates/webapp/js/aw-usabilidad.js en <html> (aw-u-*) y en <body>
 * (aw-high-contrast, aw-reduce-motion, aw-readable, aw-focus-visible... — las de siempre).
 * Solo cubre lo que ningún panel cubría; contraste/compacto/texto de la homepage y del dashboard
 * siguen en sus hojas (style.css y modalAjustesUsabilidad.php).
 */

/* ---------- Sección "Asistencia y voz" dentro del panel existente ---------- */
.awu-seccion { display: grid; gap: 10px; margin: 6px 0 12px; grid-column: 1 / -1; }
.awu-seccion__titulo {
  margin: 8px 0 2px; font-size: .78rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #0a84ff;
}
.awu-fila {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; cursor: pointer;
  border-radius: 18px; border: 1px solid rgba(13, 68, 120, .12); background: rgba(255, 255, 255, .92);
}
.awu-fila:hover { border-color: rgba(10, 132, 255, .38); }
.awu-fila__icono { width: 28px; height: 28px; object-fit: contain; flex: 0 0 auto; }
.awu-fila__txt { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.awu-fila__txt strong { font-size: .92rem; color: #042f66; }
.awu-fila__txt small { font-size: .78rem; color: #6a7a8c; line-height: 1.35; }
.awu-switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; }
.awu-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.awu-switch__track {
  position: absolute; inset: 0; border-radius: 999px; background: #cfd9e6; transition: background .18s ease;
}
.awu-switch__track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(4, 47, 102, .25); transition: transform .18s ease;
}
.awu-switch input:checked + .awu-switch__track { background: #0a84ff; }
.awu-switch input:checked + .awu-switch__track::after { transform: translateX(20px); }
.awu-switch input:focus-visible + .awu-switch__track { outline: 3px solid rgba(10, 132, 255, .35); outline-offset: 2px; }
.awu-select {
  flex: 0 0 auto; min-height: 34px; padding: 4px 10px; border-radius: 12px;
  border: 1px solid rgba(13, 68, 120, .2); background: #fff; color: #042f66; font-weight: 700;
}
.awu-nota { margin: 2px 2px 0; font-size: .76rem; color: #6a7a8c; line-height: 1.4; }
html.aw-u-contraste .awu-fila { background: #fff; border-color: #042f66; }
html.aw-u-contraste .awu-fila__txt small { color: #102033; }

/* ---------- Lectura cómoda y foco visible (el dashboard ya trae los suyos) ---------- */
html:not(.bda-dashboard-js) body.aw-readable :is(p, li, dd, td, th, label, small, .aw-muted) {
  line-height: 1.7 !important; letter-spacing: .012em; word-spacing: .06em;
}
html:not(.bda-dashboard-js) body.aw-readable :is(p, li) { max-width: 75ch; }
body.aw-focus-visible :is(a, button, input, select, textarea, [tabindex]):focus,
body.aw-focus-visible :focus-visible {
  outline: 3px solid #0a84ff !important; outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(10, 132, 255, .18) !important;
}

/* ---------- Movimiento reducido activado por el miembro ---------- */
html.aw-u-movimiento { scroll-behavior: auto !important; }
html.aw-u-movimiento *, html.aw-u-movimiento *::before, html.aw-u-movimiento *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important;
  animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important;
  scroll-behavior: auto !important;
}
/* Escena de reparto: misma escena estática que con prefers-reduced-motion (style_reparto_animado.css) */
html.aw-u-movimiento .aw-reparto .aw-reparto__vehiculo {
  animation: none !important; transform: translateX(calc(var(--aw-pos, 20) * 1cqw)) !important;
}
html.aw-u-movimiento .aw-reparto :is(.aw-reparto__cuerpo, .aw-reparto__cuerpo img, .aw-reparto__estela, .aw-reparto__humo, .aw-reparto__ciudad),
html.aw-u-movimiento .aw-reparto .aw-reparto__asfalto::after,
html.aw-u-movimiento .aw-reparto__escena::before,
html.aw-u-movimiento :is(.aw-reparto__leyenda img, .aw-veh-option__card img) {
  animation: none !important;
}
html.aw-u-movimiento .aw-reparto .aw-reparto__cuerpo .aw-f1 { opacity: 1 !important; }
html.aw-u-movimiento .aw-reparto .aw-reparto__pausa { display: none; }

/* ---------- Páginas sin panel propio (kioskos): tamaño, contraste, enlaces, compacto ---------- */
html.aw-u-generico { font-size: calc(100% * var(--aw-u-escala, 1)); }
html.aw-u-generico.aw-u-contraste body { background-color: #fff; color: #000; }
html.aw-u-generico.aw-u-contraste body :is(p, li, span, small, label, td, th, h1, h2, h3, h4, h5, h6) { color: #000 !important; text-shadow: none !important; }
html.aw-u-generico.aw-u-contraste body :is(button, .btn, a.btn) { border: 2px solid #000 !important; }
html.aw-u-generico.aw-u-enlaces a { text-decoration: underline !important; text-underline-offset: 3px; }
html.aw-u-generico.aw-u-compacto body :is(section, .card, .container) { padding-top: .5rem; padding-bottom: .5rem; }

/* ---------- Asistencia de Aquabot apagada: sin burbujas automáticas ---------- */
html.aw-u-sin-aquabot :is(.aw-aquabot-tip, .aquabot-tip, [data-aquabot-auto]) { display: none !important; }
