/* ==========================================
   POPUP & POINT IMPACT REPORT - CLEAN LIGHT STYLE
   ========================================== */

/* Kustomisasi Wrapper Kotak Popup Leaflet (Background Putih) */
.leaflet-popup-content-wrapper,
.impact-popup {
    background: #ffffff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #cbd5e1;
    border-radius: 12px !important;
    padding: 0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}

/* Ujung Panah Popup */
.leaflet-popup-tip {
    background: #ffffff !important;
    border: 1px solid #cbd5e1;
}

/* Isi Konten Popup */
.leaflet-popup-content {
    margin: 14px 18px !important;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
    max-height: 420px;
    overflow-y: auto;
    width: 330px !important;
    color: #0f172a;
}

/* Tombol Close Popup (X) */
.leaflet-popup-close-button {
    color: #64748b !important;
    padding: 8px !important;
}
.leaflet-popup-close-button:hover {
    color: #ef4444 !important;
}

/* Header Ringkasan Laporan Titik Dampak */
.popup-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.popup-title {
    font-weight: bold;
    font-size: 13px;
    color: #0f172a;
}

.popup-subtitle {
    font-size: 11px;
    color: #475569;
    margin-top: 2px;
}

.popup-coords {
    font-size: 10px;
    color: #64748b;
    font-family: monospace;
    margin-top: 2px;
}

/* Informasi Produk */
.product-info {
    font-size: 11px;
    margin-bottom: 8px;
    color: #334155;
}

.info-label {
    color: #64748b;
}

.info-value {
    font-weight: bold;
    color: #0f172a;
}

/* Tabel Ringkasan (Teks Hitam Normal, Garis Tipis Rapi) */
.impact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-top: 4px;
}

.impact-table td {
    border: 1px solid #e2e8f0;
    padding: 5px 8px;
    color: #0f172a;
    background-color: #ffffff;
}

.impact-table .day-label {
    font-weight: 600;
    color: #475569;
    width: 38%;
}

.impact-table .date-label {
    color: #0f172a;
}

/* Indikator Level Peringatan (Mengikuti warna level warning yang dinamis) */
.badge, .level-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 10px;
}

/* Tombol Unduh Laporan PDF */
.popup-footer {
    margin-top: 10px;
}

.btn-export {
    width: 100%;
    background-color: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-export:hover {
    background-color: #e2e8f0;
    color: #000000;
}

/* ==========================================
   KUSTOMISASI KHUSUS BARIS TINGKAT STATUS (LATAR BELAKANG HITAM)
   ========================================== */

/* Targetkan baris (tr) tabel yang mengandung sel status */
.impact-table tr:has(.status-cell) td {
    background-color: #0f172a !important; /* Latar belakang hitam pekat/slate gelap */
    color: #ffffff !important;            /* Teks label baris menjadi putih */
    border-color: #334155 !important;     /* Penyesuaian garis batas agar senada */
}

/* Pastikan teks label di baris tersebut tetap terbaca jelas dengan warna putih */
.impact-table tr:has(.status-cell) .day-label {
    color: #f8fafc !important; 
}
