/* Variables */

:root {
    /* x0.5 */
    --space-xs: 9px;
    /* x0.75 */
    --space-sm: 12.75px;
    /* x1 */
    --space-md: 17px;
    /* x1.5 */
    --space-lg: 25.5px;
    /* x2 */
    --space-xl: 34px;
    /* x3 */
    --space-xxl: 51px;

    --color-white: #ffffff;
    --color-cloud: #f7f7f7;
    --color-cloud-dark: #d6dde6;
    --color-grey: #7b7b7b;
    --color-grey-dark: #4a5568;
    --color-black: #1a202c;
    --color-blue: #2b6cb0;
    --color-blue-dark: #2c5282;
    --color-midnight: #2a4365;
    --color-midnight-dark: #21354f;

    --color-heathrow: #46216f;
    --color-heathrow-dark: #31174f;

    --color-green-light: #eafaea;
    --color-green: #2aad27;
    --color-green-dark: #1e7d1c;

    --color-red-light: #faeaea;
    --color-red: #c53030;
    --color-red-dark: #a52727;

    --color-orange-light: #fbf3ea;
    --color-orange: #cb852b;
    --color-orange-dark: #ab6b21;

    --color-purple: #5b21b6;
}

/* Reset */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-family: 'Fira Sans', sans-serif;
}

html,
body {
    height: 100vh;
    font-size: var(--space-md);
    line-height: var(--space-lg);
    background-color: var(--color-heathrow);
    color: var(--color-grey-dark);
}

@media all and (max-width: 1400px) {
    body {
        font-size: 15px;
    }
}

/* Navigation Bar */
.navigation-bar {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout */

.spread {
    display: grid;
    grid-template-columns: auto 1fr;
}

.spread div:last-child {
    justify-self: right;
}

.flex-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.two-rows-1-1 {
    display: grid;
    grid-gap: var(--space-xs);
    grid-template-rows: 1fr 1fr;
}

.two-rows-2-1 {
    display: grid;
    grid-gap: var(--space-xs);
    grid-template-rows: 2fr 1fr;
}

.two-rows-3-1 {
    display: grid;
    grid-gap: var(--space-xs);
    grid-template-rows: 3fr 1fr;
}

@media all and (max-width: 1400px) {
    .two {
        display: block;
    }
}

section.sm {
    margin-top: var(--space-xs);
    overflow-y: auto;
}

:is(section.sm, section.lg)::-webkit-scrollbar {
    width: 5px;
}

:is(section.sm, section.lg)::-webkit-scrollbar-track {
    background: #fff;
}

:is(section.sm, section.lg)::-webkit-scrollbar-thumb {
    background: #888;
}

section.lg {
    margin-top: calc(2 * var(--space-xl));
    overflow-y: auto;
}

/* General Typography */

h1 {
    font-size: 34px;
    color: var(--color-black);
    font-weight: 600;
}

@media all and (max-width: 1400px) {
    h1 {
        font-size: 28px;
    }
}

header {
    padding-bottom: var(--space-xl);
    border-bottom: dashed 1px var(--color-cloud-dark);
}

h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

@media all and (max-width: 1400px) {
    h2 {
        font-size: 18px;
    }
}

h1 span {
    color: var(--color-grey-dark);
}

a {
    color: var(--color-blue);
    text-decoration: none;
}

a:hover {
    color: var(--color-blue-dark);
    text-decoration: underline;
}

strong {
    font-weight: 600;
}

/* External */

.external main {
    margin: 0 auto;
    max-width: 720px;
}

.external .logo {
    display: block;
    padding: calc(2 * var(--space-xxl)) 0 var(--space-xxl);
    margin: 0 auto;
}

.external .island {
    background-color: var(--color-white);
    outline: solid 5px var(--color-midnight-dark);
    padding: var(--space-xl);
}

/* Internal */

.internal {
    display: grid;
    grid-template-columns: 250px 1fr;
    transition: grid-template-columns 0.3s;
}

.internal main {
    background-color: var(--color-white);
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    padding: var(--space-xs);
}

@media all and (max-width: 1400px) {
    .internal {
        grid-template-columns: 200px 1fr;
    }
}

/* Primary nav */

nav.primary a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-white);
    font-weight: 600;
    text-transform: uppercase;
}

