/* --- LEAFLET GROUPED LAYER CONTROL (FIXED SCROLL & THEME) --- */

/* 1. Main Container */
.leaflet-control-layers {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Lebar minimal hanya berlaku saat menu TERBUKA (Expanded) */
.leaflet-control-layers-expanded {
    min-width: 250px; 
    padding: 0;
}

/* Scrollable List */
.leaflet-control-layers-list {
    padding: 10px;
    max-height: 70vh;
    overflow-y: auto;
    
    /* --- PERBAIKAN PENTING: Mencegah scroll peta saat list mentok --- */
    overscroll-behavior: contain; 
}

/* 2. Group Wrapper */
.leaflet-control-layers-group {
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden; 
}

/* 3. Group Label (Header Grup) */
.leaflet-control-layers-group-label {
    /* UBAH KE WARNA TEMA SIPINTAR (#001f2f) AGAR KONSISTEN */
    background-color: #001f2f; 
    color: #ffffff; /* Teks Putih */
    
    padding: 10px 12px;
    display: flex; 
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
    user-select: none;
}

.leaflet-control-layers-group-label:hover {
    background-color: #00334e; /* Efek hover sedikit terang */
}

/* Teks Nama Grup */
.leaflet-control-layers-group-name {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Ikon Panah */
.leaflet-control-layers-group-label i {
    font-size: 0.8rem;
    color: #ffffff; /* Ikon Putih */
    transition: transform 0.3s ease;
}

/* 4. Group Content (Isi Layer) */
.leaflet-control-layers-group-content {
    padding: 5px 0;
    background-color: #fff;
    border-top: 1px solid #e9ecef;
    display: block; 
}

/* 5. Item Layer (Checkbox + Text) */
.leaflet-control-layers label {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    margin: 0;
    cursor: pointer;
    transition: background 0.2s;
}

.leaflet-control-layers label:hover {
    background-color: #f1f3f5;
}

/* Checkbox Style */
.leaflet-control-layers-selector {
    margin-top: 0;
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: #001f2f; /* Warna Centang Biru Tua */
    cursor: pointer;
}

/* Text Style */
.leaflet-control-layers label span {
    font-size: 0.9rem;
    color: #343a40;
}

/* Scrollbar Style */
.leaflet-control-layers-list::-webkit-scrollbar {
    width: 5px;
}
.leaflet-control-layers-list::-webkit-scrollbar-thumb {
    background-color: #adb5bd;
    border-radius: 10px;
}

/* --- JUDUL KHUSUS UNTUK BASEMAP (PETA DASAR) --- */
.leaflet-control-layers-base {
    margin-bottom: 15px;
}

.leaflet-control-layers-base::before {
    content: "PETA DASAR"; 
    display: block;
    background-color: #001f2f; /* Biru Tua */
    color: #ffffff; /* Putih */
    padding: 8px 10px;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-radius: 6px;
}