html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Hilangkan scrollbar */
}

/* =========================================================
   KONTROL LAYERS BASEMAP
   ========================================================= */

.leaflet-control-layers {
    top: 55px !important;
    /* Geser kontrol lebih ke bawah dari navbar */
    right: 0px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    /* Transparan sedikit */
    border-radius: 8px;
    /* Sudut lebih membulat */
    padding: 1px 2px;
    /* Padding lebih ramping */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    /* Efek bayangan lebih halus */
    transition: all 0.3s ease-in-out;
    /* Transisi halus */
    border: 1px solid #ccc;
    /* Border abu-abu halus */
}

/* Efek hover pada kontrol basemap */

.leaflet-control-layers:hover {
    background-color: rgba(255, 255, 255, 1);
    /* Sedikit lebih terang saat hover */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    /* Tambah bayangan */
    border-color: #007bff;
    /* Border menyala */
}

/* Styling teks di dalam kontrol basemap */

.leaflet-control-layers label {
    font-size: 14px;
    /* Ukuran font sedikit lebih besar */
    font-family: 'Arial', sans-serif;
    /* Gunakan font yang lebih ringan */
    font-weight: normal;
    /* Mengurangi ketebalan */
    color: #333;
    /* Warna teks lebih gelap agar mudah dibaca */
    padding: 5px 10px;
    /* Padding lebih rapat */
    transition: color 0.3s ease, transform 0.2s ease;
    /* Transisi pada hover */
}

/* Efek hover pada teks kontrol */

.leaflet-control-layers label:hover {
    color: #007bff;
    /* Warna biru terang saat hover */
    transform: scale(1.1);
    /* Sedikit membesar teks saat hover */
}

/* Checkbox layer control */

.leaflet-control-layers input[type="checkbox"] {
    margin-right: 8px;
    /* Jarak lebih rapat */
    transform: scale(1.1);
    /* Memperbesar sedikit checkbox */
}

/* Focus outline checkbox */

.leaflet-control-layers input[type="checkbox"]:focus {
    outline: 2px solid #007bff;
    /* Menambahkan outline biru saat fokus */
    outline-offset: 2px;
}

/* State aktif kontrol basemap */

.leaflet-control-layers .leaflet-control-layers-selector:active {
    background-color: rgba(0, 123, 255, 0.1);
    /* Efek saat diklik */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Efek bayangan */
}

/* =========================================================
   KONTROL ZOOM
   ========================================================= */

.leaflet-control-zoom {
    top: 55px !important;
    /* Geser kontrol lebih ke bawah dari navbar */
    background-color: #ffffff;
    /* Latar belakang putih */
    border: 1px solid #007bff;
    /* Border biru lebih tipis */
    border-radius: 1px;
    /* Sudut lebih sedikit membulat */
    padding: 1px 2px;
    /* Padding lebih ramping */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* Bayangan lebih halus */
    transition: all 0.3s ease;
    /* Efek transisi halus */
}

/* Efek hover pada kontrol zoom */

.leaflet-control-zoom:hover {
    background-color: #007bff;
    /* Ubah latar belakang menjadi biru saat hover */
    border-color: #0056b3;
    /* Border lebih gelap saat hover */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    /* Tambah bayangan saat hover */
}

/* Tombol zoom in/out */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    font-size: 4px;
    /* Ukuran font lebih kecil */
    color: #007bff;
    /* Warna biru untuk tombol zoom */
    background-color: transparent;
    /* Latar belakang transparan */
    border: none;
    /* Menghapus border default */
    cursor: pointer;
    /* Menambahkan kursor pointer */
    transition: color 0.3s ease, transform 0.2s ease;
    /* Transisi warna tombol */
}

/* Efek hover tombol zoom */

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
    color: #ffffff;
    /* Warna teks menjadi putih saat hover */
}

/* Efek aktif tombol zoom */

