/* theme.css */
body.dark-theme {
    --navy: #f8fafc; /* previously dark blue, now light */
    --gold: #D9B93B;
    --steel: #94a3b8;
    --light-steel: #cbd5e1;
    --dark-gold: #fbbf24;
    --bg: #020617; /* body background */
    --white: #1e293b; /* card backgrounds */
    --text-gray: #cbd5e1;
    
    --navy-10: rgba(255,255,255,0.05); /* faint backgrounds */
    --gold-10: rgba(217,185,59,0.15);
    --red-600: #f87171;
    --red-50:  rgba(248,113,113,0.1);
    --gray-100: #334155; /* borders */
}

/* Overrides for elements that were manually set to dark background (--navy) in light mode */
body.dark-theme header,
body.dark-theme footer,
body.dark-theme .article-hero,
body.dark-theme .hero,
body.dark-theme .cta-sidebar,
body.dark-theme .summary-box,
body.dark-theme .sim-card,
body.dark-theme .results-panel,
body.dark-theme #hero-section {
    background-color: #0f172a !important; 
    color: #f8fafc !important;
}

body.dark-theme .article-hero::before,
body.dark-theme .hero::before {
    opacity: 0.1 !important;
}

/* Links and text in dark areas needing to stay light */
body.dark-theme header a,
body.dark-theme footer a,
body.dark-theme .article-hero h1,
body.dark-theme .hero h1,
body.dark-theme footer p,
body.dark-theme footer .logo,
body.dark-theme header .logo,
body.dark-theme .logo {
    color: #f8fafc !important; 
}

/* Maintain gold logo icons */
body.dark-theme header .logo i,
body.dark-theme footer .logo i,
body.dark-theme .logo i {
    color: var(--gold) !important;
}

body.dark-theme .nav-links {
    background-color: #0f172a; 
}
@media (max-width: 768px) {
    body.dark-theme .nav-links {
        background-color: #0f172a !important; 
        border-top-color: #334155 !important;
    }
}

body.dark-theme .menu-toggle {
    color: #f8fafc !important;
}

/* Tables in dark mode */
body.dark-theme td { color: #cbd5e1 !important; }
body.dark-theme td::before { color: #f8fafc !important; }
body.dark-theme tr { background: #1e293b !important; border-color: #334155 !important; }
body.dark-theme tbody tr:nth-child(even) td { background: #0f172a !important; }
body.dark-theme thead tr { background: #0f172a !important; color: #f8fafc !important; }

/* Simulator texts */
body.dark-theme .sim-label { color: rgba(255,255,255,0.7) !important;}
body.dark-theme .sim-note { color: rgba(255,255,255,0.5) !important;}
body.dark-theme .result-label { color: rgba(255,255,255,0.7) !important;}

/* Inputs in dark mode */
body.dark-theme input[type="number"],
body.dark-theme input[type="text"],
body.dark-theme input[type="email"],
body.dark-theme textarea {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

body.dark-theme input:focus,
body.dark-theme textarea:focus {
    background-color: #1e293b !important;
}

body.dark-theme .prefix, body.dark-theme .suffix {
    color: #94a3b8 !important;
}

/* Buttons with specific text colors */
body.dark-theme .btn-whatsapp, 
body.dark-theme .btn-cta, 
body.dark-theme .btn-calc,
body.dark-theme .btn-primary {
    color: #0f172a !important; 
}

/* Construction icon */
body.dark-theme .icon-wrapper {
    background: rgba(255,255,255,0.05) !important;
}

/* Theme Toggle Button Styles */
.theme-toggle {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #ffffff;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    margin-left: 10px;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: var(--gold);
    border-color: var(--gold);
}
@media (max-width: 768px) {
    .theme-toggle {
        margin: 15px auto 0;
        width: 100%;
        padding: 12px;
    }
}
