/* ==============================================================================
   BETREG: Benue State Gaming Regulatory and Revenue Management System
   Global Stylesheet: css/app.css
   Description: Complete styling, glassmorphism, animations, and print engine.
   ============================================================================== */

/* --------------------------------------------------------------------------
   1. COLOR PALETTE & THEME VARIABLES
   -------------------------------------------------------------------------- */
:root {
    --bslgc-primary: #059669;
    --bslgc-primary-light: #10b981;
    --bslgc-primary-dark: #047857;
    --bslgc-gold: #d97706;
    --bslgc-bg-dark: #090d16;
    --bslgc-panel-dark: #0f172a;
    --bslgc-border: #1e293b;
}

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bslgc-bg-dark);
    color: #f8fafc;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Enforce 44px minimum touch targets and stop mobile safari auto-zoom */
input, select, textarea, button, a.btn {
    min-height: 44px;
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   2. CUSTOM SCROLLBAR
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #090d16;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* --------------------------------------------------------------------------
   3. GLASSMORPHISM & SURFACE ELEVATIONS
   -------------------------------------------------------------------------- */
.glass-panel {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 15px 0 rgba(16, 185, 129, 0.1);
}

/* --------------------------------------------------------------------------
   4. ANIMATIONS & MICRO-INTERACTIONS
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.animate-pulse-glow {
    animation: pulseGlow 3s infinite ease-in-out;
}

/* --------------------------------------------------------------------------
   5. LEAFLET MAP CUSTOM POPUPS
   -------------------------------------------------------------------------- */
.leaflet-popup-content-wrapper {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-radius: 12px !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 12px 14px !important;
    line-height: 1.4 !important;
}

.leaflet-popup-tip {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
}

/* --------------------------------------------------------------------------
   6. OFFICIAL CERTIFICATE PRINT ENGINE (@media print)
   -------------------------------------------------------------------------- */
@media print {
    body * {
        visibility: hidden;
    }

    #certificate-modal,
    #certificate-printable-area,
    #certificate-printable-area * {
        visibility: visible;
    }

    #certificate-printable-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding: 30px;
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 4px double #065f46 !important;
    }

    .no-print {
        display: none !important;
    }
}