#map {
    height: 510px;
    width: 100%;
    padding-top: 20px;
    position: relative;
}

.map-controls {
    position: absolute;
    top:30px;
    right: 10px;
    background: white;
    padding: 10px;
    z-index: 100;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.radio-group,
.layer-group {
    margin-bottom: 10px;
}

.radio-group p,
.layer-group p {
    margin: 5px 0;
}

.layer-group label {
    margin-left: 5px;
}

.popup-content {
    padding: 0;
    min-width: 500px;
    max-width: 700px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    word-wrap: break-word;
}

.popup-header {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
}

.popup-header h4 {
    color: #2c3e50;
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.popup-body {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.foto-container {
    flex: 0 0 80px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.foto-sarpras {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: #f8f9fa;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.info-item i {
    width: 20px;
    margin-right: 10px;
    color: #3498db;
    font-size: 0.9rem;
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-content label {
    display: block;
    color: #7f8c8d;
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.info-content p {
    margin: 0;
    color: #2c3e50;
    font-size: 0.85rem;
    line-height: 1.3;
    word-wrap: break-word;
}

/* Styling untuk kondisi terbaru */
.info-item.kondisi-terbaru {
    background: #e8f5e8 !important;
    border-left: 4px solid #28a745;
}

.info-item.kondisi-terbaru .info-content label {
    color: #28a745;
    font-weight: 600;
}

.info-item.kondisi-terbaru .info-content p {
    color: #155724;
    font-weight: 500;
}

/* Styling untuk pesan tidak ada data */
.info-item.no-data {
    background: #fff3cd !important;
    border-left: 4px solid #ffc107;
}

.info-item.no-data .info-content label {
    color: #856404;
    font-weight: 600;
}

.info-item.no-data .info-content p {
    color: #856404;
    font-style: italic;
}

.popup-footer {
    padding: 15px;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.popup-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#popup {
    position: absolute;
    background-color: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    padding: 0;
    border-radius: 10px;
    border: 1px solid #cccccc;
    bottom: 12px;
    left: -50px;
    min-width: 500px;
    max-width: 700px;
}

.ol-popup-closer {
    text-decoration: none;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    color: #666;
    font-size: 1.2rem;
}

.ol-popup-closer:hover {
    color: #333;
}

.parent-checkbox {
    margin-bottom: 10px;
}

.child-checkbox {
    transition: all 0.3s ease;
}

.parent-checkbox label,
.child-checkbox label {
    margin-left: 5px;
    cursor: pointer;
}

.parent-checkbox input[type="checkbox"],
.child-checkbox input[type="checkbox"] {
    cursor: pointer;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.chip-list .chip {
    display: inline-flex;
    align-items: center;
    background: #ededed;
    color: #444;
    border-radius: 16px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    box-shadow: none;
}

/* Styling untuk tabel kondisi */
.kondisi-table-container {
    margin-top: 8px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.kondisi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.kondisi-table thead {
    background-color: #3498db;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.kondisi-table th {
    padding: 8px 6px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
}

.kondisi-table td {
    padding: 6px;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.75rem;
    word-wrap: break-word;
    max-width: 120px;
}

.kondisi-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.kondisi-table tbody tr:hover {
    background-color: #e3f2fd;
}

/* Styling untuk status kondisi */
.kondisi-table .kondisi-baik {
    color: #02ff3d;
    font-weight: 500;
    background-color: #FFFDD0;
    border-radius: 3px;
    padding: 2px 4px;
}

.kondisi-table .kondisi-ringan {
    color: #fbff00;
    font-weight: 500;
    background-color: #000080;
    border-radius: 3px;
    padding: 2px 4px;
}

.kondisi-table .kondisi-sedang {
    color: #ffbf00;
    font-weight: 500;
    background-color: #fff3cd;
    border-radius: 3px;
    padding: 2px 4px;
}

.kondisi-table .kondisi-berat {
    color: #ff0019;
    font-weight: 500;
    background-color: #f8d7da;
    border-radius: 3px;
    padding: 2px 4px;
}

/* Styling untuk kondisi dalam info-item */
.info-item .info-content .kondisi-baik {
    color: #02ff3d;
    font-weight: 500;
    background-color: #FFFDD0;
    border-radius: 3px;
    padding: 2px 6px;
    display: inline-block;
}

.info-item .info-content .kondisi-ringan {
    color: #fbff00;
    font-weight: 500;
    /* background-color: #000080; */
    border-radius: 3px;
    padding: 2px 6px;
    display: inline-block;
}

.info-item .info-content .kondisi-sedang {
    color: #ffbf00;
    font-weight: 500;
    background-color: #fff3cd;
    border-radius: 3px;
    padding: 2px 6px;
    display: inline-block;
}

.info-item .info-content .kondisi-berat {
    color: #ff0019;
    font-weight: 500;
    background-color: #f8d7da;
    border-radius: 3px;
    padding: 2px 6px;
    display: inline-block;
}

.kondisi-table tbody tr:last-child td {
    border-bottom: none;
}

.table-footer {
    padding: 6px 8px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
    font-size: 0.7rem;
    color: #6c757d;
}

/* Responsive table */
@media (max-width: 480px) {
    .kondisi-table {
        font-size: 0.7rem;
    }

    .kondisi-table th,
    .kondisi-table td {
        padding: 4px 3px;
    }
}

/* Layout horizontal untuk popup irigasi dan rawa */
.popup-content.horizontal-layout {
    display: flex;
    flex-direction: row;
    min-height: 300px;
    max-height: 500px;
}

.popup-image-section {
    flex: 0 0 200px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-right: 1px solid #dee2e6;
    min-height: 200px;
}

.popup-image-section img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
}

.popup-image-section img::after {
    content: '🔍';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.popup-image-section img:hover::after {
    opacity: 1;
}

.popup-image-section img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.popup-image-section .no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    height: 100%;
}

.popup-image-section .no-image i {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.popup-image-section .no-image p {
    margin: 0;
    font-weight: 500;
}

.popup-detail-section {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 400px;
    min-width: 0;
}

/* Styling untuk scrollbar */
.popup-detail-section::-webkit-scrollbar {
    width: 6px;
}

.popup-detail-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.popup-detail-section::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.popup-detail-section::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.popup-detail-section .popup-header {
    background: none;
    padding: 0 0 15px 0;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 15px;
}

.popup-detail-section .popup-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.popup-detail-section .popup-body {
    padding: 0;
    max-height: none;
}

/* Styling khusus untuk info-item dalam layout horizontal */
.popup-content.horizontal-layout .info-item {
    margin-bottom: 10px;
    padding: 10px;
}

.popup-content.horizontal-layout .info-content p {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Styling untuk tabel kondisi dalam layout horizontal */
.popup-content.horizontal-layout .kondisi-table-container {
    max-height: 150px;
}

.popup-content.horizontal-layout .kondisi-table {
    font-size: 0.75rem;
}

.popup-content.horizontal-layout .kondisi-table th,
.popup-content.horizontal-layout .kondisi-table td {
    padding: 4px 6px;
}

/* Responsive untuk layout horizontal */
@media (max-width: 768px) {
    .popup-content.horizontal-layout {
        flex-direction: column;
        min-height: auto;
    }

    .popup-image-section {
        flex: none;
        height: 150px;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }

    .popup-detail-section {
        max-height: 300px;
    }

    #popup {
        min-width: 320px;
        max-width: 400px;
    }

    .popup-content {
        min-width: 320px;
        max-width: 400px;
    }
}

/* Modal untuk gambar */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #bbb;
    text-decoration: none;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
