/* colours */

:root {
    --primary: rgb(255, 255, 255);
    --secondary: rgb(255, 0, 0);
    --third: rgb(192, 192, 192);
}

html {
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-weight: normal;
    color: rgba(0, 0, 0, 0.87);
    font-size: 14px;
}

.noselect {
    -webkit-touch-callout: none;
    /* iOS Safari */
    -webkit-user-select: none;
    /* Safari */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* Non-prefixed version, currently supported by Chrome and Opera */
}

html,
body {
    background-color: #f5f5f5;
    margin: 0;
    height: 100%;
    min-height: 100%;
    overflow-y: auto;
}

.content {
    min-height: 100%;
}


/* nav bar */
nav {
    background-color: var(--primary);
    border-bottom: 10px solid var(--secondary);
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.20);
    line-height: 46px;
    height: 46px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    padding-left: 2.5%;
    padding-right: 2.5%;
    margin-bottom: 5px;
}

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

.company-name {
    font-weight: bold;
    transform: scaleY(1.25);
}

.logo {
    display: flex;
}

.logo>* {
    align-self: center;
}

.main-title {
    display: flex;
    align-items: center;
}

.about {
    justify-self: right;
}

@media screen and (max-width: 600px) {
    .company-name {
        display: none;
    }
}

/* updatebar */
#updatebar {
    display: none;
    justify-content: center;
    align-items: center;
    width: 85%;
    max-width: 700px;
    margin: auto;
    background-color: lightgray;
    color: black;
    font-weight: bold;
    border: 1px solid rgb(255, 0, 0);
    border-radius: 3px;
    text-decoration: none;
    padding: 10px;
    margin-top: 5px;
    box-shadow: 0 2px 2px 0 rgba(255, 0, 0, 0.20), 0 3px 1px -2px rgba(255, 0, 0, 0.18), 0 1px 5px 0 rgba(255, 0, 0, 0.25);
}

/* Container, row and col */
.certification {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 0.5rem;
}

.container {
    width: 95%;
    max-width: 1100px;
    margin: auto;
    display: grid;
    align-items: center;
}

.sections {
    grid-template-columns: min-content min-content 1fr min-content min-content;

    row-gap: 3px;
    white-space: nowrap;
}

.user-section {
    display: flex;
    grid-column: 2/-1;
    justify-self: start;
    column-gap: 20px;
    row-gap: 10px;
    padding-bottom: 15px;
    padding-top: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.user-section>div {
    display: flex;
    align-items: center;
}

.row-user-selection {
    grid-row: 2;
}

.icons {
    grid-column: 1;
    position: relative;
}

.warning-icon {
    position: absolute;
    visibility: hidden;
    top: 0px;
    left: 0px;
}

.title {
    grid-column: 2/3;
    white-space: nowrap;
}

.slider {
    grid-column: 3;
    margin-right: 4%;
    margin-left: 4%;
    position: relative;
}

.input {
    grid-column: 4/5;
    margin-right: 10px;
    width: 7ch;
}

.unit {
    grid-column: 5/6;
}

.user-input {
    margin-left: 10px;
    margin-right: 10px;
}

.switch {
    grid-column: 1/6;
    justify-self: center;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
}

.spacer {
    grid-column: 1/-1;
    height: 22px;
}

.row-unit {
    grid-row: 1;
}

/* warnings */

.warnings {
    display: none;
    grid-template-columns: min-content auto;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -50px;
    margin-top: -50px;
    text-align: center;
}

.warning-title {
    text-decoration: underline;
    font-weight: bold;
}

.warning-message {
    font-weight: bold;
}


/* cautions */

.cautions {
    grid-template-columns: min-content auto;
    padding-top: 10px;
    padding-bottom: 10px;
    max-height: 999999px;
    display: none;
}

.caution-title {
    grid-row: 1/-1;
    text-align: center;
    justify-self: center;
    padding-right: 5vw;
    text-decoration: underline;
    font-weight: bold;
}

.caution-messages {
    border-left: 1px solid black;
    grid-column: 2/3;
    padding-left: 5vw;
    justify-self: start;
}

.caution-message {
    color: black;
    font-weight: bold;
}

@media screen and (max-width: 350px) {
    .user-section {
        grid-template-columns: max-content max-content max-content max-content;
        grid-template-rows: auto;
        /* column-gap: 0px;
        row-gap: 10px; */
        padding-bottom: 15px;
        padding-top: 15px;
    }
}


/*  */

@media screen and (max-width: 600px) {
    .title {
        grid-column: 2/-1;
    }

    .slider {
        grid-column: 1/4;
        margin-left: 0;
        margin-right: 4%;
    }
}

#input-empty-weight {
    max-width: 5ch;
}