.leaflet-control-zoom-in:active,
.leaflet-control-zoom-out:active {
    transform: scale(0.9);
    /* Efek memperkecil tombol saat diklik */
    transition: transform 0.1s ease-in;
    /* Efek transisi saat tombol diklik */
}

#map {
    height: 100%;
    /* Pastikan peta mengisi seluruh layar */
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Hilangkan overflow */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#map-title {
    position: relative;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
}

.legend {
    position: absolute;
    bottom: 20px;
    left: 10px;
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    line-height: 18px;
    color: #555;
    width: 420px;
    max-height: 70vh;
    /* Maksimum 70% dari tinggi viewport */
    overflow-y: auto;
    /* Aktifkan scroll vertikal */
    pointer-events: auto;
    /* Memastikan legenda dapat diinteraksi */
}

.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
}

.legend-layer {
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.legend-layer:hover {
    color: #007bff;
}

.legend-layer-content {
    display: none;
    margin-left: 10px;
}

.legend-layer.open .legend-layer-content {
    display: block;
}

.legend.leaflet-control {
    right: auto;
    bottom: 10px;
    /* Adjust this value to move it up from the bottom if needed */
}

#header {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    background-color: none;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 18px;
    color: white;
    box-shadow: none;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
}

#pu-logo {
    height: 30px;
    /* Adjust logo size as needed */
    margin-right: 10px;
    /* Space between logo and text */
}

/* =========================================================
   NAVIGATION BAR
   ========================================================= */

.navbar {
    width: 100%;
    background-color: #003366;
    /* Dark blue background */
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    top: 0;
    z-index: 1000;
}

.navbar img {
    height: 40px;
    /* Adjust logo size */
    margin-right: 10px;
}

.navbar span {
    font-size: 20px;
    font-weight: bold;
}

.nav-links {
    margin-left: auto;
    display: flex;
    gap: 15px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
}

.nav-links a:hover {
    background-color: #00509e;
    /* Lighter blue on hover */
}

table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 9px;
    /* Ukuran font diperkecil */
    margin: 0 auto;
    /* Membuat tabel terpusat */
}

th,
td {
    padding: 6px;
    /* Padding lebih proporsional */
    text-align: left;
    vertical-align: top;
    /* Menyelaraskan teks ke atas */
    border: 1px solid #ccc;
    /* Warna border lebih lembut */
}

th {
    background-color: #e9ecef;
    /* Warna header tabel lebih halus */
    font-weight: bold;
    /* Menambahkan tebal pada header */
    text-align: center;
    /* Header teks di tengah */
}

td {
    word-break: break-word;
    /* Membungkus teks panjang */
    background-color: #f9f9f9;
    /* Warna background untuk baris */
}

tr:nth-child(even) td {
    background-color: #f2f2f2;
    /* Memberikan pola bergaris untuk baris */
}

.leaflet-popup-content {
    max-width: 300px;
    /* Memperbesar ukuran maksimum popup */
    overflow: auto;
    /* Tambahkan scrollbar jika konten terlalu besar */
    padding: 10px;
    /* Memberikan ruang tambahan di dalam popup */
}

.popup-button {
    display: block;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #28a745;
    /* Warna hijau yang lebih jelas */
    color: white;
    /* Tulisan putih untuk kontras */
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-size: 10px;
    font-weight: bold;
    /* Menambahkan penegasan pada teks */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* Menambahkan efek bayangan */
}

.popup-button:hover {
    background-color: #218838;
    /* Warna hijau lebih gelap untuk efek hover */
    color: #f8f9fa;
    /* Sedikit lebih terang untuk tulisan hover */
}

/* =========================================================
   LEGEND SYMBOL
   ========================================================= */

.triangle-symbol {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid red;
    /* Warna default, akan ditimpa oleh inline style */
    margin-right: 8px;
    display: inline-block;
}

.symbol-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 kolom */
    gap: 10px;
    /* Jarak antar simbol */
    margin-top: 10px;
}

