@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('/assets/css/dark.css');

body {
    font-family: 'Inter', sans-serif;
}

/* Foco visible para quien navega con teclado (enlaces, botones, campos): sin esto varios
   controles quedaban sin ningún indicador. Solo aparece con teclado, no al hacer clic. */
:focus-visible {
    outline: 2px solid #5D7CAE; /* navy-400 */
    outline-offset: 2px;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Impresión de alta calidad del certificado */
@media print {
    body {
        background: white !important;
        color: #000 !important;
    }
    header, .no-print, .modal-actions-bar {
        display: none !important;
    }
    #certificado-root {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: white !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .certificate-outer-box {
        border: none !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    @page {
        size: landscape;
        margin: 0.5cm;
    }
}

/* --- Accesibilidad --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: #0B1A33; color: #fff; padding: 0.75rem 1rem; border-radius: 0 0 0.5rem 0; font-weight: 700; font-size: 0.8rem; }
.skip-link:focus { left: 0; }

/* --- Móvil / táctil --- */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; }
@media (max-width: 639px) {
    /* Evita el zoom automático de iOS al enfocar un campo */
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select:not([hidden]), textarea:not([hidden]) { font-size: 16px; }
}

/* Mientras el menú lateral del panel aún no se dibuja, se reserva su espacio (evita que el contenido salte). */
@media (min-width: 1024px) {
    #admin-sidebar:empty { width: 15rem; flex-shrink: 0; background: #0B1A33; height: 100dvh; }
}

/* Textos largos (ayuda, términos y privacidad). */
.legal h1 { font-size: 1.5rem; font-weight: 800; color: #122544; }
.legal h2 { font-size: 1.125rem; font-weight: 700; color: #0f172a; margin-top: 1.5rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; }
.legal ul > * + * { margin-top: 0.25rem; }
.legal a { color: #26456F; text-decoration: underline; }

/* Botones sólidos verdes con texto oscuro: el blanco sobre verde 500 no alcanza el contraste mínimo (2,3:1). */
.bg-green-500.text-white, .bg-green-600.text-white { color: #052e16; }

/* Reproductor propio: en pantalla completa el video ocupa toda la pantalla (sin la proporción 16:9 de la caja). */
#video-wrapper:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; background: #000; }
#video-wrapper:fullscreen iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Pantalla completa simulada (iPhone no permite requestFullscreen en un contenedor): el video cubre toda la ventana. */
#video-wrapper.pseudo-full { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important; max-width: none !important;
    aspect-ratio: auto !important; z-index: 9999; background: #000; border-radius: 0 !important; margin: 0 !important; }
html.pseudo-full-activo, html.pseudo-full-activo body { overflow: hidden; }
