/* ==========================================
   WEBGIS IBF V1.1 - FIX HEADER CENTER
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body, html { 
    margin: 0; 
    padding: 0; 
    height: 100%; 
    font-family: 'Inter', sans-serif; 
    overflow: hidden;
    background-color: #f8fafc;
    color: #0f172a;
}

#map { 
    height: 100vh; 
    width: 100%; 
    z-index: 1;
}

/* --- HEADER UTAMA (TERKUNCI PRESISI DI TENGAH ATAS) --- */
.map-header {
    position: absolute !important; 
    top: 15px !important; 
    left: 50% !important; 
    right: auto !important;
    transform: translateX(-50%) !important; /* Geser 50% ke kiri dari lebarnya sendiri */
    margin: 0 !important;
    
    background: #ffffff; 
    border: 1px solid #cbd5e1;
    padding: 10px 24px;
    border-radius: 8px; 
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    text-align: center !important; 
    z-index: 1000 !important; 
    
    width: max-content;
    min-width: 360px;
    max-width: calc(100vw - 400px); /* Mencegah bentrok dengan logo/menu di samping */
    box-sizing: border-box;
}

.map-header h3 { 
    margin: 0; 
    font-size: 11px; 
    letter-spacing: 0.5px;
    font-weight: 600; 
    color: #64748b; 
    text-transform: uppercase;
}

.map-header h1 { 
    margin: 3px 0; 
    font-size: 16px; 
    font-weight: 700; 
    color: #000000; 
    line-height: 1.3;
}

.map-header p { 
    margin: 2px 0 0 0; 
    font-size: 12px; 
    color: #0284c7; 
    font-weight: 600; 
}

/* --- LOGO INSTANSI --- */
.logo-container {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-instansi {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* --- TOOLTIP PETA --- */
.map-tooltip {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #000000 !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

/* --- RESPONSIF SMARTPHONE --- */
@media screen and (max-width: 768px) {
    .map-header {
        top: 10px !important; 
        left: 50% !important;
        transform: translateX(-50%) !important;
        min-width: auto;
        width: calc(100vw - 24px); 
        max-width: 100vw;
        padding: 8px 12px; 
        border-radius: 8px;
    }

    .map-header h3 { font-size: 9px; }
    .map-header h1 { font-size: 12px; margin: 2px 0; }
    .map-header p { font-size: 10px; }

    .logo-container { 
        display: none; 
    } 
}

/* --- PAKSA VISIBILITAS GARIS ADMINISTRASI & TEMBUS KLIK --- */
.leaflet-pane.leaflet-adminBoundariesPane-pane {
    pointer-events: none !important;
}

.leaflet-pane.leaflet-adminBoundariesPane-pane svg path {
    pointer-events: none !important;
    stroke-linecap: round;
    stroke-linejoin: round;
}
