/* PANEL LAYERS - Futuristic and Colorful Style */
.leaflet-panel-layers {
    width: 30px; /* Initial width */
    min-width: 30px;
    padding: 1px;
    background: #fff; /* Warna latar belakang putih */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    transition: width 0.3s ease, background 0.3s ease;
    color: #333; /* Warna teks gelap untuk kontras */
    font-family: "Montserrat", sans-serif;
}

.leaflet-panel-layers.expanded {
    width: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background: rgb(255, 255, 255); /* Efek biru lembut */
    padding: 1px;
}

.leaflet-panel-layers-title {
    color: #1b1e63; /* Warna judul kontras */
}

.leaflet-panel-layers-title .leaflet-panel-layers-selector {
    float: right;
}

.leaflet-panel-layers-item {
    display: block;
    height: auto;
    clear: both;
    white-space: nowrap;
    cursor: pointer;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-bottom: 4px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.leaflet-panel-layers-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.leaflet-panel-layers-group {
    position: relative;
    width: auto;
    height: auto;
    clear: both;
    overflow: hidden;
    background: rgba(81, 58, 255, 0.05); /* Latar belakang grup */
    border-radius: 8px;
    margin-bottom: 8px;
}

.leaflet-panel-layers-group.collapsible:not(.expanded) {
    height: 20px;
}

.leaflet-panel-layers-group.collapsible:not(.expanded)
    .leaflet-panel-layers-grouplabel {
    height: 20px;
    overflow: hidden;
}

.leaflet-panel-layers-group.collapsible:not(.expanded)
    .leaflet-panel-layers-item {
    display: none;
}

.leaflet-panel-layers-group.collapsible .leaflet-panel-layers-grouplabel {
    display: block;
    cursor: pointer;
    color: #ffd700; /* Gold untuk label */
    font-size: 14px;
    font-weight: bold;
}

.leaflet-panel-layers-icon {
    text-align: center;
    float: left;
    line-height: 20px;
    height: 20px;
    width: 20px;
    background: #4285f4; /* Warna biru untuk ikon */
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

.leaflet-panel-layers-margin {
    height: 25px;
}

.leaflet-panel-layers-overlays .leaflet-panel-layers-item {
    white-space: pre-wrap;
    width: auto;
    display: block;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 4px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.leaflet-panel-layers-overlays .leaflet-panel-layers-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.leaflet-panel-layers-separator {
    clear: both;
    height: 8px;
    margin: 12px 4px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.leaflet-panel-layers-selector {
    position: relative;
    top: 1px;
    margin-top: 2px;
}

.leaflet-panel-layers-grouplabel .leaflet-panel-layers-selector {
    visibility: hidden;
    position: absolute;
    top: 1px;
    right: 7px;
}

.leaflet-panel-layers-group:hover .leaflet-panel-layers-selector {
    visibility: visible;
}

.leaflet-control-layers-selector {
    float: left;
}

/* Responsive Design */
@media (max-width: 600px) {
    .leaflet-panel-layers {
        width: 100%;
        min-width: 100%;
        border-radius: 0; /* Sesuaikan untuk layar kecil */
    }

    .leaflet-panel-layers.expanded {
        width: 100%;
        border-radius: 0;
        padding: 6px;
    }

    .leaflet-panel-layers-group.collapsible:not(.expanded) {
        height: 30px;
    }

    .leaflet-panel-layers-group.collapsible:not(.expanded)
        .leaflet-panel-layers-grouplabel {
        height: 30px;
    }
}

@media (max-width: 400px) {
    .leaflet-panel-layers {
        padding: 1px;
    }

    .leaflet-panel-layers-group {
        padding: 1px 2px;
        margin-bottom: 2px;
    }

    .leaflet-panel-layers-overlays .leaflet-panel-layers-item {
        padding: 1px;
    }

    .leaflet-panel-layers-icon {
        height: 16px;
        width: 16px;
    }

    .leaflet-panel-layers-group.collapsible:not(.expanded) {
        height: 24px;
    }

    .leaflet-panel-layers-group.collapsible:not(.expanded)
        .leaflet-panel-layers-grouplabel {
        height: 24px;
    }
}
