/**
 * GIS Map Styles
 */

#map {
    height: 600px;
    width: 100%;
    border-radius: 4px;
    z-index: 1;
}

#map-admin {
    height: 700px;
    width: 100%;
    border-radius: 4px;
    z-index: 1;
}

#map-dashboard {
    height: 500px;
    width: 100%;
    border-radius: 4px;
    z-index: 1;
}

/* RT/RW Marker */
.rt-rw-marker {
    background: transparent;
    border: none;
}

.rt-rw-label {
    background-color: rgba(45, 80, 22, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Fasilitas Marker */
.fasilitas-marker {
    background: transparent;
    border: none;
}

.fasilitas-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 2px solid white;
}

/* Popup Styles */
.gis-popup {
    min-width: 200px;
}

.gis-popup h6 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 14px;
}

.gis-popup p {
    margin: 4px 0;
    color: #666;
    font-size: 12px;
}

.gis-popup img {
    border-radius: 4px;
    margin-top: 8px;
}

/* Map Controls */
.leaflet-control-layers {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.leaflet-control-zoom {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Drawing Tools */
.leaflet-draw-toolbar {
    margin-top: 10px;
}

.leaflet-draw-toolbar a {
    background-color: #fff;
    border-bottom: 1px solid #ccc;
}

.leaflet-draw-toolbar a:hover {
    background-color: #f4f4f4;
}

/* Map Container */
.map-container {
    position: relative;
    margin-bottom: 20px;
}

.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 12px;
}

.map-legend h6 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: bold;
}

.map-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.map-legend-color {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 3px;
    border: 1px solid #ccc;
}

/* Layer Control */
.layer-control-panel {
    background: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.layer-control-panel h6 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
}

.layer-control-panel .form-check {
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    #map, #map-admin, #map-dashboard {
        height: 400px;
    }
    
    .map-legend {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 10px;
    }
}

/* Loading Spinner */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.map-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

