html, body {
    height: 100%;
    margin: 0;
}

/* Map fullscreen */
#map {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    z-index: 0;
}

/* Top bar */
#topBar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #6a7282;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2000;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.leaflet-top {
    top: 65px;
}

/* left panel container */
.left-panel {
    position: absolute;
    top: 80px;
    left: 20px;
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 1000;
}

/* detail panel */
#detailPanel {
    position: absolute;
    top: 80px;
    left: 400px;
    width: 380px;
    max-width: 90vw;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* for all panel */
.panel {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

    /* close panel */
    .panel .close-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        cursor: pointer;
        font-weight: bold;
        color: #374151;
        background: rgba(255,255,255,0.7);
        border-radius: 9999px;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        transition: background 0.2s;
    }

        .panel .close-btn:hover {
            background: rgba(255,255,255,0.95);
        }
/* panel header */
.panel-header {
    cursor: move;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* panel body */
.panel-body {
    cursor: default;
}

/* collapsed panel */
.left-panel.collapsed {
    transform: translateX(-380px);
    transition: transform 0.3s;
}

/* floating modal panel */
.modal-panel {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1500;
    display: none;
    background: rgba(255,255,255,0.92);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    cursor: move;
}

/* legend for map */
.legend {
    background: white;
    padding: 12px;
    line-height: 20px;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    font-size: 12px;
}

    .legend i {
        width: 14px;
        height: 14px;
        float: left;
        margin-right: 8px;
        opacity: 0.8;
        border-radius: 50%;
    }


/* loader for loading nlp model results */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6a7282;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
/* mobile */
@media (max-width: 768px) {

    .left-panel {
        width: 90%;
        left: 5%;
        top: 70px;
    }

    #detailPanel {
        left: 5%;
        width: 90%;
    }

    .modal-panel {
        width: 92%;
        left: 4%;
        transform: none;
    }
}
