/* ===========================================================
   Shared Theme Overrides + Toggle Button Styles
   Used by every page via <link rel="stylesheet" href="assets/css/site.css">
   =========================================================== */

html, body { max-width: 100%; overflow-x: hidden; }
body { transition: background-color 400ms ease, color 400ms ease; overflow-x: hidden; }

/* Light theme color remap for Tailwind utility classes */
body.theme-light { background-color: #f6f8fb; color: #0f172a; }
body.theme-light .bg-background { background-color: #f6f8fb !important; }
body.theme-light .text-on-surface { color: #0f172a !important; }
body.theme-light .text-on-surface-variant { color: #475569 !important; }
body.theme-light .text-primary { color: #1d4ed8 !important; }
body.theme-light .border-primary { border-color: #1d4ed8 !important; }
body.theme-light .text-secondary-fixed { color: #0e7490 !important; }
body.theme-light .border-secondary-fixed { border-color: #0e7490 !important; }
body.theme-light .border-secondary-fixed\/20 { border-color: rgba(14,116,144,0.25) !important; }
body.theme-light .border-secondary-fixed\/30 { border-color: rgba(14,116,144,0.35) !important; }
body.theme-light .hover\:border-secondary-fixed:hover { border-color: #0e7490 !important; }
body.theme-light .bg-secondary-container { background-color: #0e7490 !important; }
body.theme-light .bg-surface-container\/70 { background-color: rgba(255,255,255,0.82) !important; }
body.theme-light .bg-surface-container\/95 { background-color: rgba(255,255,255,0.95) !important; }
body.theme-light .bg-surface-container-lowest { background-color: #ffffff !important; }
body.theme-light .bg-surface-container-low { background-color: #ffffff !important; }
body.theme-light .bg-surface-container-high { background-color: #eef2f7 !important; }
body.theme-light .bg-surface-variant { background-color: #e2e8f0 !important; }
body.theme-light .bg-surface-deep { background-color: #ffffff !important; }
body.theme-light .border-glass-border { border-color: rgba(15,23,42,0.08) !important; }
body.theme-light .border-glass-border\/50 { border-color: rgba(15,23,42,0.08) !important; }
body.theme-light .bg-surface-deep\/80 { background-color: #f1f5f9 !important; }
body.theme-light .glass-panel {
    background: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}
body.theme-light .glass-card {
    background: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}
body.theme-light .text-glow-cyan { text-shadow: 0 0 12px rgba(247, 166, 0, 0.35); }
body.theme-light .glow-hover:hover {
    box-shadow: 0 0 24px rgba(29, 78, 216, 0.18);
    border-color: #1d4ed8;
}
body.theme-light nav.fixed,
body.theme-light header.fixed { box-shadow: 0 1px 0 rgba(15,23,42,0.04), 0 4px 20px rgba(15,23,42,0.04); }
body.theme-light .carousel-dot { background-color: rgba(15,23,42,0.35) !important; }
body.theme-light .carousel-dot.active { background-color: #1d4ed8 !important; box-shadow: 0 0 10px rgba(29,78,216,0.5); }
body.theme-light footer { border-top-color: rgba(15,23,42,0.08) !important; }
body.theme-light .border-t { border-top-color: rgba(15,23,42,0.08) !important; }
body.theme-light input.glow-input,
body.theme-light select.glow-input,
body.theme-light textarea.glow-input {
    background-color: #ffffff !important;
    border-color: rgba(15,23,42,0.12) !important;
}

/* Hero section gradient overlays (only in pages that use them) */
body.theme-light #exchange > div:first-child > div:nth-child(3),
body.theme-light #exchange > div:first-child > div:nth-child(4) {
    background-image: linear-gradient(to right, rgba(255,255,255,0.96), rgba(255,255,255,0.85), rgba(255,255,255,0.15));
}
body.theme-light #exchange > div:first-child > div:nth-child(4) {
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.35), rgba(255,255,255,0) 40%, rgba(255,255,255,0.85));
}

/* Theme toggle button */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    cursor: pointer;
    transition: all 250ms ease;
}
.theme-toggle:hover { background: rgba(0, 242, 255, 0.15); border-color: #74f5ff; }
body.theme-light .theme-toggle { border-color: rgba(15, 23, 42, 0.1); background: rgba(15, 23, 42, 0.04); }
body.theme-light .theme-toggle:hover { background: rgba(29, 78, 216, 0.1); border-color: #1d4ed8; }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
body:not(.theme-light) .theme-toggle .icon-moon { display: inline; }
body.theme-light .theme-toggle .icon-sun { display: inline; }

@media (max-width: 767px) {
    .site-top-nav {
        min-height: 3.75rem;
    }
    .site-top-cta {
        white-space: nowrap;
        letter-spacing: 0;
    }
    .theme-toggle {
        width: 2.125rem;
        height: 2.125rem;
        border-radius: 0.625rem;
    }
    .theme-toggle .material-symbols-outlined {
        font-size: 1.125rem;
    }
}
