@charset "utf-8";
/* ========================================
   qrModal.css - Escáner QR para Platea Local
   Versión: 1.0
   ======================================== */

/* ========================================
   1.  OVERLAY PRINCIPAL (Fondo del modal)
   ======================================== */
.qr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: qrFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

@keyframes qrFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   2.  CONTENEDOR DEL MODAL
   ======================================== */
.qr-modal-container {
    position: relative;
    width: 100%;
    max-width: 540px;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 28px;
    padding: 24px 24px 28px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(200, 155, 60, 0.15);
    border: 1px solid rgba(200, 155, 60, 0.2);
    animation: qrSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes qrSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   3.  BOTÓN DE CIERRE
   ======================================== */
.qr-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.qr-modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: rotate(90deg) scale(1.1);
    color: var(--accent, #c89b3c);
}

.qr-modal-close:active {
    transform: rotate(90deg) scale(0.9);
}

/* ========================================
   4.  TÍTULO DEL MODAL
   ======================================== */
.qr-modal-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 18px 0;
    letter-spacing: 0.3px;
    font-family: 'Montserrat', sans-serif;
}

.qr-modal-title i {
    color: var(--accent, #c89b3c);
    margin-right: 10px;
}

/* ========================================
   5.  WRAPPER DEL VIDEO (Contenedor de la cámara)
   ======================================== */
.qr-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: #0a0a0a;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.6);
    margin-bottom: 18px;
}

.qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================
   6.  OVERLAY CON MARCO Y TEXTO GUÍA
   ======================================== */
.qr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(0, 0, 0, 0.35) 100%
    );
}

/* Marco de escaneo */
.qr-frame {
    width: 58%;
    height: 58%;
    border: 2.5px solid rgba(200, 155, 60, 0.7);
    border-radius: 16px;
    position: relative;
    animation: qrPulse 2.4s ease-in-out infinite;
    box-shadow: 0 0 50px rgba(200, 155, 60, 0.08);
}

/* Esquinas decorativas del marco */
.qr-frame::before,
.qr-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--accent, #c89b3c);
    border-style: solid;
    border-width: 0;
}

.qr-frame::before {
    top: -3px;
    left: -3px;
    border-top-width: 3px;
    border-left-width: 3px;
    border-radius: 4px 0 0 0;
}

.qr-frame::after {
    bottom: -3px;
    right: -3px;
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-radius: 0 0 4px 0;
}

/* Segunda capa de esquinas (invertidas) */
.qr-frame .corner-tr {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    border-top: 3px solid var(--accent, #c89b3c);
    border-right: 3px solid var(--accent, #c89b3c);
    border-radius: 0 4px 0 0;
}

.qr-frame .corner-bl {
    position: absolute;
    bottom: -3px;
    left: -3px;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid var(--accent, #c89b3c);
    border-left: 3px solid var(--accent, #c89b3c);
    border-radius: 0 0 0 4px;
}

@keyframes qrPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(200, 155, 60, 0.1);
        border-color: rgba(200, 155, 60, 0.6);
    }
    50% {
        box-shadow: 0 0 50px rgba(200, 155, 60, 0.25);
        border-color: rgba(200, 155, 60, 0.9);
    }
}

/* Texto de instrucción */
.qr-instruction {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 18px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 18px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.2px;
}

/* ========================================
   7.  ESTADO DE LECTURA (Status bar)
   ======================================== */
.qr-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    min-height: 54px;
    font-family: 'Montserrat', sans-serif;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.qr-status i {
    font-size: 1.2rem;
}

/* Estados dinámicos */
.qr-status.scanning {
    color: #ffd54f;
    background: rgba(255, 213, 79, 0.06);
    border-color: rgba(255, 213, 79, 0.12);
}

.qr-status.scanning i {
    color: #ffd54f;
}

.qr-status.success {
    color: #69f0ae;
    background: rgba(105, 240, 174, 0.08);
    border-color: rgba(105, 240, 174, 0.15);
}

.qr-status.success i {
    color: #69f0ae;
}

.qr-status.error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.08);
    border-color: rgba(255, 107, 107, 0.15);
}

.qr-status.error i {
    color: #ff6b6b;
}