.symbol-container>div {
    display: flex;
    align-items: center;
}

/* =========================================================
   ANIMASI MARKER
   ========================================================= */

.blinking-icon img {
    animation: blinking 1.5s infinite;
    /* Efek kedap-kedip */
}

/* Keyframes blinking marker */

@keyframes blinking {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    /* Awal: Normal */
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
    /* Tengah: Transparan dan lebih besar */
    100% {
        opacity: 1;
        transform: scale(1);
    }
    /* Akhir: Kembali normal */
}

.leaflet-marker-icon img {
    filter: drop-shadow(0 0 2px white) drop-shadow(0 0 4px white);
}

/* =========================================================
   GEOCODER CONTROL
   ========================================================= */

.leaflet-control-geocoder {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    background-color: #fff;
    border-radius: 4px;
    font-family: Arial, sans-serif;
}

#map .leaflet-control-geocoder {
    margin-top: 180px;
    /* Adjust this value */
}

/* =========================================================
   HOVER FEATURE LABEL
   ========================================================= */

.hover-feature-label-box {
    position: relative;
    transform: translate(-50%, -50%);
    background: rgba(15, 47, 95, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(6, 20, 40, 0.22);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

/* =========================================================
   BOTTOM DASHBOARD
   ========================================================= */

.bottom-dashboard {
    position: absolute;
    left: calc(50% + 60px);
    right: auto;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 950;

    /* Fallback size.
       Desktop besar dikunci di @media (min-width: 1281px). */
    width: min(620px, calc(100% - 620px));
    max-height: 45vh;

    background: rgba(255, 255, 255, 0.97);
    border-radius: 14px;
    border: 1px solid rgba(15, 47, 95, 0.12);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    overflow: hidden;

    display: flex;
    flex-direction: column;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.bottom-dashboard.is-hidden {
    display: none;
}

.bottom-dashboard__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;

    padding: 12px 16px;
    background: rgba(15, 47, 95, 0.05);
    border-bottom: 1px solid rgba(15, 47, 95, 0.08);
    flex-shrink: 0;
}

#bottom-dashboard-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f2f5f;
    line-height: 1.3;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#bottom-dashboard-close {
    width: 28px;
    height: 28px;

    border: none;
    background: rgba(15, 47, 95, 0.08);
    border-radius: 50%;

    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #0f2f5f;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

#bottom-dashboard-close:hover {
    background: rgba(15, 47, 95, 0.16);
}

.bottom-dashboard__content {
    position: relative;
    padding: 14px 16px;

    /* Data banyak akan lanjut ke kolom kanan */
    overflow-x: auto;
    overflow-y: auto;

    font-size: 14px;
    color: #1f2937;

    /* Tinggi area informasi dibatasi sekitar 3 baris data */
    max-height: calc(45vh - 58px);
}

.bottom-dashboard__content:has(.bottom-dashboard__actions) {
    padding-right: 220px;
}

.bottom-dashboard__grid {
    display: grid;

    /* Maksimal 3 baris, lalu otomatis tambah kolom ke kanan */
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 300px);

    gap: 10px 18px;
    align-items: start;

    /* Supaya kolom tambahan bisa discroll horizontal */
    width: max-content;
    min-width: 100%;
}

.bottom-dashboard__item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bottom-dashboard__label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.bottom-dashboard__value {
    font-size: 14px;
    color: #111827;
    word-break: break-word;
    line-height: 1.35;
}

.bottom-dashboard__empty,
.bottom-dashboard__loading,
.bottom-dashboard__error {
    color: #4b5563;
}

.bottom-dashboard__actions {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);

    margin-top: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.bottom-dashboard__button {
    display: inline-block;
    padding: 10px 14px;

    background: #0f2f5f;
    color: #ffffff;
    text-decoration: none;

    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;

    transition: background 0.2s ease, transform 0.2s ease;
}

.bottom-dashboard__button:hover {
    background: #17427f;
    transform: translateY(-1px);
}