nav.primary a:hover,
nav.primary a:active {
    background-color: var(--color-heathrow-dark);
    text-decoration: none;
}

nav.primary img {
    max-height: 26px;
    position: relative;
    top: 6px;
}

nav.primary .current {
    background: var(--color-heathrow-dark);
}

#sidebar-secondary {
    border-top: 2px dotted white;
    border-bottom: 2px dotted white;
    padding: 0 20px 20px;
}

#sidebar-secondary :is(p, h5) {
    font-size: 18px;
    margin-top: 20px;
    color: white;
}

#sidebar-secondary h6 {
    font-size: 14px;
    margin-top: 10px;
    color: white;
}

#sidebar-secondary div {
    margin-top: 5px;
}

#sidebar-logout {
    flex: 1;
    display: flex;
    align-items: flex-end;
}

#sidebar-logout form {
    width: 100%;
}

#sidebar-logout button {
    width: 100%;
    background: none;
    border: none;
    font-family: 'Fira Sans', sans-serif;
    padding: var(--space-sm) var(--space-md);
    color: #ff5555;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
}

#sidebar-logout button:hover {
    text-decoration: underline;
}

#sidebar-logout button img:hover {
    border-bottom: 1px solid #ff5555;
}

#hide-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    right: 0;
    background-color: white;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    transition: background-color 0.1s;
    transition: width 0.1s;
    width: 15px;
    height: 50px;
    cursor: pointer;
}

#hide-sidebar:hover {
    background-color: #eee;
    width: 20px;
}

#hide-sidebar:active {
    background-color: #ddd;
}

#hide-sidebar button {
    background: none;
    border: none;
    color: black;
    font-weight: 600;
    font-size: large;
}

/* Maps */

.map {
    position: relative;
    width: 100%;
    height: 50vh;
}

.large-map {
    position: relative;
    width: 100%;
    height: 70vh;
}

.layer-switcher:not(.shown) {
    width: fit-content;
}

.layer-switcher li {
    line-height: var(--space-md);
}

input[type='radio'] {
    margin-top: 3px !important;
}

input[type='checkbox'] {
    margin-top: 3px !important;
}

.layer-switcher {
    background-color: transparent !important;
    font-family: sans-serif;
    font-size: smaller;
    width: 280px;
}

#info {
    position: absolute;
    display: inline-block;
    height: auto;
    width: auto;
    z-index: 100;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    left: 50%;
    transform: translateX(3%);
    visibility: hidden;
    pointer-events: none;
}

.ol-popup {
    font-family: sans-serif;
    font-size: small;
    width: 550px;
}

th.popup-table-col {
    width: 13%;
    text-align: center;
}

td {
    text-align: center;
}

.select2-container {
    font-size: 13px;
}

/* Login screen */

.container {
    height: 100%;
    align-content: center;
}

.card {
    /*height: 370px;*/
    margin-top: auto;
    margin-bottom: auto;
    width: 600px;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.card-header h3 {
    color: white;
}

.input-group-prepend span {
    width: 50px;
    background-color: #ffc312;
    color: black;
    border: 0 !important;
}

input:focus {
    outline: 0 0 0 0 !important;
    box-shadow: 0 0 0 0 !important;
}

.remember {
    color: white;
}

.remember input {
    width: 20px;
    height: 20px;
    margin-left: 15px;
    margin-right: 5px;
}

.login_btn {
    color: black;
    background-color: #ffc312;
    width: 100px;
}

.challenge_btn {
    color: black;
    background-color: #ffc312;
    width: 150px;
}

#id_otp_device {
    display: block;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    margin-right: 5px;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    border: 1px solid #ced4da;
    border-radius: 0 0.25rem 0.25rem 0;
    flex: 1 1 auto;
}

