html, body, #main {
    height: 100%;
}

/*   --------------   POPUPS   ----------- */

#notSupportedBrowser {
    display: block;
    position: fixed;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    border: 1px solid rgb(150, 150, 150);
    z-index: 1000;
    background-color: white;
    max-width: 100%;
}
#notSupportedBrowser h1, #notSupportedBrowser h3 {
    text-align: center;
}
#popupBackground {
    display: block;
    background-color: rgb(88, 88, 88);
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 100;
}

@supports (display: grid) {
    #notSupportedBrowser {
        display: none;
    }
    #popupBackground {
        display: none;
        background-color: rgba(0, 0, 0, 0.05);
        position: fixed;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        z-index: 9;
    }
}

#internetFeedbackBoks {
    text-align: center;
    display: none;
    width: calc(100% - 8em);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 1em;
    z-index: 10;
    box-shadow: 0 6px 8px -6px black;
    border-radius: 5px;
    font-size: 1em;
    width: 70%;
}
#internetFeedbackBoks h3 {
    color: #fd593c;
}
#lukkInternettFeedback {
    border: 1px solid black;
    padding: 1em 1.2em;
    background-color: white;
    margin: 0.5em;
    border-radius: 4px;
    cursor: pointer;
}
#lukkInternettFeedback:hover {
    background-color: rgb(190, 190, 190);
}
#internetFeedbackPermanent {
    display: none;
    text-align: center;
    position: absolute;
    bottom: 0em;
    background-color: white;
    padding: 1em;
    z-index: 10;
    box-shadow: 0 0px 3px 0px black;
    border-radius: 16px 16px 0 0;
    box-sizing: border-box;
    width: 100%;
}
#internetFeedbackPermanent h3 {
    margin-top: 0;
    font-size: 1em;
    color: #fd593c;
}
#internetFeedbackPermanent p {
    margin-bottom: 0;
}

@keyframes loadingSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#internetLoadingBoks {
    text-align: center;
    display: none;
    width: calc(100% - 8em);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 1em;
    z-index: 10;
    box-shadow: 0 6px 8px -6px black;
    border-radius: 5px;
    font-size: 1em;
    z-index: 200;
}
#loadingIcon {
    width: 50px;
    transform: rotate(0deg);
    animation-duration: 1.3s;
    animation-iteration-count: infinite;
    animation-name: loadingSpin;
    animation-timing-function: steps(12, end);
}

#errorlogDiv {
    display: none;
    width: calc(100% - 8em);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 1em;
    z-index: 10;
    box-shadow: 0 6px 8px -6px black;
    border-radius: 5px;
    max-height: 60%;
    width: 70%;
    overflow-y: auto;
}
#errorlogDiv h3 {
    text-align: center;
    margin-right: 1em;
}
#errorlogUL {
    list-style-type: none;
    font-size: 0.5em;
}
#errorlogUL li {
    margin: 0.5em 0;
}
#lukkErrorlog {
    border: 1px solid black;
    padding: 0.8em 1em;
    background: transparent;
    cursor: pointer;
    position: absolute;
    top: 4em;
    right: 3em;
}
#lukkErrorlog:hover {
    border: 1px solid transparent;
    background: #dedede91;
}

/*   --------------   GENERELT   ----------- */

body {
    font-size: 2em;
    margin: 0; padding: 0;
    font-family: 'Barlow', sans-serif;
    /* background-color: rgba(0, 0, 0, 0.041); */
    /* background-color: #ff97151a; */
    background-color: #ff971514;
}

#main {
    display: grid;
    grid-template-columns: 1fr 3fr;
}

.hoved {
    padding: 0.5em;
}

* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
input, input:before, input:after, textarea {
    -webkit-touch-callout: initial;
    -webkit-user-select: initial;
    -khtml-user-select: initial;
    -moz-user-select: initial;
    -ms-user-select: initial;
    user-select: initial;
}

#creds {
    position: absolute;
    bottom: 1em;
    right: 1em;
    text-align: right;
    font-size: 0.35em;
}
#creds a {
    text-decoration-color: gray;
    color: gray;
}


/*   --------------   TOOLBAR   ----------- */
#toolbar {
    position: absolute;
    right: 1em;
    top: 0.8em;
    display: flex;
    gap: 0.5em;
}
#toolbar img {
    display: inline-block;
    height: 0.7em;
    cursor: pointer;
}

