/* Preloader */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    overflow: hidden;
    background: #fff;
}

#preloader:before {
    content: "";
    position: fixed;
    top: calc(50% - 30px);
    left: calc(50% - 30px);
    border: 6px solid #e9ecef;
    border-top: 6px solid #0d6efd;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: animate-preloader 0.8s linear infinite;
}

@keyframes animate-preloader {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Layout (from CodePen) */

html, body {
    margin: 0;
    padding: 0;
}

#map {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
}

#selectContainer {
    position: fixed;
    top: 0;
    z-index: 1020;
    width: 100%;
    padding: 11px 0;
    pointer-events: none; /* let clicks pass through to map controls (zoom/layers) in the corners */
}

#selectContainer > * {
    pointer-events: auto; /* the dropdown itself remains clickable */
}

/* Map loading spinner (overlay data) */
/* Modelled on the weather modal's pre-loader: a centred spinning circle */

#mapLoading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1010;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.6);
    pointer-events: none; /* let the user keep panning the map while data loads */
}

#mapLoading:before {
    content: "";
    position: fixed;
    top: calc(50% - 30px);
    left: calc(50% - 30px);
    border: 6px solid #e9ecef;
    border-top: 6px solid #0d6efd;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: animate-preloader 0.8s linear infinite;
}

#countrySelect {
    width: 200px;
    margin: 0 auto;
}
