#map {
    position: absolute;
    top: 0%;
    left: 0%;
    right: 0%;
    bottom: 0%;
    width: 100%;
    height: 100%;
}

/* disclaimer popup */
#overlay {
    background-color: rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 0%;
    left: 0%;
    right: 0%;
    bottom: 0%;
    z-index: 3;
}

#popup {
    max-height: 90%;
    overflow-y: auto;
    /* add a vertical scrollbar */
    background-color: #fff;
    padding: 6ch 2ch 1ch 2ch;
    left: 50%;
    top: 50%;
    width: 40%;
    transform: translate(-50%, -50%);
    font-family: "Poppins", sans-serif;
    text-align: center;
    border-radius: 0.5em;
    position: relative;
}

#popup>h3 {
    margin-top: 7em;
}

#popup>p {
    font-size: 1em;
    text-align: center;
    margin: 1em 0em;
    line-height: 1.5em;
}

#popup>button {
    width: 150px;
    position: relative;
    margin: 1ch auto;
    text-align: center;
    background-color: #0f72e5;
    border-radius: 2em;
    border-color: transparent;
    color: #ffffff;
    text-decoration: none;
    padding: 1ch 0;
    cursor: pointer;
}

#popup>button:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: transparent;
    color: black;
}

/* open sidepanel button */
#openbtn {
    position: absolute;
    top: 0.65em;
    left: 0.65em;
    max-height: 2.5em;
    padding: 0.75em 0.8em;
    font-size: 1em;
    cursor: pointer;
    background-color: #fff;
    color: rgba(26, 34, 36);
    border: none;
    border-radius: 0.3em;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

#openbtn:hover {
    background-color: #f4f4f4;
}

/* logo */
#logo {
    /* hardcoded margin values and height */
    top: 6em;
    left: 50%;
    display: block;
    position: absolute;
    margin: -4.9em;
    height: 9em;
    aspect-ratio: 300/150;
    background-image: url('./img/logo.png');
    background-repeat: no-repeat;
    background-size: contain;
}

#title {
    top: 1em;
    left: 50%;
    position: relative;
    background-color: #fff;
    width: 24%;
    transform: translate(-50%, -50%);
    font-size: 25;
    font-weight: bold;
    font-family: "Poppins", sans-serif;
    text-align: center;
    padding: 0.15em;
    color: rgba(26, 34, 36);
    border-radius: 0.3em;
    /* box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1); */
}

