body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
}

.divider {
    height: 1px;
    border: none;
    border-bottom: 1px solid #eeeeee6a;
    margin: 1rem 0;
}

.spacing {
    margin: 1rem 0 0 0;
    border: none;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    z-index: 1;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 40%;
    min-width: 200px;
    max-width: 400px;
    background-color: rgba(255, 255, 255, 0.9);
    overflow-y: auto;
    padding: 1rem;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.map-legend {
    --legend-left: calc(clamp(200px, 40%, 400px) + 48px);
    --legend-bottom: 6px;
    --legend-top: 16px;
    --legend-width: 400px;
    position: absolute;
    top: var(--legend-top);
    bottom: var(--legend-bottom);
    left: var(--legend-left);
    height: 48px;
    width: var(--legend-width);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.map-overlay h2 {
    font-size: 1.5rem;
    margin: 0 0 1rem;
}

.map-overlay-section {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.legend .bar {
    height: 10px;
    width: 100%;
    background: linear-gradient(to right, #fde0c5, #eb4a40);
    margin-top: 0.5rem;
}

#month-input,
#layer-input {
    width: 100%;
    margin-top: 0.5rem;
}

ul {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

@media (max-width: 655px) {
    .map-overlay {
        width: calc(100% - 32px);
        max-width: none;
        height: 50%;
        top: 50%;
        right: 0;
        left: 0;
        bottom: 0;
    }

    .map-legend {
        --legend-left: 6px;
        --legend-bottom: none;
        --legend-top: 6px;
        --legend-width: 200px;
    }

    #map {
        height: 50%;
    }
}

/*   slider */
.slider-container {
    position: relative;
    width: 100%;
    margin: 8px 0;
}

.slider-container input[type='range'] {
    appearance: none;
    width: 100%;
    background: transparent;
    position: relative;
    z-index: 2;
}

/*  track */
.slider-container input[type='range']::-webkit-slider-runnable-track {
    height: 8px;
    background: #ddd;
    border-radius: 4px;
}

.slider-container input[type='range']::-moz-range-track {
    height: 8px;
    background: #ddd;
    border-radius: 4px;
}

.slider-container input[type='range']::-ms-track {
    height: 8px;
    background: transparent;
    border-color: transparent;
    color: transparent;
}

/* thumb */
.slider-container input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    background: #4285f4;
    border-radius: 50%;
    margin-top: -4px;
    /* Center the thumb */
    cursor: pointer;
}

.slider-container input[type='range']::-moz-range-thumb {
    height: 16px;
    width: 16px;
    background: #4285f4;
    border-radius: 50%;
    cursor: pointer;
}

.slider-container input[type='range']::-ms-thumb {
    height: 16px;
    width: 16px;
    background: #4285f4;
    border-radius: 50%;
    cursor: pointer;
}

/* Remove focus outline */
.slider-container input[type='range']:focus {
    outline: none;
}

/* Optional: Change track color when focused */
.slider-container input[type='range']:focus::-webkit-slider-runnable-track {
    background: #ccc;
}

.slider-container input[type='range']:focus::-moz-range-track {
    background: #ccc;
}

/* Custom select styles */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
    padding: 0.5rem;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tZG93biI+PHBhdGggZD0ibTYgOSA2IDYgNi02Ii8+PC9zdmc+');
    background-repeat: no-repeat;
    background-position: right 0.4rem top 50%;
    cursor: pointer;
    transition: border 0.3s ease;
}

select:focus {
    outline: none;
    border: 1px solid #eb4a40;
}

select:hover {
    border: 1px solid #eb4a40;
}

select option {
    background-color: #fff;
    color: #333;
    padding: 0.5rem;
    font-size: 14px;
}

.attribute-table {
    table-layout: fixed;
}

.attribute-table td {
    overflow: hidden;
}

.attribute-table thead {
    font-weight: bold;
}

.attribute-table tr :nth-last-child(1) {
    text-align: right;
}
