body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #0b0f19;
}

.leaflet-top.leaflet-left {
    top: 24px;
    left: 24px;
}

.leaflet-bar {
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-bar-part {
    background-color: #0f172a !important;
    color: #94a3b8 !important;
    border: 1px solid #1e293b !important;
    transition: all 0.2s ease;
}

.leaflet-bar-part:hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

.leaflet-container {
    background: #0b0f19;
}

.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #e2e8f0 !important;
    border: 1px solid rgba(51, 65, 85, 0.6);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3) !important;
    border-radius: 16px;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 10px !important;
    width: auto !important;
    min-width: 170px;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(51, 65, 85, 0.6);
}

/* Kustomisasi scrollbar halus */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.1);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(51, 65, 85, 0.5);
    border-radius: 9px;
}

/* ─── Mobile Responsive (< 640px) ──────────────────────── */
@media (max-width: 639px) {
    .leaflet-top.leaflet-left {
        top: 12px;
        left: 12px;
    }

    /* Widget panel: bottom sheet */
    .widget-panel {
        position: fixed !important;
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 50vh;
        padding: 0 !important;
        border-radius: 0;
        z-index: 999;
        transition: max-height 0.35s ease;
    }

    /* Collapsed state — hanya tampilkan header */
    .widget-panel.collapsed {
        max-height: 64px;
        overflow: hidden !important;
    }

    .widget-panel .widget-card {
        border-radius: 20px 20px 0 0 !important;
        padding: 14px 16px 20px !important;
        border-bottom: none !important;
    }

    /* Handle bar untuk swipe hint / tap toggle */
    .widget-panel .widget-card::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: rgba(148, 163, 184, 0.4);
        border-radius: 4px;
        margin: 0 auto 10px;
        cursor: pointer;
    }

    .widget-panel .widget-card h2 {
        font-size: 1rem !important;
    }

    /* Toggle button */
    .widget-toggle {
        display: flex !important;
    }

    /* Sembunyikan konten saat collapsed */
    .widget-panel.collapsed .widget-body {
        opacity: 0;
        pointer-events: none;
    }

    .widget-body {
        transition: opacity 0.25s ease;
    }
}

/* Toggle button — hidden on desktop */
.widget-toggle {
    display: none !important;
}

/* ─── Tablet (640px - 1023px) ──────────────────────────── */
@media (min-width: 640px) and (max-width: 1023px) {
    .widget-panel {
        max-width: 360px !important;
        top: 16px !important;
        right: 16px !important;
    }
}