/* Tablet / layar sedang */
@media (max-width: 1024px) {
    .bottom-dashboard {
        left: calc(50% + 50px);
        width: min(680px, calc(100% - 220px));
    }

    .bottom-dashboard__grid {
        grid-auto-columns: minmax(170px, 210px);
    }
}

/* =========================================================
   FILTER POLA ALIRAN DAS
   ========================================================= */

.filter-das-panel {
    position: fixed;
    right: 18px;
    bottom: 58px;
    z-index: 980;

    width: 260px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 10px;
    border: 1px solid rgba(15, 47, 95, 0.12);
    padding: 12px;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    font-family: Arial, sans-serif;
    font-size: 13px;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.filter-das-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f2f5f;
    margin-bottom: 8px;
}

.filter-das-select {
    width: 100%;
    padding: 7px 8px;
    margin-bottom: 8px;

    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #ffffff;

    font-size: 13px;
    color: #111827;
}

.filter-das-actions {
    display: flex;
    gap: 6px;
}

.filter-das-actions button {
    flex: 1;
    padding: 7px 8px;

    border: none;
    border-radius: 6px;

    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

#apply-filter-pola {
    background: #0f2f5f;
    color: #ffffff;
}

#apply-filter-pola:hover {
    background: #17427f;
}

#reset-filter-pola {
    background: #e5e7eb;
    color: #111827;
}

#reset-filter-pola:hover {
    background: #d1d5db;
}

/* Responsive filter DAS */
@media (max-width: 900px) {
    .filter-das-panel {
        right: 12px;
        bottom: 72px;
        width: 230px;
        padding: 10px;
        font-size: 12px;
    }

    .filter-das-title {
        font-size: 13px;
    }

    .filter-das-select,
    .filter-das-actions button {
        font-size: 12px;
        padding: 6px;
    }
}

/* Mobile/touch: naikkan agar tidak menabrak bottom dashboard */
@media (max-width: 1000px) and (pointer: coarse) {
    .filter-das-panel {
        right: 8px;
        bottom: calc(28vh + 34px);
        width: 220px;
        z-index: 980;
    }
}

@media (max-width: 480px) {
    .filter-das-panel {
        right: 8px;
        bottom: calc(48vh + 24px);
        width: min(220px, calc(100vw - 16px));
    }
}

/* =========================================================
   RESPONSIVE OVERRIDES - WEBGIS
   ========================================================= */

/* Perbaikan umum */
* {
    box-sizing: border-box;
}

/* Fix typo lama: .legend.leaflet-control right: 52x tidak valid */
.legend.leaflet-control {
    right: auto;
}

/* Desktop besar - dashboard position locked */
@media (min-width: 1281px) {
    .legend {
        width: 420px;
        max-width: 420px;
        max-height: 72vh;
    }

    .bottom-dashboard {
        left: calc(50% + 50px);
        width: min(720px, calc(100% - 700px));
        max-height: 45vh;
    }

    .bottom-dashboard__content {
        max-height: calc(45vh - 58px);
    }

    .bottom-dashboard__grid {
        grid-auto-columns: minmax(240px, 300px);
        gap: 10px 22px;
    }
}

/* Laptop sedang */
@media (max-width: 1280px) {
    .legend {
        width: 380px;
        max-width: 380px;
        max-height: 70vh;
    }

    .bottom-dashboard {
        left: calc(50% + 100px);
        width: min(680px, calc(100% - 620px));
        max-height: 45vh;
    }

    .bottom-dashboard__content {
        max-height: calc(45vh - 58px);
    }

    .bottom-dashboard__grid {
        grid-auto-columns: minmax(220px, 280px);
    }
}

