:root{
    --primary:#0b7a75;
    --primary-dark:#075e5a;
    --secondary:#0b2c5d;
    --border:#e5e7eb;
    --muted:#6b7280;
    --shadow:0 10px 35px rgba(0,0,0,.12);
}

body.modal-open{
    overflow:hidden;
}

/* =====================
   TOOLTIP
===================== */

#map-tooltip{
    position:absolute;
    z-index:99999;
    display:none;
    pointer-events:none;
}

.map-tooltip-box{
    background:#fff;
    border:1px solid var(--border);
    border-radius:12px;
    box-shadow:var(--shadow);
    padding:10px;
    min-width:150px;
    min-height:50px;
}

.map-tooltip-box h4{
    margin:0;
    font-size:14px;
    color:var(--secondary);
}

.map-tooltip-box p{
    margin:0;
    font-size:13px;
    color:var(--muted);
}

/* =====================
   OVERLAY
===================== */

#modalOverlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    z-index:9998;
    display:none;
}

#modalOverlay.active{
    display:block;
}

/* =====================
   MAIN MODAL
===================== */

#districtModal{
    position:fixed;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    width:75%;
    height:80vh;
    background:#fff;
    border-radius:16px;
    z-index:10001;
    display:none;
    overflow:hidden;
    box-shadow:0 15px 40px rgba(0,0,0,.25);
    padding:24px 24px 20px;
}

#districtModal.active{
    display:block;
}

#officeModal{
    position:fixed;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    width:min(80vw,500px);
    max-height:60vh;
    overflow:hidden !important;
    background:#fff;
    border-radius:18px;
    z-index:10001;
    box-shadow:0 20px 60px rgba(15,23,42,.25);
}

.modal-dialog{
    margin:0 !important;
}



/* =====================
   HEADER
===================== */

.modal-header-area{
    position:relative;
    padding:20px 25px;
    border-bottom:1px solid var(--border);
    background:#f8fafc;
}

#modalTitle{
    margin:0;
    font-size:20px;
    font-weight:700;
}

#modalShortInfo{
    margin-top:5px;
    color:var(--muted);
    font-size:14px;
}

#modalClose{
    position:absolute;
    top:15px;
    right:15px;
    width:40px;
    height:40px;
    border:none;
    border-radius:50%;
    background:#ef4444;
    color:#fff;
    cursor:pointer;
    font-size:20px;
}

/* =====================
   BODY
===================== */

.modal-body-area{
    height:calc(80vh - 110px);
    padding:20px;
    overflow:hidden;
}

#modalDetails{
    height:100%;
}

/* =====================
   LAYOUT
===================== */
.modal_widget{
    display:flex;
    gap:20px;
     min-height:0;
    height:100%;
    overflow:hidden;
}

.left-region{
    width:50%;
    min-width:350px;

    display:flex;
    flex-direction:column;

    border-right:1px solid var(--border);
    padding-right:12px;

    height:calc(80vh - 120px); 
    overflow:hidden;
}

.right-branch{
    width:50%;
    overflow-y:auto;
    padding-right:5px;
}

/* =====================
   SEARCH
===================== */

.branch-search-wrap{
    width:100%;
    margin-bottom:15px;
}

.branch-filter-input{
    width:80%;
    padding:12px 15px;
    border:1px solid #d1d5db;
    border-radius:10px;
    outline:none;
    font-size:13px;
    height:40px;
}

/* =====================
   BRANCH LIST
===================== */


.makers{
    list-style:none;
    margin:0;
    padding:5px 8px 0 0;

    display:flex;
    flex-wrap:wrap;
    align-content:flex-start;
    gap:8px;

    overflow-y:auto;
    overflow-x:hidden;

    flex:1;

    scrollbar-width:thin;
}

.branch-item{
    margin:0;
}

/* =====================
   BRANCH BUTTON
===================== */

.branch-btn{
    width:100%;
    min-height:32px;

    display:flex;
    align-items:center;
    gap:6px;

    padding:6px 8px;

    border:1px solid #ddd;
    border-radius:10px;

    background:#fff;
    cursor:pointer;

    transition:.2s;

    font-size:11px;
    font-weight:500;

    overflow:hidden;
}

.branch-btn span{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.branch-btn:hover{
    border-color:var(--primary);
    transform:translateY(-1px);
}

.branch-btn.active{
    background:var(--primary);
    color:#fff;
}

.branch-btn img{
    width:20px;
    height:20px;
    flex-shrink:0;
}

/* =====================
   REGION DETAILS
===================== */

.region-data-box{
    background:#fff;
    border:1px solid var(--border);
    border-radius:12px;
    overflow:hidden;
}

.popup-table{
    width:100%;
    border-collapse:collapse;
}

.popup-table td{
    padding:14px;
    border-bottom:1px solid var(--border);
}

.popup-table td:first-child{
    width:220px;
    font-weight:600;
    background:#f8fafc;
}

.popup-table tr:last-child td{
    border-bottom:none;
}

/* =====================
   OFFICE MODAL
===================== */

#officeModal .modal-content{
    border:none;
    border-radius:15px;
}

#officeModal .modal-header{
    background:var(--primary);
    color:#fff;
}

/* =====================
   CUSTOM SCROLLBAR
===================== */

.makers::-webkit-scrollbar,
.right-branch::-webkit-scrollbar{
    width:8px;
}

.makers::-webkit-scrollbar-track,
.right-branch::-webkit-scrollbar-track{
    background:#f1f5f9;
    border-radius:20px;
}

.makers::-webkit-scrollbar-thumb,
.right-branch::-webkit-scrollbar-thumb{
    background:#94a3b8;
    border-radius:20px;
}

.makers::-webkit-scrollbar-thumb:hover,
.right-branch::-webkit-scrollbar-thumb:hover{
    background:#64748b;
}

/* =====================
   MOBILE
===================== */

@media (max-width:991px){

    #districtModal{
        width:100%;
        height:100vh;
        top:0;
        left:0;
        transform:none;
        border-radius:0;
    }

    .modal-body-area{
        height:calc(100vh - 90px);
        overflow:auto;
    }

    .modal_widget{
        flex-direction:column;
        height:auto;
    }

    .left-region,
    .right-branch{
        width:100%;
        min-width:100%;
        height:auto;
        border:none;
        padding:0;
        overflow:visible;
    }

    .makers{
        grid-template-columns:1fr;
        height:auto;
        overflow:visible;
    }

    #modalTitle{
        font-size:24px;
    }
}