.links {
    color: white;
}

.links a {
    color: orange;
    margin-left: 4px;
}

/* Table */

.table-selected {
    float: left;
    margin-top: 0.755em;
    margin-left: 10px;
    font-weight: bold;
    font-size: 12px;
}

.table-selected-limit {
    color: red;
}

@media screen and (max-width: 767px) {
    .table-selected {
        float: none;
        margin-left: 0;
        text-align: center;
    }
}

/* Loader */

.loader {
    border: 10px solid #f3f3f3;
    border-top: 10px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}

.quick-loader {
    border: 10px solid #f3f3f3;
    border-top: 10px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Others */

@keyframes shake {
    0% {
        margin-left: 0rem;
    }
    25% {
        margin-left: 0.25rem;
    }
    75% {
        margin-left: -0.25rem;
    }
    100% {
        margin-left: 0rem;
    }
}

.shake {
    animation: shake 0.1s ease-in-out 0s 2;
}

@keyframes pop-show {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pop-hide {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

.pop-show-5s {
    animation: pop-show 0.2s ease-in 0s 1 forwards, pop-hide 0.2s ease-in 4.8s 1 forwards;
}

/* Switch */

.switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 17px;
    margin: 0 !important;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: '';
    height: 13px;
    width: 13px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #2196f3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196f3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(13px);
    -ms-transform: translateX(13px);
    transform: translateX(13px);
}

.slider.round {
    border-radius: 17px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Cesium Layer Switcher */

.map-3d-layer-switcher {
    background-color: #eee;
    position: absolute;
    top: 3em;
    right: 0.5em;
    z-index: 1000;
    border-radius: 2px;
    max-height: 80%;
    overflow-y: auto;
}

.map-3d-layer-switcher > button {
    float: right;
    width: 38px;
    height: 38px;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACE1BMVEX///8A//8AgICA//8AVVVAQID///8rVVVJtttgv98nTmJ2xNgkW1ttyNsmWWZmzNZYxM4gWGgeU2JmzNNr0N1Rwc0eU2VXxdE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319idMNgMMp+zWVSybUed/+/h7I4wRAG1W6XDy4XmjR9HnzvDRZXUAYDFOhC1S/Hh+fIXxen+eO+AKqbs+wAo30zDTDvDxKoJN88sjUzDFAvBzEUGFsnADoIvAJzoh2BZ8sner+Ke/vwECuQAAAABJRU5ErkJggg==');
    background-repeat: no-repeat;
    background-position: 2px;
    background-color: white;
    border: none;
    border-radius: 2px;
}

.map-3d-layers {
    background-color: white;
    padding: 3px 7px;
    margin: 4px;
    border-radius: 3px;
    width: 272px;
}

.map-3d-layers .expand-button {
    display: inline-block;
    font-size: 1em;
    width: 16px;
    height: 16px;
    margin: 0;
    margin-right: 2px;
    border: solid 1px transparent;
    background-color: transparent;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAW0lEQVR4nGNgGAWMyBwXFxcGBgaGeii3EU0tXHzPnj1wQRYsihqQ+I0ExDEMQAYNONgoAN0AmMkNaDSyQSheY8JiaCMOGzE04zIAmyFYNTMw4A+DRhzsUUBtAADw4BCeIZkGdwAAAABJRU5ErkJggg==');
    transition: transform 0.2s ease-in-out;
}

.map-3d-layers .expand-button:hover {
    border: solid 1px black;
    background-color: #eee;
}

.map-3d-layers .expand-button.collapsed {
    transform: rotate(-90deg);
    background-position: center;
}

.map-3d-layers .menu-item {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 5px;
}

.map-3d-layers .menu-checkbox {
    padding-top: 3px;
    display: flex;
}

.map-3d-layers .menu-children {
    margin-left: -18px;
}

.map-3d-layers label {
    user-select: none;
    padding: 0;
    margin: 0;
    font-size: 12.5px;
    font-weight: bold;
}

.map-3d-layers input {
    padding: 0;
    margin: 0;
}
