/* Custom Styles for theming, popups, and other elements */
:root {
    --bg-secondary: #ffffff;
    --text-primary: #1f2937;
    --accent: #4f46e5;
    --green: #10b981;
    --red: #ef4444;
    --yellow: #f59e0b;
}
html.dark {
    --bg-secondary: #1f2937;
    --text-primary: #f9fafb;
}
body {
    font-family: 'Inter', sans-serif;
}
/* Leaflet popup customization (uses CSS variables for theme) */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}
/* Toast Notification */
.toast {
    visibility: hidden; opacity: 0;
    min-width: 250px; margin-left: -125px;
    background-color: #333; color: #fff; text-align: center;
    border-radius: 8px; padding: 16px; position: fixed;
    z-index: 10000; left: 50%; bottom: 30px;
    transition: visibility 0.5s, opacity 0.5s linear;
}
.toast.show { visibility: visible; opacity: 1; }

/* Theme Toggle Switch */
.theme-switch-wrapper { display: flex; align-items: center; }
.theme-switch { display: inline-block; height: 24px; position: relative; width: 48px; }
.theme-switch input { display: none; }
.slider-theme { background-color: #ccc; bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0; transition: .4s; border-radius: 24px; }
.slider-theme:before { background-color: #fff; bottom: 2px; content: ""; height: 20px; left: 2px; position: absolute; transition: .4s; width: 20px; border-radius: 50%; }
input:checked + .slider-theme { background-color: var(--accent); }
input:checked + .slider-theme:before { transform: translateX(24px); }

/* Active nav link styling */
.nav-link.active {
    background-color: #eef2ff; /* bg-indigo-50 */
    color: #4338ca; /* text-indigo-700 */
    font-weight: 600;
}
html.dark .nav-link.active {
    background-color: #374151; /* dark:bg-gray-700 */
    color: #a5b4fc; /* dark:text-indigo-300 */
}

/* Auth screen tab styling */
.auth-tab {
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-bottom: 3px solid transparent;
    transition: border-color 0.3s, color 0.3s;
}
.auth-tab.active {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

/* Custom scrollbar for better dark mode experience */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
html.dark ::-webkit-scrollbar-track { background: #111827; }
::-webkit-scrollbar-thumb { background: #a8a29e; border-radius: 4px; }
html.dark ::-webkit-scrollbar-thumb { background: #57534e; }
::-webkit-scrollbar-thumb:hover { background: #78716c; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #78716c; }

/* Form validation error message */
.form-error {
    color: var(--red);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    height: 1rem;
}

/* Modal transition */
.modal-container {
    transition: opacity 0.3s ease-in-out;
}

/* Onboarding tooltip style */
.onboarding-tooltip {
    position: absolute;
    background-color: var(--accent);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    z-index: 10001;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 250px;
}

/* Responsive Navigation Styles */
@media (max-width: 767px) {
    #main-nav {
        /* On mobile, nav takes full height and is positioned absolutely on the left */
        height: 100vh;
        position: fixed;
    }
}

/* Helper class to show the nav when toggled by JS */
#main-nav.is-open {
    transform: translateX(0);
}


