/* ===== RECAPTCHA BADGE ===== */
.grecaptcha-badge { visibility: hidden !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a1a1f; }
::-webkit-scrollbar-thumb { background: #2daaff; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #00e6a0; }

/* ===== GLASS CARDS ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card-light {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, #00e6a0 0%, #2daaff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== GLOW EFFECTS ===== */
.glow-green {
    box-shadow: 0 0 20px rgba(0, 230, 160, 0.2);
}

/* ===== GRID BACKGROUNDS ===== */
.grid-bg {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(45, 170, 255, 0.05) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(45, 170, 255, 0.05) 1px, transparent 1px);
}

.grid-pattern {
    background-image: linear-gradient(rgba(0, 230, 160, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 230, 160, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ===== OVERFLOW CONTAINMENT ===== */
html, body {
    overflow-x: hidden;
    /* Prevents off-screen panels (mobile nav, login) and any decorative
       absolute-positioned background elements from extending the body's
       horizontal scroll area on mobile. */
}

/* ===== LOGIN PANEL ===== */
#login-overlay { pointer-events: none; overflow: hidden; }
#login-overlay.is-open { pointer-events: all; }

#login-backdrop {
    opacity: 0;
    background: rgba(5, 15, 18, 0.65);
    transition: opacity 0.45s ease;
}
#login-overlay.is-open #login-backdrop { opacity: 1; }

body.login-open > *:not(#login-overlay) {
    filter: blur(5px);
    transition: filter 0.45s ease;
}
body > *:not(#login-overlay) { transition: filter 0.45s ease; }

#login-panel {
    transform: translateX(100%);
    transition: transform 0.48s cubic-bezier(0.32, 0, 0.15, 1);
    background: #0a1a1f;
    border-left: 1px solid rgba(255,255,255,0.07);
    box-shadow: -20px 0 60px rgba(0,0,0,0.5);
}
#login-overlay.is-open #login-panel { transform: translateX(0); }

#login-panel input {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#login-panel input:focus {
    border-color: #00e6a0 !important;
    box-shadow: 0 0 0 3px rgba(0,230,160,0.1) !important;
}
#login-panel input::placeholder { color: #4a6272 !important; }

/* ===== MOBILE NAV PANEL ===== */
#mobile-nav-overlay { pointer-events: none; overflow: hidden; }
#mobile-nav-overlay.is-open { pointer-events: all; }

#mobile-nav-backdrop {
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.45s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#mobile-nav-overlay.is-open #mobile-nav-backdrop { opacity: 1; }

#mobile-nav-panel {
    background: #050f12; /* bxv-darker */
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#mobile-nav-overlay.is-open #mobile-nav-panel { transform: translateX(0); }

body.mobile-nav-open > *:not(#mobile-nav-overlay):not(#login-overlay) {
    filter: blur(4px);
    transition: filter 0.45s ease;
}

/* FAB position adjusts when cookie banner is visible */
body.cookie-banner-visible #mobile-fab {
    bottom: max(7rem, calc(env(safe-area-inset-bottom) + 7rem));
}
#mobile-fab { transition: bottom 0.3s ease, transform 0.3s ease; }

