body, html {
    width: 100%;
    height: 100%;
}

#container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    height: 100%;
}

#map {
    height: 100%;   
    z-index: 0;
    flex-basis: 60%;
    position: relative;
}

#sidebar { 
    height: 100%;
    flex-basis: 40%;
    min-width: 400px;
    z-index: 1;
    display: flex;
    flex-direction: column;
}


#options {
    padding: 0.5em;
    flex-shrink: 0;
}

#data {
    overflow-y: scroll;
    position: relative;
    padding-right: 1px;
}

#narrative {
    padding: 0.5em;
    flex-shrink: 0;
    overflow: auto;
}

#data input {
    width: 100%;
    
    border: none;
    background: none;
}

#data input:focus {
    background-color: #d6ffd6;
}


#data td, #data th {
    border: 1px solid white;

}
#data th {
    text-align: left;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
    padding-left: 0.25em;
    padding-right: 0.25em;
}
#data tr:nth-child(2n) {
    background-color: #eee;
}
#data tr:nth-child(2n+1) {
    background-color: #fff;
}

#data tr:hover {
    background-color: #d6ffd6;
}

#data td.iconCell, #data th.iconCell {
    vertical-align: middle;
    zoom: 0.75;
    text-align: center;
}

#mapTitle {
    text-align: center;
    top: 1em;
    right: calc(50% - 15em);
    width: 30em;

}
#mapTitle, #key {
    background-color: rgba(255,255,255,0.8);
    border-radius: 0.5em;
    padding: 0.25em;
    display: none;
    position: absolute;
    z-index: 10;
}

#key {
    position: absolute;
    right: 2em;
    bottom: 2em;
    width: 15em;
    height: 4em;
}
#key .colorStop {
    width: 2em;
    height: 2em;
    flex-grow: 1;
}
#key-colorBar {
    border-radius: 0.5em;
    overflow: hidden;
}
#key-colorBar, #key-labels {
    display: flex;
    justify-content: space-between;
}

.mapboxgl-popup, .mapboxgl-popup-content {
    pointer-events: none;
}

.attribution {
    position: absolute;
    z-index: 100;
    left: 10px;
    bottom: 10px;
}

@media only screen and (max-width: 640px) {
    body {
        font-size: 70%;
    }
    #container {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
        flex-basis: 70%;
        min-width: auto;
    }
    #map {
        width: 100%;
        flex-basis: 30%;
        zoom: 0.4;
    }
}

#dropzone {
    display: flex;
    visibility: hidden;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background-color: rgba(255,255,255,0.3);
    justify-content: center;
    align-items: center;
}

#dropzone p {
    display: block;
    background-color: rgba(255,255,255,0.8);
    padding: 2em;
    border-radius: 1em;
}