#input-start-cg {
    max-width: 6.5ch;
}

/* size of inputs for mobiles */

@media (pointer:coarse) {
    .input {
        width: 4ch;
    }

    #input-start-cg {
        width: 4.5ch;
    }

    #input-empty-weight {
        width: 3ch;
    }

    /* remove arrow moz mobile */
    input[type=number] {
        -moz-appearance: textfield;
    }
}

input[type="number"]:not(.browser-default) {
    text-align: right;
    height: 1.25rem;
    max-width: 3.0em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #9e9e9e;
    border-radius: 0;
    outline: none;
    font-size: 1.15rem;
    padding: 0;
    line-height: 1.15;
    box-shadow: none;
    box-sizing: content-box;
}

input[type="number"]:not(.browser-default):focus:not([readonly]) {
    box-shadow: none;
    border-color: var(--secondary);
}

input[type=number]:not(.browser-default):disabled {
    color: black;
    border-bottom: none;
}

input[type=checkbox]:checked:not(:disabled)~.lever:active::before {
    background-color: var(--third);
}


/* Limiters box on slider */
.limiter {
    background: var(--third);
    height: 0.65rem;
    transition: width 0.2s;
    float: right;
    position: absolute;
    border-radius: 3px;
    top: 0.05rem;
    right: 0;
}

#limiter-box-pilot {
    width: 26.666%;
}

#limiter-box-passenger {
    width: 15.3846%;
}

.noUi-horizontal {
    height: 0.75rem;
}

.noUi-pips-horizontal {
    font-size: 0.75rem;
    height: 0;
    padding: 5px 0;
}

.noUi-marker-horizontal.noUi-marker-large {
    height: 0.75rem;
}

.noUi-base .noUi-handle::before {
    background: var(--secondary);
    height: 1.5rem;
    width: 2px;
}

.noUi-base .noUi-handle::after {
    background: var(--secondary);
    height: 1.5rem;
    width: 2px;
}

.noUi-horizontal .noUi-handle {
    box-shadow: none;
    background: none;
    border: none;
    cursor: ew-resize;
    top: -12px;
}


/* Switch (from materialisecss) */
.switch label {
    cursor: pointer;
    display: flex;
    margin: auto;
}

.switch span {
    color: var(--third);
}

.switch label input[type=checkbox]:checked+.lever:before,
.switch label input[type=checkbox]:checked+.lever:after {
    left: 18px;
}

.switch label .lever {
    content: "";
    position: relative;
    width: 36px;
    height: 14px;
    background-color: var(--third);
    border-radius: 15px;
    margin-right: 10px;
    transition: background 0.3s ease;
    align-self: center;
    margin: 0 16px;
}

.switch label .lever:before,
.switch label .lever:after {
    background-color: rgb(255, 255, 255);
    content: "";
    position: absolute;
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    left: 0;
    top: -3px;
    transition: left 0.3s ease, background .3s ease, box-shadow 0.1s ease, transform .1s ease, -webkit-box-shadow 0.1s ease, -webkit-transform .1s ease;
    box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
}

.switch label input[type=checkbox] {
    display: none;
}

.switch-unit label {
    position: relative;
    /* display: flex; */
    cursor: pointer;
}

/* switch unit */
.switch-unit label .lever-holder {
    content: "";
    display: inline-block;
    position: relative;
    width: 36px;
    height: 14px;
    background-color: var(--third);
    border-radius: 15px;
    margin-right: 10px;
    vertical-align: middle;
    /* align-self: center; */
    margin: 0 16px;
}

.switch-unit label .lever-unit {
    background-color: rgb(255, 255, 255);
    content: "";
    position: absolute;
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    left: 0;
    top: -3px;
    margin: 0 16px;
    box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
}

label {
    font-size: .8rem;
    color: #9e9e9e;
}

#figure_area {
    display: flex;
    justify-content: center;
    position: relative;
}


/* text-output area */

.text-output {
    font-weight: bold;
    max-width: 500px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
    max-height: 999999px;
    padding-bottom: 1.5rem;
}

.text-output .column {
    text-align: center;
}

.text-output .rows {
    display: inline-block;
    text-align: left;
}

.text-output>p {
    margin: 0.2rem;
    justify-self: left;
}


/* version */

.footer {
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
    padding-left: 2.5%;
    padding-right: 2.5%;
    height: 1.5rem;
    margin-top: -1.5rem;
}