/* Main App Styles */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    --sidebar-width: 400px;
    --font-family-base: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-family-base);
    color: #1e293b;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.bg-primary-gradient {
    background: var(--primary-gradient) !important;
}

.brand-icon {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
}

/* Map Container Layout */
.main-content {
    min-height: calc(100vh - 56px);
    width: 100%;
    position: relative;
}

.map-app-container {
    display: flex;
    height: calc(100vh - 56px);
    width: 100%;
    position: relative;
    overflow: hidden;
}


/* Sidebar Styles */
.map-sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sidebar-header {
    flex-shrink: 0;
}

.sidebar-body {
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

/* Map Viewport */
.map-viewport {
    flex-grow: 1;
    height: 100%;
    position: relative;
    background-color: #e2e8f0;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Floating Controls on Map */
.map-floating-controls {
    position: absolute;
    z-index: 999;
    display: flex;
    gap: 8px;
}

.map-floating-controls.top-left {
    top: 16px;
    left: 16px;
}

.map-floating-controls.top-right {
    top: 16px;
    right: 16px;
    flex-direction: column;
}

/* Category Filter Bar */
.category-filter-container {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    max-width: 90%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.category-filter-scroll {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-filter-scroll::-webkit-scrollbar {
    display: none;
}

.category-pill {
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
}

.category-pill.active {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
}


.map-circle-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.map-circle-btn:hover {
    background-color: #f8fafc;
    transform: scale(1.05);
}

/* Custom Leaflet Pulsating Marker for User Location */
.user-pulse-marker {
    position: relative;
    width: 24px;
    height: 24px;
}

.user-pulse-marker .pulse-dot {
    width: 16px;
    height: 16px;
    background-color: #2563eb;
    border: 3px solid #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.8);
    z-index: 2;
}

.user-pulse-marker .pulse-ring {
    border: 3px solid #3b82f6;
    border-radius: 50%;
    height: 38px;
    width: 38px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -19px;
    margin-top: -19px;
    animation: pulsate 1.8s ease-out infinite;
    opacity: 0;
    z-index: 1;
}

@keyframes pulsate {
    0% {
        transform: scale(0.3);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.4);
        opacity: 0.2;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Destination List Items */
.destination-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.destination-item:hover {
    background-color: #f1f5f9;
    border-left: 3px solid var(--primary-color) !important;
}

/* Responsive sidebar */
@media (max-width: 991.98px) {
    .map-sidebar {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
        width: 340px;
        max-width: 85vw;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2) !important;
    }

    .map-sidebar.open {
        transform: translateX(0);
    }
}