:root {
    --color-text: #fff;
    --color-page-bg: #151515;
    --color-box-border: #bbbdbd;
    --color-subtle: #706d6d;
    --color-state-0: #1fd951;
    --color-state-1: #fae71b;
    --color-state-2: #e32121;
    --color-ui: #FDFDFD;
}

[data-theme="light"] {
    --color-text: #000;
    --color-page-bg: #f6f3f3;
    --color-box-border: #444343;
    --color-ui: #423e3e;
}

html {
    height: 100vh;
    overflow-x: hidden;
}

body {
    display: grid;
    grid-template-columns: 2fr 3fr;
    background: var(--color-page-bg);
    color: var(--color-text);
    font-family: 'Inconsolata', monospace;
}

p {
    margin-block-start: 0;
    margin-block-end: 0;
}

h3 {
    font-size: min(calc(2vw + 2vh), 2.2rem);
    margin: 1.5vh 0px 0.5vh 3rem;
    text-align: left;
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1em;
    font-weight: normal;
}

select, input, textarea, option {
    cursor: pointer;
}

[data-theme="light"] select {
    box-shadow: var(--color-subtle) 2px 2px 5px 1px;
}

fieldset {
    display: grid;
    padding: 0;
    margin: 0;
    border: 0;
}

hr {
    border: 0;
    border-bottom: 1px solid var(--color-subtle);
}

input {
    color: var(--color-text);
    background: var(--color-page-bg);
    border: 1px solid transparent;
}

input:hover {
    border: 1px solid var(--color-ui);
}

.time {
    font-family: 'Inconsolata', monospace;
    margin-right: 2rem;
    opacity: 1;
    float: right;
}

.screen-slice {
    padding: 0.2em;
    margin: 0;
    margin-top: 1vh;
    display: flex;
    flex-direction: column;
}

.content-group {
    border: solid var(--color-box-border) 2px;
    border-radius: 4px;
    padding: 0.6em;
    margin: 1em;
    margin-top: 0.2em;
    margin-bottom: 0.6em;
    flex-grow: 1;
}

.content-item {
    display: flex;
    flex-direction: column;
}

.content-group label {
    font-size: calc(1.2rem + 1vw);
    margin-left: min(calc(0.7rem + 0.8vw + 0.8vh), 3rem);
}

.content-group .icao-input-text {
    width: 90%;
}

.content-group.airfield {
    display: grid;
    grid-template-columns: 20fr 1fr;
    grid-gap: 0.5em;
}

.airfield-header {
    display: flex;
    justify-content: space-between;
}

.airfield-status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-gap: 0.5em;
    margin: 0;
}

.airfield-status .dropdown {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    margin: 0.1em 0.2em 0.2em;
    background: transparent;
    color: var(--color-text);
    border: none !important;
    border-radius: 3px;
}

.airfield-status .dropdown option {
    background: var(--color-page-bg);
    color: var(--color-text);
}

.sof {
    font-size: calc(1.5rem + 1vw);
    font-weight: bold;
    width: 100%;
    background: transparent;
    color: var(--color-text);
}

.additional-info {
    display: inline-block;
    resize: vertical;
    min-height: 30vh;
    min-width: 100%;
    font-size: calc(1rem + 0.7vw);
    line-height: max(calc(1.5vh + 1.3vw), 1.1rem);
    background: var(--color-page-bg);
    color: var(--color-text);
    border: none;
    font-family: 'Source Sans Pro', sans-serif;
}

.metar {
    margin-bottom: max(2vh, 1em);
}

.taf > p {
    display: flex;
    flex-direction: column;
}

.taf > p > span {
    display: block;
}

.reports {
    font-size: max(calc(1em + 0.8vw + 0.7vh), 0.7em);
    line-height: max(calc(1.8vh + 1vw), 0.8em);
}

.widgets {
    align-content: flex-start;
    flex-flow: column;
}

.status-dot {
    height: max(1.2rem, 1.2vw);
    width: max(1.2rem, 1.2vw);
    background: var(--color-page-bg);
    border-radius: 50%;
    position: relative;
    display: inline-block;
    top: auto;
    bottom: auto;
    opacity: 0;
}

[data-theme="light"] .status-dot {
    box-shadow: 1px 1px 3px 1px var(--color-subtle);
}

span.status-dot {
    display: inline-block;
}

.widget {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: calc(0.1vw + 0.1vh);
    padding: calc(0.1vw + 0.1vh);
    font-size: max(0.8vw, 12px);
    flex-flow: column;
}

.delayed {
    color: #fcc23c;
}

.expired {
    color: #e50d0d;
}

[data-theme="light"] .delayed {
    color: #ff7100;
}

[data-theme="light"] .expired {
    color: #e50d0d;
}

.wind-arrow {
    color: var(--color-text);
    font-size: max(calc(1em + 0.5vw + 0.5vh), 0.5em);
}


/*###   Toggle classes  ####*/

.toggle {
    position: fixed;
    opacity: 0;
    border: 2px solid var(--color-ui);
    border-radius: 3px;
    width: 50px;
    height: 22px;
    top: 1px;
    left: -30px;
    padding: 2px;
    z-index: 2000;
    transition: all 150ms ease-in-out;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.toggle:hover {
    cursor: pointer;
    opacity: 1;
    left: 0px;
}

.toggle .tooltip {
    position: absolute;
    top: 6px;
    left: 70px;
    justify-content: center;
    font-size: 0.8em;
    color: var(--color-text);
    text-shadow: 0 0 1px var(--color-text);
    transition: all 150ms ease-in-out;
}

.toggle-dot {
    position: relative;
    margin: auto;
    top: 1px;
    left: 1px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    background-color: var(--color-ui);
    transition: all 150ms ease-in-out;
}

[data-theme="light"] .toggle .toggle-dot {
    transform: translateX(28px);
}

.toggle:hover {
    box-shadow: 1px 1px 5px #2b2b2b80;
    cursor: pointer;
}

.toggle:hover .toggle-dot {
    background: -webkit-linear-gradient(#eeeaea, #676767);
}


/*###   Utility classes  ####*/

.no-mouse {
    cursor: none;
}

.no-wrap {
    white-space: nowrap;
}


/*###   Media Queries   ####*/

@media only screen and (orientation: portrait) {
    body {
        display: grid;
        grid-template-columns: 1fr;
    }

    .additional-info {
        min-height: 5em;
    }
}