/* ========================================
   8.  BOTÓN DE REDIRECCIÓN MANUAL (Opcional)
   ======================================== */
.qr-manual-link {
    display: none; /* Oculto por defecto, se activa con JS si es necesario */
    margin-top: 12px;
    text-align: center;
}

.qr-manual-link a {
    color: var(--accent, #c89b3c);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.qr-manual-link a:hover {
    color: #b3882b;
}

/* ========================================
   9.  RESPONSIVE
   ======================================== */

/* Tablets y móviles grandes */
@media (max-width: 768px) {
    .qr-modal-container {
        max-width: 460px;
        padding: 18px 18px 22px;
        border-radius: 22px;
    }

    .qr-modal-title {
        font-size: 1rem;
        margin-bottom: 14px;
    }

    .qr-frame {
        width: 62%;
        height: 62%;
    }

    .qr-instruction {
        font-size: 0.75rem;
        padding: 6px 14px;
        margin-top: 14px;
    }

    .qr-status {
        font-size: 0.85rem;
        padding: 10px 14px;
        min-height: 46px;
    }

    .qr-modal-close {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
        top: 12px;
        right: 12px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .qr-modal-overlay {
        padding: 10px;
        align-items: flex-end;
        background: rgba(0, 0, 0, 0.92);
    }

    .qr-modal-container {
        max-width: 100%;
        padding: 14px 14px 20px;
        border-radius: 20px 20px 0 0;
        animation: qrSlideUpMobile 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes qrSlideUpMobile {
        from {
            opacity: 0;
            transform: translateY(60px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .qr-modal-title {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .qr-modal-title i {
        margin-right: 6px;
    }

    .qr-video-wrapper {
        border-radius: 12px;
        margin-bottom: 14px;
    }

    .qr-frame {
        width: 68%;
        height: 68%;
        border-width: 2px;
    }

    .qr-frame::before,
    .qr-frame::after {
        width: 14px;
        height: 14px;
    }

    .qr-frame .corner-tr,
    .qr-frame .corner-bl {
        width: 14px;
        height: 14px;
    }

    .qr-instruction {
        font-size: 0.65rem;
        padding: 4px 12px;
        margin-top: 10px;
    }

    .qr-status {
        font-size: 0.75rem;
        padding: 8px 12px;
        min-height: 40px;
        gap: 8px;
        border-radius: 10px;
    }

    .qr-status i {
        font-size: 1rem;
    }

    .qr-modal-close {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        top: 10px;
        right: 10px;
    }
}

/* Pantallas muy pequeñas (≤360px) */
@media (max-width: 360px) {
    .qr-modal-container {
        padding: 10px 10px 16px;
    }

    .qr-frame {
        width: 72%;
        height: 72%;
    }

    .qr-instruction {
        font-size: 0.6rem;
        padding: 3px 10px;
    }

    .qr-status {
        font-size: 0.7rem;
        padding: 6px 10px;
        min-height: 36px;
    }
}

/* ========================================
   10. SOPORTE PARA MODO OSCURO / PREFERENCIAS
   ======================================== */
@media (prefers-color-scheme: light) {
    .qr-modal-overlay {
        background: rgba(0, 0, 0, 0.85);
    }

    .qr-modal-container {
        background: rgba(30, 30, 30, 0.98);
    }

    .qr-instruction {
        background: rgba(0, 0, 0, 0.6);
    }
}

/* ========================================
   11. UTILITY: Ocultar scroll cuando el modal está abierto
   ======================================== */
body.qr-modal-open {
    overflow: hidden !important;
    padding-right: var(--scrollbar-width, 0px);
}

/* ========================================
   12. ANIMACIÓN DE ESCÁNER (Línea móvil)
   ======================================== */
.qr-scanner-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent, #c89b3c), transparent);
    border-radius: 2px;
    opacity: 0.6;
    animation: qrScanLine 2.2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(200, 155, 60, 0.3);
}

@keyframes qrScanLine {
    0% {
        top: 15%;
        opacity: 0.3;
    }
    50% {
        top: 80%;
        opacity: 0.9;
    }
    100% {
        top: 15%;
        opacity: 0.3;
    }
}

/* ========================================
   FIN DE qrModal.css
   ======================================== */