/* ===== LIGHT MODE ===== */
body.light { background-color: #f4faf7; color: #0d1f25; }
body.light::-webkit-scrollbar-track { background: #f4faf7; }
body.light::-webkit-scrollbar-thumb { background: #00b48c; }

body.light #logo-img,
body.light .light-invert { filter: brightness(0); }

body.light .glass-card { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); }

body.light .grid-bg {
    background-image:
        linear-gradient(to right, rgba(0,100,80,0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,100,80,0.08) 1px, transparent 1px);
}

body.light .bg-bxv-darker { background-color: #eef9f4 !important; }
body.light .bg-bxv-dark   { background-color: #e0f3ea !important; }

/* Nav */
body.light #header {
    background-color: rgba(238,249,244,0.96) !important;
    border-bottom: 1px solid rgba(0,230,160,0.25) !important;
}
body.light #theme-toggle {
    background-color: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #334155 !important;
}

/* Text */
body.light .text-white   { color: #0d1f25 !important; }
body.light .text-gray-300 { color: #3d5a66 !important; }
body.light .text-gray-400 { color: #546e7a !important; }
body.light .text-gray-500 { color: #607d8b !important; }
body.light h1, body.light h2, body.light h3, body.light h4 { color: #0d1f25; }

/* Cards / panels */
body.light .bg-white\/5  { background-color: rgba(0,180,130,0.06) !important; }
body.light .bg-white\/10 { background-color: rgba(0,180,130,0.1) !important; }
body.light .bg-white\/20 { background-color: rgba(0,180,130,0.14) !important; }
body.light .hover\:bg-white\/10:hover { background-color: rgba(0,180,130,0.12) !important; }

/* Borders */
body.light .border-white\/5  { border-color: rgba(0,180,130,0.18) !important; }
body.light .border-white\/10 { border-color: rgba(0,180,130,0.25) !important; }
body.light .border-white\/20 { border-color: rgba(0,180,130,0.32) !important; }

/* Form inputs */
body.light input,
body.light select,
body.light textarea {
    background-color: rgba(255,255,255,0.9) !important;
    border-color: rgba(0,0,0,0.14) !important;
    color: #0d1f25 !important;
}
body.light input::placeholder,
body.light textarea::placeholder { color: #94a3b8 !important; }

/* Grayscale images */
body.light .grayscale { filter: grayscale(1) brightness(0.5) !important; }

/* Login panel - light mode */
body.light #login-panel {
    background: #eef9f4 !important;
    border-left: 1px solid rgba(0,180,130,0.3) !important;
    box-shadow: -20px 0 60px rgba(0,80,60,0.12) !important;
}
body.light #login-backdrop { background: rgba(10,40,30,0.35) !important; }
body.light #login-panel input {
    background: rgba(255,255,255,0.7) !important;
    border: 1px solid rgba(0,180,130,0.25) !important;
    color: #0d1f25 !important;
}
body.light #login-panel input:focus {
    border-color: #00b48c !important;
    box-shadow: 0 0 0 3px rgba(0,180,130,0.12) !important;
}
body.light #login-panel input::placeholder { color: #7a9aaa !important; }
body.light #login-panel .border-white\/5  { border-color: rgba(0,180,130,0.2) !important; }
body.light #login-panel .border-white\/10 { border-color: rgba(0,180,130,0.25) !important; }
body.light #login-panel .text-white  { color: #0d1f25 !important; }
body.light #login-panel .text-gray-400 { color: #546e7a !important; }
body.light #login-panel .text-gray-500 { color: #607d8b !important; }
body.light #login-panel .bg-white\/5  { background-color: rgba(0,180,130,0.08) !important; }
body.light #login-panel .bg-white\/10 { background-color: rgba(0,180,130,0.12) !important; }
body.light #login-panel .hover\:bg-white\/10:hover { background-color: rgba(0,180,130,0.15) !important; }
body.light #login-panel .hover\:text-white:hover { color: #0d1f25 !important; }

/* Mobile nav panel - light mode */
body.light #mobile-nav-panel {
    background: #f0f9f6 !important; /* bxv-light */
    border-left: 1px solid rgba(0, 180, 130, 0.2) !important;
}
body.light #mobile-nav-backdrop { background: rgba(10, 40, 30, 0.35) !important; }
body.light #mobile-nav-panel .text-white { color: #0d1f25 !important; }
body.light #mobile-nav-panel .text-gray-300 { color: #546e7a !important; }
body.light #mobile-nav-panel .text-gray-400 { color: #546e7a !important; }
body.light #mobile-nav-panel .border-white\/5 { border-color: rgba(0, 180, 130, 0.2) !important; }
body.light #mobile-nav-panel .border-white\/10 { border-color: rgba(0, 180, 130, 0.25) !important; }
body.light #mobile-nav-panel .bg-white\/5 { background-color: rgba(0, 180, 130, 0.08) !important; }
body.light #mobile-nav-panel .hover\:bg-white\/5:hover { background-color: rgba(0, 180, 130, 0.12) !important; }
body.light #mobile-nav-panel .hover\:bg-white\/10:hover { background-color: rgba(0, 180, 130, 0.15) !important; }
body.light #mobile-nav-panel .hover\:text-white:hover { color: #0d1f25 !important; }

/* ===== CUSTOM SELECT CHEVRON ===== */
.bxv-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239ca3af'><path fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.06l3.71-3.83a.75.75 0 111.08 1.04l-4.25 4.39a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z' clip-rule='evenodd'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem 1.25rem;
}

body.light .bxv-select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23546e7a'><path fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.06l3.71-3.83a.75.75 0 111.08 1.04l-4.25 4.39a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z' clip-rule='evenodd'/></svg>");
}

/* ===== SCROLLBAR HIDE UTILITY ===== */
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
