/* RESET DAN WADAH UTAMA */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

#container {
    height: 100vh;
}

#map {
    width: 100%;
    height: 100%;
}

/* ==================================== */
/* PANEL INFO MENGAMBANG */
/* ==================================== */

#floating-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    width: 330px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

#floating-panel.hidden {
    width: 0;
    height: 0;
    padding: 0;
    box-shadow: none;
    visibility: hidden;
}

#info-card {
    padding: 10px 15px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
    visibility: hidden;
}

#info-card.show {
    max-height: 800px;
    opacity: 1;
    visibility: visible;
}

/* ==================================== */
/* DETAIL CARD */
/* ==================================== */

.info-header-float {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.info-header-float h3 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.detail-card-float {
    padding: 10px 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-header h4 {
    font-size: 18px;
    margin: 0;
}

.data-row {
    margin-bottom: 5px;
    font-size: 14px;
}
.data-row span:first-child {
    font-weight: bold;
    display: inline-block;
    width: 90px;
    color: #555;
}

.sidebar-image-float {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.action-buttons-float {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-full-float {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
    border-radius: 4px;
    cursor: pointer;
}

.coordinates-float {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* ==================================== */
/* TOMBOL UMUM */
/* ==================================== */

.btn-sm {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 5px;
}

.btn-action {
    padding: 8px 10px;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    flex-grow: 1;
    font-size: 14px;
}
.primary {
    background-color: #f0f6ff;
    border-color: #007bff;
    color: #007bff;
}
.warning {
    background-color: #fff8e1;
    border-color: #ffc107;
    color: #ffc107;
}

/* ==================================== */
/* PANEL PETA DASAR */
/* ==================================== */

#base-map-panel {
    position: absolute;
    top: 60px;
    right: 20px;
    z-index: 900;
    width: 350px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    padding: 15px;
    display: none;
}

#base-map-panel.show {
    display: block;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.map-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.map-tile {
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 5px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.map-tile img {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    display: block;
}

.map-tile.selected {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.opacity-options {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.opacity-btn {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.opacity-btn:hover {
    background-color: #e9ecef;
}

.opacity-btn.selected {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* ==================================== */
/* KONTROL ATAS KANAN */
/* ==================================== */

.leaflet-container .leaflet-control-zoom {
    display: none;
}

.map-controls-top-right {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    align-items: center;
}

.map-control-btn {
    z-index: 800;
    padding: 10px 15px;
    background-color: white;
    border: none;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 14px;
}

.map-control-btn i {
    margin-right: 5px;
}

#custom-zoom-control {
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    border-radius: 5px;
    background-color: white;
    height: 60px;
}

#custom-zoom-control a {
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

#custom-zoom-control a:first-child {
    border-bottom: 1px solid #ccc;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

#custom-zoom-control a:last-child {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

#custom-zoom-control a:hover {
    background-color: #f4f4f4;
}