html, body {
    font-family: Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    width: auto;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

#status {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    pointer-events: none;
}
#loadingAnimation {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(128, 128, 128, 0.3);
    border-radius: 50%;
    border-top-color: rgba(128, 128, 128, 1.0);
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

#offcanvas {
    max-width: 85vw;
}

#offcanvasContent {
    padding: 5px;
}

#content {
    flex: 1 1 auto;
    min-height: 0; /* This is important! Lets the scale shrink to remaining height */
    display: flex;
}
@media (orientation: landscape) {
    #content {
        flex-direction: row;
    }
}
@media (orientation: portrait) {
    #content {
        flex-direction: column;
    }
}

#map {
    flex: 1 1 auto;
    height: 100%;
    width: 100%;
}

#scale {
    flex: 0 0 auto;
    display: flex;
    white-space: nowrap;
}
@media (orientation: landscape) {
    #scale {
        width: 50px;
        height: 100%;
        flex-direction: column;
    }
}
@media (orientation: portrait) {
    #scale {
        width: 100%;
        height: 24px;
        flex-direction: row-reverse;
        align-items: center;
    }
}

#scale .scaleUnit, #scale .scaleMax, #scale .scaleMin {
    text-align: center;
}
@media (orientation: landscape) {
    #scale .scaleUnit, #scale .scaleMax, #scale .scaleMin {
        padding: 2px 0;
    }
}
@media (orientation: portrait) {
    #scale .scaleUnit, #scale .scaleMax, #scale .scaleMin {
        padding: 0 2px;
    }
}

.scaleUnit {
    font-weight: bold;
}

#scale .scaleColorbar {
    flex: 1 1 auto;
    position: relative;
    min-height: 0; /* I hate CSS */
    height: 100%;
}

.scaleColorbar canvas {
    width: 100%;
    height: 100%;
}

#scale .scaleIndicator {
    position: absolute;
    padding: 0 2px;
    bottom: 0;
    background-color: rgba(255,255,255,0.5);
    text-align: center;
}
@media (orientation: landscape) {
    #scale .scaleIndicator {
        width: 100%;
        border-bottom: 2px solid black;
    }
}
@media (orientation: portrait) {
    #scale .scaleIndicator {
        height: 100%;
        border-left: 2px solid black;
        display: flex;
        align-items: center;
    }
}

#plot {
    display: flex;
    flex-direction: column;
    padding: 5px;
}
@media (orientation: landscape) {
    #plot {
        height: 100%;
        aspect-ratio: 0.8;
        min-width: 40vw;
        max-width: 65vw;
    }
}
@media (orientation: portrait) {
    #plot {
        width: 100%;
        aspect-ratio: 1;
        min-height: 40vh;
        max-height: 55vh;
    }
}

#plot .plotContent {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    width: 100%;
}

.plot-display {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    width: 100%;
}

#plot img {
    object-fit: fill;
    width: 100%;
    height: 100%;
}

.leaflet-container .leaflet-control-attribution {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.9);
}
.leaflet-control-layers {
    margin-right: 10px;
}
.leaflet-control-layers-expanded {
    padding: 5px;
}
.rasp-control {
    max-width: 350px;
}
.rasp-control .leaflet-control-layers-toggle {
    background-size: 26px 26px;
    background-image: url(img/rasp_control.svg);
}
.parameterDescription {
    display: inline-block;
    max-height: 8em;
    overflow-y: auto;
}

.leaflet-container a.leaflet-control-collapse-button {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 0;
    border: none;
    text-align: center;
    width: 18px;
    height: 14px;
    font: 16px/14px Tahoma, Verdana, sans-serif;
    font-weight: normal;
    color: #c3c3c3;
    text-decoration: none;
    font-weight: bold;
    background: transparent;
}
.leaflet-container a.leaflet-control-collapse-button:hover {
    color: #999;
}

.leaflet-grab {
    cursor: auto;
}

.leaflet-top {
    z-index: 1001;
}