#beskjedBoks {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 1em;
    display: none;
    z-index: 10;
    box-shadow: 0 6px 8px -6px black;
    border-radius: 5px;
    width: 70%;
}
#beskjedBoks p {
    text-align: center;
    font-size: 0.6em;

    -webkit-touch-callout: unset;
    -webkit-user-select: unset;
    -khtml-user-select: unset;
    -moz-user-select: unset;
    -ms-user-select: unset;
    user-select: text;
}
#beskjedInput {
    border: 1px solid black;
    padding: 1em;
    background-color: white;
    width: 80%;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
}
.knappDiv {
    display: flex;
    justify-content: center;
}
#bekreftBeskjed, #avbryt, #hintJa, #hintNei {
    border: 1px solid black;
    padding: 1em;
    background-color: white;
    margin: 0.5em;
    cursor: pointer;
    transition: background-color 200ms;
}
#avbryt {
    color: red;
}
#bekreftBeskjed:hover, #avbryt:hover, #hintJa:hover, #hintNei:hover {
    background-color: rgba(61, 61, 61, 0.349);
}

#hintBoks {
    position: fixed;
    display: none;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    transition: transform 0.5s;
    padding: 1em;
    background-color: white;
    box-shadow: 0 6px 8px -6px black;
    border-radius: 25px 25px 0 0;
    z-index: 1;
    width: 50%;
}
#hintBoks p, #hintBoks h5 {
    margin: 0;
    text-align: center;
}
#hintJa, #hintNei {
    margin: 0.5em 0.5em 0;
}

#errorImg {
    display: inline-block;
    width: 0.75em;
    height: 0.7em;
    cursor: pointer;
    opacity: 0.5;
    position: fixed;
    bottom: 0.5em;
    left: 0.5em;
}

/*   --------------   BESTILLINGER GENERELT   ----------- */
.bestillingsdiv {
    border: 1px solid rgba(0, 0, 0, 0.219);
    border-radius: 2px;
    width: 100%;
    min-height: 3em;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.192);
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
}

h3 {
    margin: 0.5em 0.5em 0.5em 0;
    width: max-content;
}

p, label {
    font-size: 0.5em;
}

input {
    border: 1px solid gray;
    padding: 0.5em 1em;
    border-radius: 5px;
  }

/*   --------------   NY BESTILLING   ----------- */
#nyBestilling {
    border-right: 1px solid black;
    display: flex;
    flex-direction: column;
    padding-top: 0.5em;
}
#nyBestilling p {
    margin: 0 0 1em 0;
}

#generertTall {
    margin: 0.3em auto;
    font-size: 2.5em;
}

.orderCard {
    width: 2.4em;
    min-height: 1.2em;
    border-radius: 5px;
    box-shadow: 0 6px 8px -6px black;
    margin: 0.2em 0.3em;
    text-align: center;
    box-sizing: border-box;
    background-color: white;
    display: flex;
    font-size: 1.5em;
    transition: background-color 200ms;
    border: none;
    flex-direction: column;
    justify-content: center;
}
.orderCard:not(:disabled):hover {
    background-color: rgba(0, 0, 0, 0.219);
    cursor: pointer;
}
.orderNo {
    font-size: 0.6em;
}
.orderName {
    font-size: 0.3em;
    word-break: break-word;
}

#numberPicker {
    display: flex;
    width: calc(3 * (2em + 2px));
    flex-wrap: wrap;
    justify-content: right;
    margin: 0 auto;
}
#numberPicker button {
    width: 2em;
    border: 1px solid #8080806b;
    font-size: 1em;
    background-color: white;
    font-family: inherit;
    cursor: pointer;
}

/*   --------------   BESTILLINGER PÅ KJØKKENET   ----------- */
#bestillingKjokken {
    margin-bottom: 0.5em;
}
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(180deg);
    }
}
#refresh {
    animation-duration: 0.8s;
    animation-fill-mode: none;
}

/*   --------------   FERDIGE BESTILLINGER   ----------- */
#ferdigeBestillinger {
    margin-top: 0.5em;
    border-top: 1px solid black;
}

#statistikk {
    width: 48%;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.219);
    border-radius: 2px;
    min-height: 3em;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.192);
    margin-left: 1em;
    float: right;
    font-size: 0.5em;
    padding: 1em;
}
#ferdigBestillingDiv {
    float: left; 
    width: 100%;
}
#statistikk h4 {
    margin-top: 0;
}
#ventetid {
    list-style-type: none;
}
#gjennomsnittVentetid {
    list-style-type: none;
}
#resetAvg {
    float: right;
    border: 1px solid black;
    padding: 0.5em;
    transform: translateY(-0.5em);
    background-color: white;
}
#resetAvg:hover {
    background-color: rgba(61, 61, 61, 0.349);
    cursor: pointer;
}

@media only screen and (max-width: 650px){
    #lukkErrorlog {
        position: relative;
        top: 0;
        left: 50%;
        right: 0;
        transform: translateX(-50%);
    }
}

@media only screen and (max-width: 670px){
    #ferdigBestillingDiv {
        float: none!important;
        width: 100%!important;
    }
    #statistikk {
        float: none;
        width: 100%;
        margin: 1em 0;
    }
}