/* Laptop kecil / tablet landscape */
@media (max-width: 1100px) {
    .legend {
        width: 330px;
        max-width: 330px;
        max-height: 68vh;
        font-size: 13px;
    }

    .bottom-dashboard {
        left: calc(50% + 90px);
        width: min(620px, calc(100% - 560px));
        max-height: 44vh;
    }

    .bottom-dashboard__content {
        max-height: calc(44vh - 58px);
    }

    .bottom-dashboard__grid {
        grid-auto-columns: minmax(200px, 260px);
    }

    .bottom-dashboard__value {
        font-size: 13px;
    }
}

/* Tablet portrait */
@media (max-width: 900px) {
    .legend {
        left: 10px;
        bottom: 10px;
        width: min(320px, calc(100vw - 24px));
        max-height: 58vh;
        font-size: 13px;
    }

    .bottom-dashboard {
        left: 50%;
        right: auto;
        bottom: 12px;
        transform: translateX(-50%);
        width: calc(100vw - 36px);
        max-height: 42vh;
    }

    .bottom-dashboard__content {
        max-height: calc(42vh - 58px);
    }

    .bottom-dashboard__grid {
        grid-auto-columns: minmax(190px, 240px);
    }
}

/* Mobile / touch device - locked, tested at 980px DPR 3 */
@media (max-width: 1000px) and (pointer: coarse) {
    .legend {
        left: 8px;
        bottom: 72px;
        width: min(300px, calc(100vw - 16px));
        max-height: 48vh;
        padding: 8px;
        font-size: 12px;
        line-height: 17px;
    }

    .legend i {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }

    .symbol-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .bottom-dashboard {
        position: fixed;
        left: 320px;
        right: 8px;
        bottom: 18px;
        transform: none;
        width: auto;
        max-height: 28vh;
        border-radius: 10px;
        z-index: 99999;
    }

    .bottom-dashboard__header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 7px 10px;
    }

    #bottom-dashboard-title {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 11px;
        line-height: 1.25;
        white-space: normal;
        text-align: left;
        padding-right: 4px;
    }

    #bottom-dashboard-close {
        flex: 0 0 auto;
        width: 22px;
        height: 22px;
        font-size: 16px;
    }

    .bottom-dashboard__content {
        padding: 8px 10px 10px;
        padding-right: 10px;
        max-height: calc(28vh - 42px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .bottom-dashboard__content:has(.bottom-dashboard__actions) {
        padding-right: 10px;
    }

    .bottom-dashboard__grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        grid-auto-flow: row;
        grid-auto-columns: auto;
        width: auto;
        min-width: 0;
        gap: 8px;
    }

    .bottom-dashboard__label {
        font-size: 9px;
    }

    .bottom-dashboard__value {
        font-size: 12px;
        line-height: 1.3;
    }

    .bottom-dashboard__actions {
        position: static;
        transform: none;
        margin-top: 8px;
        justify-content: flex-start;
    }

    .bottom-dashboard__button {
        padding: 7px 10px;
        font-size: 11px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .hover-feature-label-box {
        font-size: 11px;
        padding: 5px 9px;
        max-width: 80vw;
        white-space: normal;
        text-align: center;
    }

    #header {
        left: 200px;
        transform: none;
        justify-content: flex-start;
        padding: 4px 8px;
        font-size: 14px;
        max-width: calc(100vw - 90px);
        white-space: nowrap;
    }

    #pu-logo {
        height: 24px;
        margin-right: 6px;
        flex-shrink: 0;
    }
}

/* Mobile kecil */
@media (max-width: 480px) {
    .legend {
        width: min(280px, calc(100vw - 16px));
        max-height: 48vh;
        font-size: 12px;
    }

    .bottom-dashboard {
        max-height: 48vh;
    }

    .bottom-dashboard__content {
        max-height: calc(48vh - 52px);
    }

    .bottom-dashboard__grid {
        gap: 8px;
    }
}

/* =========================================================
   GEOLOGI, HIDROGEOLOGI, DAN GEOTEKNIK
   ========================================================= */

.geo-hydro-group {
    font-family: Arial, sans-serif;
}

