/* layout */
html, body {
    height: 100%;
    margin: 0;
}

/* header */
#header {
    height: 60px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: flex-start;   /* pindah ke kiri */
    padding-left: 30px;            /* kasih jarak dari kiri */
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 22px;
    color: #2c7be5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Map */
#map {
    height: calc(100% - 60px);
}

/* Home Button */
#home-btn {
    position: absolute;
    bottom: 100px;
    right: 10px;

    width: 32px;              /* ukuran kotak */
    height: 32px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: white;
    border-radius: 6px;
    cursor: pointer;

    font-size: 15px;          /* perbesar icon */
    
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 1000;
}

#home-btn:hover {
    background: #d0cece;
}


/* ----------------- */
/* Navigation Button */
/* ----------------- */
#nav-buttons {
    position: absolute;
    top: 70px;                 /* bawah header */
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    gap: 45px;

    padding: 8px 16px;
    border-radius: 40px;

    /* background: rgba(255,255,255,0.9);   */
    /* backdrop-filter: blur(6px);           */

    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* BUTTON BASE */
.nav-btn {
    padding: 8px 20px;
    border-radius: 25px;
    border: 1px solid #d0d0d0;

    background-color: #f8f7f7;
    color: #333;

    font-weight: 600;
    font-size: 13px;

    cursor: pointer;

    transition: background-color 0.2s ease;  /* 🔥 hanya warna */
    outline: none;                           /* 🔥 hilangkan focus border */
}

/* HOVER */

.nav-btn:hover {
    background-color: #dcdcdc;
}

/* ACTIVE STATE */
.nav-btn.active {
    background-color: #0b2c3d;
    color: white;
    border: none;
}

/* REMOVE CLICK EFFECT */
.nav-btn:active {
    transform: none;   /* 🔥 hilangkan efek membesar */
}

/* ----------------- */
/* SIDEBAR */
/* ----------------- */
#sidebar {
    position: absolute;
    top: 100px;        /* bawah header + nav */
    left: 10px;

    width: 300px;
    height: 480px;

    background: white;
    padding: 15px;
    border-radius: 20px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;

    overflow: hidden;   /* scroll kalau konten panjang */
    display: none;   /* default disembunyikan */
}

/* ----------------------- */
/* Level 1 Analyisis Label */
/* ----------------------- */
.rank-label {
    background: white;
    border-radius: 50%;
    border: 2px solid #08306b;
    color: #08306b;

    width: 24px;
    height: 24px;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 12px;
    font-weight: bold;

    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}


/* ------------------------------- */
/* Level 1 Analyisis Sidebar Table */
/* ------------------------------- */
#sidebar table {
    border-collapse: collapse;
}

#sidebar th, #sidebar td {
    padding: 6px;
    border: 1px solid #ddd;
}

#sidebar tr:nth-child(even) {
    background-color: #f2f2f2;
}

#sidebar tr:hover {
    background-color: #dbeafe;
    cursor: pointer;
}


/* container scroll horizontal + vertical */
.table-container {
    height: 410px;
    overflow-y: auto;
    overflow-x: auto;   /* horizontal scroll */
    margin-top: 10px;
}

/* table styling */
.data-table {
    border-collapse: collapse;
    font-size: 11px;
    min-width: 7    px;   /* supaya bisa geser ke samping */
}

/* header */
.data-table th {
    background: #0b2c3d;
    color: white;
    padding: 6px;
    text-align: center;

    position: sticky;
    top: 0;
    z-index: 2;
}

/* cell */
.data-table td {
    padding: 5px;
    border: 1px solid #ccc;
    text-align: center;
}

/* 🔥 khusus kolom Kelurahan */
.sticky-col {
    text-align: left !important;
    padding-left: 8px;
}

/* optional hover */
.data-table tr:hover {
    background: #e3f2fd;
}


/* ===================== */
/* FREEZE KOLOM KELURAHAN */
/* ===================== */

.sticky-col {
    position: sticky;
    left: 0;
    background: white;        /* wajib supaya tidak tembus */
    z-index: 3;
}

/* header lebih atas */
.data-table th.sticky-col {
    z-index: 4;
}

/* optional biar ada efek garis */
.sticky-col {
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

/* ===================== */
/* FOOTER COPYRIGHT */
/* ===================== */
#footer {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);

    font-size: 12px;
    color: rgba(0,0,0,0.6);

    background: rgba(255,255,255,0.7);
    padding: 4px 10px;
    border-radius: 10px;

    backdrop-filter: blur(3px);
    z-index: 1000;
}