/**
 * =====================================================================
 * ESTILOS VISUALES - VERIFICADOR DE PRECIOS PWA (MODERN KIOSK THEME)
 * =====================================================================
 */

:root {
    --bg-dark: #0b0f19;
    --bg-card: #111827;
    --bg-card-hover: #1f2937;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(16, 185, 129, 0.4);
    --color-primary: #10b981;
    --color-primary-light: #34d399;
    --color-accent: #6366f1;
    --color-danger: #f43f5e;
    --color-warning: #f59e0b;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    width: 100%;
    background-color: var(--bg-dark);
    color: #f8fafc;
    font-family: var(--font-sans);
    user-select: none;
    -webkit-user-select: none;
    overflow-x: hidden;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
}

/* Glassmorphism effects */
.glass-panel {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
}

.glass-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Animación del láser escáner */
@keyframes laserSweep {
    0% {
        top: 8%;
        opacity: 0.3;
        transform: scaleX(0.9);
    }
    50% {
        top: 90%;
        opacity: 1;
        transform: scaleX(1);
    }
    100% {
        top: 8%;
        opacity: 0.3;
        transform: scaleX(0.9);
    }
}

.scanner-laser {
    position: absolute;
    left: 4%;
    right: 4%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #10b981 20%, #6ee7b7 50%, #10b981 80%, transparent);
    box-shadow: 0 0 16px #10b981, 0 0 8px #34d399, 0 0 24px rgba(16, 185, 129, 0.6);
    animation: laserSweep 2.2s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

/* Esquinas de mira óptica (Viewfinder) */
.viewfinder-bracket {
    position: absolute;
    width: 32px;
    height: 32px;
    border-color: #34d399;
    border-style: solid;
    pointer-events: none;
    filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.6));
    z-index: 5;
}

.bracket-tl { top: 12px; left: 12px; border-width: 4px 0 0 4px; border-top-left-radius: 12px; }
.bracket-tr { top: 12px; right: 12px; border-width: 4px 4px 0 0; border-top-right-radius: 12px; }
.bracket-bl { bottom: 12px; left: 12px; border-width: 0 0 4px 4px; border-bottom-left-radius: 12px; }
.bracket-br { bottom: 12px; right: 12px; border-width: 0 4px 4px 0; border-bottom-right-radius: 12px; }

/* Barra de progreso de auto-reset */
.countdown-progress-bar {
    transition: width 1s linear;
}

/* Rich Description */
.rich-description ul { list-style: disc; margin-left: 1.25rem; margin-top: 0.35rem; margin-bottom: 0.35rem; }
.rich-description ol { list-style: decimal; margin-left: 1.25rem; margin-top: 0.35rem; margin-bottom: 0.35rem; }
.rich-description h2 { font-size: 1.15rem; font-weight: 700; color: #f1f5f9; margin-top: 0.6rem; }
.rich-description h3 { font-size: 1.05rem; font-weight: 600; color: #e2e8f0; margin-top: 0.5rem; }
.rich-description p { margin-bottom: 0.4rem; line-height: 1.5; color: #94a3b8; }
.rich-description strong { color: #f8fafc; font-weight: 700; }

/* Botones con efecto de pulsación táctil */
.tap-btn {
    transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.tap-btn:active {
    transform: scale(0.95);
}

/* Ocultar barra de desplazamiento en scrollables horizontales */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Respaldo para el lector óptico de Html5Qrcode */
#reader {
    width: 100% !important;
    border: none !important;
    background: transparent !important;
}
#reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 1rem;
}
#reader__scan_region {
    background: transparent !important;
}
#reader__dashboard {
    display: none !important;
}

/* Animaciones sutiles */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-pop-in {
    animation: fadeInScale 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Pulso promocional */
@keyframes promoPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}
.promo-pulse {
    animation: promoPulse 2s infinite ease-in-out;
}