.geo-hydro-group-header,
.geo-hydro-layer-row {
    display: flex;
    align-items: center;
}

.geo-hydro-items {
    margin-top: 6px;
    margin-left: 20px;
}

.geo-hydro-layer-block {
    margin-bottom: 7px;
}

.geo-hydro-layer-row {
    min-height: 20px;
}

.geo-hydro-layer-symbol {
    display: inline-block;
    width: 14px;
    height: 14px;
    min-width: 14px;
    margin-right: 8px;
    border: 1px solid #666666;
    border-radius: 2px;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Panel full: hanya radio style di bawah nama layer. */
.geo-hydro-layer-details {
    margin: 3px 0 5px 44px;
    padding: 0;
    background: transparent;
    border: 0;
}

.geo-hydro-style-options {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 0;
}

.geo-hydro-style-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    font-size: 12px;
    line-height: 18px;
    color: #374151;
    cursor: pointer;
}

.geo-hydro-style-option input[type="radio"] {
    margin: 0;
    padding: 0;
    cursor: pointer;
}

/* Panel minimized: kategori lengkap dari GetLegendGraphic. */
.geo-hydro-summary-title {
    margin-top: 6px;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
}

.geo-hydro-summary-legend {
    max-width: 520px;
    margin-bottom: 10px;
    overflow-x: auto;
    background: #ffffff;
}

.geo-hydro-summary-image {
    display: block;
    width: auto;
    max-width: 520px;
    height: auto;
    background: #ffffff;
}

.geo-hydro-legend-error {
    padding: 5px 0;
    font-size: 11px;
    color: #b91c1c;
}

/* Gunakan offset yang dihitung legend.js pada perangkat sentuh. */
@media (max-width: 1000px) and (pointer: coarse) {
    body.mobile-legend-open .bottom-dashboard {
        left: var(--mobile-dashboard-left, 320px);
    }

    body.mobile-legend-closed .bottom-dashboard {
        left: 8px;
    }

    .geo-hydro-style-options {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .geo-hydro-layer-details {
        margin-left: 16px;
    }

    .geo-hydro-summary-image {
        max-width: 260px;
    }
}

/* =========================================================
   ADDITIONAL LAYER - KSPEAN WANAM
   ========================================================= */

.kspean-wanam-group {
    font-family: Arial, sans-serif;
}

.kspean-wanam-group-header,
.kspean-wanam-layer-row {
    display: flex;
    align-items: center;
}

.kspean-wanam-items {
    margin-top: 6px;
    margin-left: 20px;
}

.kspean-wanam-layer-block {
    margin-bottom: 7px;
}

.kspean-wanam-layer-row {
    min-height: 20px;
}

.kspean-wanam-layer-symbol {
    display: inline-block;
    width: 14px;
    height: 14px;
    min-width: 14px;
    margin-right: 8px;
    border: 1px solid #666666;
    border-radius: 2px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.kspean-wanam-layer-details {
    margin: 5px 0 8px 42px;
    padding: 5px 7px;
    width: fit-content;
    max-width: 355px;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.kspean-wanam-legend-image,
.kspean-wanam-summary-image {
    display: block;
    width: auto;
    max-width: 330px;
    height: auto;
    background: #ffffff;
}

.kspean-wanam-legend-error {
    padding: 5px 0;
    font-size: 11px;
    color: #b91c1c;
}

.kspean-wanam-summary-title {
    margin-top: 7px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #374151;
}

.kspean-wanam-summary-legend {
    max-width: 520px;
    margin-bottom: 10px;
    overflow-x: auto;
    background: #ffffff;
}

.kspean-wanam-summary-image {
    max-width: 520px;
}

@media (max-width: 1000px) and (pointer: coarse) {
    .kspean-wanam-layer-details {
        margin-left: 16px;
        max-width: 250px;
    }

    .kspean-wanam-legend-image,
    .kspean-wanam-summary-image {
        max-width: 245px;
    }
}

