/* Lo que CORRIGE cada barrera en «Teatro del Puerto Imaginario». Mismos colores, misma sala y mismo
   aspecto que la versión con barreras (asientos.css es común); cambia lo que hace usable la página.
   Se carga después de asientos.css y antes de /tests-wcag/lab.css. */

/* Foco siempre visible (2.4.7) y con contraste sobre fondo claro y sobre las butacas de colores. */
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, dialog:focus-visible {
    outline: 3px solid #0b3d91;
    outline-offset: 2px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* B9 (2.5.8): las butacas miden 30 x 30 px con 4 px de aire; el mínimo de WCAG 2.2 es 24 px. */
.butaca {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    margin: 0 4px 0 0;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 5px 5px 8px 8px;
    font: inherit; font-size: 0.8125rem; font-weight: 700; line-height: 1;
    cursor: pointer;
    flex: none;
}
.butaca.pasillo { margin-right: 16px; }
.butaca .num { position: relative; z-index: 1; }

/* B2 (1.4.1): el estado se dice con color Y con forma: la ocupada lleva rayas y una cruz, la elegida
   una marca de verificación y borde grueso, el espacio de silla de ruedas su pictograma. */
.butaca.libre { background: #2f7d57; color: #ffffff; border-color: #1d5a3c; }
.butaca.ocupada {
    background: repeating-linear-gradient(45deg, #b8323a 0 4px, #8f2530 4px 8px);
    color: #ffffff; border-color: #6c1822; cursor: not-allowed;
}
.butaca.elegida { background: #f0ad4e; color: #2a2233; border: 3px solid #2a2233; }
.butaca.ruedas { background: #5b3ba0; color: #ffffff; border-color: #3c2570; }
.butaca.ruedas.elegida { background: #f0ad4e; color: #2a2233; border: 3px solid #2a2233; }
.butaca.ruedas.ocupada { background: repeating-linear-gradient(45deg, #b8323a 0 4px, #8f2530 4px 8px); color: #fff; border-color: #6c1822; }

.butaca .marca-estado { display: none; position: absolute; top: -5px; right: -5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; padding: 2px; }
.butaca.elegida .m-check { display: block; stroke: #2a2233; }
.butaca.ocupada .m-cruz { display: block; stroke: #6c1822; }
.butaca.ruedas:not(.elegida):not(.ocupada) .m-silla { display: block; stroke: #3c2570; }
.butaca .marca-estado { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* B3 (1.3.1): la letra de la fila es texto real (aria-hidden porque el grupo ya se llama «Fila C»). */
.fila-nombre { display: inline-block; width: 20px; flex: none; font-size: 0.8125rem; font-weight: 700; color: #4d4259; text-align: center; }

/* B5 (1.4.3): textos con contraste suficiente. */
.leyenda li { color: var(--tinta); font-size: 0.95rem; }
.leyenda .muestra { position: relative; width: 22px; height: 22px; border: 2px solid transparent; border-radius: 4px; }
.leyenda .muestra.libre { background: #2f7d57; border-color: #1d5a3c; }
.leyenda .muestra.ocupada { background: repeating-linear-gradient(45deg, #b8323a 0 4px, #8f2530 4px 8px); border-color: #6c1822; }
.leyenda .muestra.elegida { background: #f0ad4e; border: 3px solid #2a2233; }
.leyenda .muestra.ruedas { background: #5b3ba0; border-color: #3c2570; }
.leyenda .muestra .marca-estado { display: block; }
.leyenda .muestra.libre .marca-estado { display: none; }
.leyenda .muestra.elegida .marca-estado { stroke: #2a2233; }
.leyenda .muestra.ocupada .marca-estado { stroke: #6c1822; }
.leyenda .muestra.ruedas .marca-estado { stroke: #3c2570; }
.leyenda .muestra .marca-estado { position: absolute; top: -6px; right: -6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; padding: 2px; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* B6 (1.4.13): los precios están escritos en la página, siempre visibles. */
.precios { max-width: 46em; margin: 0 0 14px; font-size: 0.95rem; }

/* B10 (2.5.7): el marco se desplaza de forma nativa (rueda, teclado, trackpad) y además hay botones. */
.marco { overflow-x: auto; overflow-y: hidden; }
.barra-plano { display: flex; flex-wrap: wrap; gap: 8px; max-width: 460px; margin: 0 0 8px; }
.barra-plano .boton { padding: 8px 14px; font-size: 0.95rem; }

/* Alternativa «Elegir por mí». */
.elegir-por-mi { max-width: 460px; margin: 0 0 18px; padding: 12px 16px 16px; background: var(--papel); border: 1px solid var(--borde); border-radius: 8px; }
.elegir-por-mi legend { font-weight: 700; padding: 0 6px; }
.elegir-por-mi .fila-campos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.elegir-por-mi input[type="number"] { font: inherit; width: 5.5em; min-height: 44px; padding: 6px 10px; border: 2px solid #7d6a8c; border-radius: 6px; }

/* Aviso de reserva (diálogo modal nativo). */
dialog {
    max-width: min(30em, calc(100vw - 32px)); padding: 20px 22px;
    border: 3px solid var(--ciruela); border-radius: 12px; background: #fff; color: var(--tinta);
}
dialog::backdrop { background: rgba(26, 12, 38, 0.65); }
dialog h2 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; }
}
