/* map.css */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

#map {
    /* however you want your map to fill space */
    width: 100%;
    height: 100vh;
    float: left; /* or display: flex, etc. */
}

/* Side pane pinned to right edge of the browser window */
#side-pane {
    position: fixed;
    top: 0;
    right: 0;
    width: 30%;             /* or a fixed width like 400px */
    height: 100vh;          /* full viewport height */
    overflow-y: auto;

    background-color: #f8f9fa;
    border-left: 1px solid #ddd;
    padding: 1rem;

    /* start off-screen by shifting its own width to the right */
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

/* Slide it in when .open is added */
#side-pane.open {
    transform: translateX(0);
}

@media (max-width: 768px) {
    #side-pane {
        transform: translateX(100%);
    }
}

#side-pane.open {
    transform: translateX(0%);
}

.resizer {
    width: 5px;
    height: 100%;
    background-color: #ccc;
    position: absolute;
    top: 0;
    left: 0;
    cursor: ew-resize; /* Horizontal resize cursor */
}

.dock-button {
    position: absolute; /* Relative to the side pane */
    top: 0px;
    right: 10px; /* Aligns to the right edge of the side pane */
    width: 35px;
    height: 35px;
    background-color: #ffffff;
    color: #ff0000;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    text-align: center;
    font-size: 18px;
    line-height: 35px;
    z-index: 1000; /* Ensures it stays above other elements */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

.dock-button:hover {
    background-color: #ff0000;
    color: #ffffff;
}

.section-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.3rem;
}

#electoral-division-table,
#local-electoral-area-table,
#constituency-aggregation-table {
    width: 100% !important;
    table-layout: fixed;
}

#electoral-division-table th:nth-child(1),
#electoral-division-table td:nth-child(1),
#local-electoral-area-table th:nth-child(1),
#local-electoral-area-table td:nth-child(1),
#constituency-aggregation-table th:nth-child(1),
#constituency-aggregation-table td:nth-child(1) {
    width: 50%;
}

#electoral-division-table th:nth-child(2),
#electoral-division-table td:nth-child(2),
#local-electoral-area-table th:nth-child(2),
#local-electoral-area-table td:nth-child(2),
#constituency-aggregation-table td:nth-child(2),
#constituency-aggregation-table th:nth-child(2) {
    width: 20%;
}

#electoral-division-table th:nth-child(3),
#electoral-division-table td:nth-child(3),
#local-electoral-area-table th:nth-child(3),
#local-electoral-area-table td:nth-child(3),
#constituency-aggregation-table td:nth-child(3),
#constituency-aggregation-table th:nth-child(3) {
    width: 15%;
}

#electoral-division-table th:nth-child(4),
#electoral-division-table td:nth-child(4),
#local-electoral-area-table th:nth-child(4),
#local-electoral-area-table td:nth-child(4),
#constituency-aggregation-table td:nth-child(4),
#constituency-aggregation-table th:nth-child(4) {
    width: 15%;
}

#loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    display: none; /* hidden by default */
    z-index: 5000;
}

.constituency-label {
    font-size: 24px;
    color: black;
    font-weight: bold;
    text-shadow:
            1px 1px 0 white,
            -1px 1px 0 white,
            1px -1px 0 white,
            -1px -1px 0 white;
}

#email-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ffffff;
    color: #000000;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    z-index: 9999;
}