/* sidepanel */
.sidepanel {
    position: absolute;
    top: 3.75em;
    left: 0.65em;
    bottom: calc(0.5% + 30px);
    font-family: "Poppins", sans-serif;
    width: 15em;
    background-color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    transition: 0.5s ease;
    border: none;
    border-radius: 0.3em;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.sidepanel .heading {
    font-size: 1rem;
    font-weight: bold;
    text-align: left;
    color: #333;
    padding-bottom: 0.1em;
    margin: 1.5ch 0 1ch 1ch;
}

.sidepanel .layer-group-heading {
    font-size: 0.9em;
    font-weight: bold;
    margin: 0 0 0 0.5ch;
    padding-top: 1.1ch;
    padding-bottom: 0.7ch;
    padding-left: 0.7ch;
    border-top: 2px solid rgba(150, 150, 150);
    border-bottom: 2px solid rgba(158, 163, 167, .2);
}

.sidepanel .menu {
    width: 100%;
    padding-left: 0.5ch;
}

.sidepanel .menu .item {
    position: relative;
    cursor: pointer;

    margin-left: 1ch;
    padding-top: 0.6ch;
    padding-bottom: 0.6ch;
    font-size: 0.8em;
    color: rgba(26, 34, 36);
    text-decoration: solid;
    display: block;

    border-top: 0.5px solid rgba(158, 163, 167, .2);
    transition: 0.3s;
}

.sidepanel .menu .item:hover {
    color: rgba(26, 34, 36);
    letter-spacing: 0.05ch;
    background-color: #f4f4f4;
}

.sidepanel .menu .item .dropdown {
    transition: 0.3s ease;
}

.sidepanel .menu .item .legend {
    padding-left: 3ch;
    padding-top: 1ch;
}

.sidepanel .menu .item .legend span {
    padding-top: 0.35ch;
    display: flex;
    align-items: center;
}

/*-----------supporting methods----------------*/
.rotate {
    transform: rotate(90deg);
}

/* close sidepanel button */
.sidepanel .closebtn {
    position: absolute;
    color: rgba(26, 34, 36);
    font-size: 1.4em;
    top: 0.7ch;
    right: 1ch;
    cursor: pointer;
}

.sidepanel .closebtn:hover {
    position: absolute;
    cursor: pointer;
    font-size: 1.5em;
    color: rgba(26, 34, 36, .7);
}

/* -------------------Mapbox style-------------------- */
/* .mapboxgl-ctrl-logo, .mapboxgl-ctrl-attrib-button, .mapboxgl-ctrl-attrib {
    display: none !important;
} */

.mapboxgl-popup-close-button {
    color: #fff;
    cursor: pointer;
    top: -3%;
    font-size: 25px;
}

.mapboxgl-popup-content {
    font: 400 15px/22px 'Source Sans Pro', 'Helvetica Neue', sans-serif;
    width: 220px;
    padding: 0;
}

/* top bar */
.mapboxgl-popup-content h1 {
    background: #312e2e;
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    border-radius: 3px 3px 0 0;
    margin: 0;
    padding: 0;
}

/* header */
.mapboxgl-popup-content h2 {
    background: #fff;
    color: #312e2e;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: 12px;
    margin: 0 0 0 0;
    padding: 5px;
}

hr {
    border: 0.5px solid #312e2ec0;
    margin-top: 0;
    margin-bottom: 5px;
    margin-right: 5px;
    margin-left: 5px;
}

.mapboxgl-popup-content td {
    padding-bottom: 7px;
}

.mapboxgl-popup-content attribute {
    font-size: 10px;
    font-style: italic;
    color: grey;
    padding: 5px;
}

.mapboxgl-popup-content value {
    font-size: 11px;
    font-style: bold;
    color: #312e2e;
}

.mapboxgl-popup-content div {
    padding: 10px;
}

.mapboxgl-popup-anchor-top>.mapboxgl-popup-content {
    margin-top: 15px;
}

.mapboxgl-popup-anchor-top>.mapboxgl-popup-tip {
    border-bottom-color: #312e2e;
}

/* mapbox search box */
/* https://github.com/mapbox/mapbox-gl-geocoder/issues/296 */
.mapboxgl-ctrl-geocoder {
    position: absolute;
    top: 0.5em;
    right: 0.5em;
    height: 1.90em;
    font-size: 1.3em;
    padding-top: 0.1ch;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* input text */
.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--input {
    max-height: 2em;
}

/* maginifier icon in the search box */
.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--icon-search {
    top: 0;
    left: 0.4em;
    height: 100%;
    fill: rgba(0, 0, 0, 0.87);
}

/* search box collapsed */
.mapboxgl-ctrl-geocoder.mapboxgl-ctrl-geocoder--collapsed {
    width: 40px !important;
    min-width: 40px;
}

/* close button on the search bar */
.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--pin-right>* {
    top: 1.5;
    right: 10px;
}

/* CSS for small screens */
/* On smaller screens, where width is less than 750px */
@media only screen and (max-width: 750px) {

    /* disclaimer popup */
    #popup {
        width: 80%;
        font-size: 0.9em;
        /* header size*/
    }

    #title {
        background-color: transparent;
        width: 100%;
        top: 1.2em;
        font-size: 1.1em;
    }

    /* small sidepanel */
    .sidepanel {
        position: absolute;
        top: 3.75em;
        left: 0.40em;
        width: 0em;
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0);
        margin-left: 3px;
    }

    /* hide scale bar */
    .mapboxgl-ctrl-scale {
        display: none !important;
    }

    /* hide fullscreen control bar */
    .mapboxgl-ctrl-fullscreen {
        display: none !important;
    }

    /* search box */
    .mapboxgl-ctrl-geocoder {
        position: absolute;
        top: 3em !important;
        left: 0.55em !important;
        z-index: 1;
        width: 95%;
    }
}