/* Modern White Theme */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --text-main: #111827;
    --text-muted: #6b7280;
    --accent: #135bec;
}

/* Custom Scrollbar */
.bg-primary {
    background-color: var(--accent) !important;
}

.text-primary {
    color: var(--accent) !important;
}

.bg-secondary {
    background-color: #10b981 !important;
}

/* Green fallback */

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Glassmorphism (White) */
.glass-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Map */
#map {
    height: 100%;
    width: 100%;
    z-index: 1;
    /* Ensure map is not covered by random elements, but below UI */
    background-color: #f3f4f6;
    /* Placeholder color before tiles load */
}

/* Ensure Leaflet tiles render correctly */
.leaflet-tile-pane {
    z-index: 200 !important;
}

/* Dark Mode Filter for OSM */
.dark-tiles {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%) grayscale(20%);
}

.leaflet-control-container {
    z-index: 800 !important;
}

/* Views */
.view-section {
    display: none;
    height: 100%;
    width: 100%;
    position: absolute;
    inset: 0;
    overflow-y: auto;
    background-color: var(--bg-secondary);
    padding-bottom: 6rem;
}

.view-section.active {
    display: flex;
    flex-direction: column;
}

/* Nav */
.nav-btn.active {
    color: var(--accent) !important;
    opacity: 1 !important;
}

.nav-btn.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

/* ensure hidden wins over flex */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes pulse-ring {
    0% {
        transform: scale(0.33);
        opacity: 1;
    }

    80%,
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.marker-pulse::before {
    content: '';
    position: absolute;
    left: -10px;
    top: -10px;
    width: 30px;
    height: 30px;
    background-color: rgba(19, 91, 236, 0.5);
    border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* Modals */
#chat-modal,
#product-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    background-color: #ffffff;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    transform: translateY(100%);
    display: flex;
    flex-direction: column;
}

#chat-modal.open,
#product-modal.open {
    transform: translateY(0);
}

#chat-modal.hidden {
    display: none;
}

/* Helper */

.slider-container {
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    display: flex;
}

.slider-item {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 100%;
    height: 40vh;
    object-fit: cover;
}

/* Toast */
#notification-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 12px 20px;
    border-radius: 50px;
    z-index: 200;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
    width: 90%;
    max-width: 350px;
    border: 1px solid #e5e7eb;
    z-index: 9999 !important;
    /* Always on top */
}

#notification-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Direction Card */
.direction-card {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}