/* Standard CSS Overrides */

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #e2e8f0;
    /* slate-200 */
    border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
    background-color: #334155;
    /* slate-700 */
}

::-webkit-scrollbar-thumb:hover {
    background-color: #cbd5e1;
    /* slate-300 */
}

.dark {
    color-scheme: dark;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background-color: #475569;
    /* slate-600 */
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

/* Button Base (Tailwind classes handle the rest, just some transitions here if needed) */
.btn {
    transition: all 0.3s ease;
}

/* Winter Theme specific overrides if JS toggles class */
.theme-winter .btn-primary {
    background-color: #0ea5e9 !important;
    /* sky-500 */
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.2);
}

.theme-winter .btn-primary:hover {
    background-color: #0284c7 !important;
    /* sky-600 */
}

/* Keep the mobile hamburger visible across public pages */
@media (max-width: 768px) {
    header .container>a {
        min-width: 0;
        flex: 1 1 auto;
        gap: 0.5rem;
    }

    header .container>a>div {
        width: 2.5rem !important;
        height: 2.5rem !important;
        flex: 0 0 2.5rem;
    }

    header .container>a .font-display {
        font-size: clamp(1.35rem, 4.2vw, 1.75rem) !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    header .container>div.lg\:hidden {
        display: flex !important;
        align-items: center !important;
        gap: 0.25rem;
        flex-shrink: 0;
    }

    #mobile-menu-btn,
    #mobile-seasonal-toggle,
    header .container>div.lg\:hidden .theme-toggle,
    header .container>div.lg\:hidden button[aria-label="Toggle RTL"] {
        width: 2.25rem !important;
        height: 2.25rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    #mobile-menu-btn i {
        font-size: 1.5rem !important;
        line-height: 1 !important;
    }

    /* Keep distinct appearance without borders */
    #mobile-seasonal-toggle {
        background: rgba(245, 158, 11, 0.1) !important;
    }
}

.dark header .container>div.lg\:hidden .theme-toggle {
    background: rgba(148, 163, 184, 0.18) !important;
}

.dark #mobile-seasonal-toggle {
    background: rgba(250, 204, 21, 0.14) !important;
}

@media (max-width: 640px) {
    header .container>a {
        max-width: calc(100% - 9.5rem);
    }

    header .container>a .font-display {
        font-size: 1.25rem !important;
    }
}

/* Keep public navbar fixed on all layouts */
body>header.fixed.top-0 {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

/* Menu action spacing (tablet/mobile) */
#mobile-menu nav a[href="login.html"] {
    margin-bottom: 0.75rem;
}

#mobile-menu nav a[href="login.html"]+a.btn {
    margin-top: 0 !important;
}

/* Header action spacing (desktop) */
@media (min-width: 1024px) {
    header .hidden.lg\:flex a[href="login.html"]+a.btn {
        margin-left: 0.875rem !important;
    }
}

/* Leaflet map theme alignment for route planner */
#map.map-theme-dark .leaflet-control-zoom a {
    background: #0f172a;
    color: #cbd5e1;
    border-color: #334155;
}

#map.map-theme-dark .leaflet-control-attribution {
    background: rgba(15, 23, 42, 0.85);
    color: #94a3b8;
}

#map.map-theme-dark .leaflet-control-attribution a {
    color: #cbd5e1;
}

#map.map-theme-dark .leaflet-popup-content-wrapper,
#map.map-theme-dark .leaflet-popup-tip {
    background: #0f172a;
    color: #e2e8f0;
}

#map.map-theme-light .leaflet-control-zoom a {
    background: #ffffff;
    color: #334155;
    border-color: #cbd5e1;
}
