/*--------------------------------------------------------------
# FONTS
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# INIT
--------------------------------------------------------------*/
html, body {
    width: 100vw;
    height: 100%;
    margin: 0;
    padding: 0;
    top: 0;
    left: 0;
    overflow: hidden;
}

body {
    display: grid;
    grid-gap: 0;
}

button.ico-but-img {
    border: none;
    border-radius: 8px;
    margin: 0;
    padding: 6px;
    width: 36px;
    height: 36px;
    aspect-ratio: 1 / 1;
    outline-color: transparent;
}

button.ico-but-img.but-small {
    width: 34px;
    height: 34px;
    padding: 4px;
}

button.ico-but-img.but-big {
    width: 64px;
    height: 64px;
    padding: 8px;
    border-radius: 50%;
}

img.img-xsmall {
    max-width: 24px;
    max-height: 24px;
    padding: 0;
    margin: 0;
    filter: invert(1);
}

img.img-fitHeight {
    width: auto;
    padding: 0;
    margin: 0;
    filter: invert(1);
}

img.img-fitHeightSmall {
    width: auto;
    padding: 0;
    margin: 0;
    filter: invert(1);
}

/*--------------------------------------------------------------
#                          NAV MAIN
--------------------------------------------------------------*/
#nav_main {
    grid-area: nav_main;
    padding: 2px;
    overflow: hidden;
}

#nav_main_content {
    overflow: hidden;
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-rows: 1fr;
    grid-template-columns: 38px 38px 1fr 38px 38px;
    row-gap: 5px;
    align-items: center;
}

#nav_main_content div:nth-child(n+4) {
    align-self: center;
}

#nav_main_content div:nth-child(n+5) {
    justify-self: center;
}

#nav_main button.ico-u, #nav_sub button.ico-u {
    font-size: 26px;
}


#latlong_wrapper {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 34ch;
    padding-inline: 0;
    margin-top: -0.125em;
    z-index: 1000;
}

#latlong {
    width: 100%;
    padding-inline: 0;
}

/*--------------------------------------------------------------
#                             MAP
--------------------------------------------------------------*/
#map_wrapper {
    grid-area: map_wrapper;
    overflow: hidden;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
    position: relative;
}

.spinner-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1001;
}

.spinit {
    animation: spin 3s infinite linear;
}

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

#map_canvas {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

/*--------------------------------------------------------------
#                           NAV SUB
--------------------------------------------------------------*/
#nav_sub {
    grid-area: nav_sub;
    line-height: 1.25em;
    overflow: hidden;
}

#nav_sub .header.hour {
    display: grid;
    grid-template-columns: 10% 10% 29% 8% 8% 8% 8% 8% 11%;
    grid-template-rows: 1fr;
    width: calc(100% - var(--scroll-bar-width));
    row-gap: 0;
    height: 44px;
    align-items: center;
}

#nav_sub .header.day {
    display: grid;
    grid-template-columns: 10% 25% 9% 9% 9% 9% 9% 9% 9%;
    grid-template-rows: 1fr;
    height: 100%;
    /*width: calc(100% - var(--scroll-bar-width));*/
}

#nav_sub .header > div {
    align-self: center;
}

#nav_sub .header.day > div:first-child {
    justify-self: start;
    padding-left: 5px;
}


/*--------------------------------------------------------------
#                           MAIN
--------------------------------------------------------------*/
#main {
    grid-area: main;
    overflow: hidden;
    width: 100%;
}

.container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#main .container .hourly {
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

#main .container .hourly .row {
    display: grid;
    grid-template-columns: 9% 28% 12% 8% 8% 8% 8% 8% 11%;
}

#main .container .hourly .row.day {
    border-bottom: 1px solid var(--color-primary-800);
    height: 3em;
}

#main .container .hourly .row.night {
    border-bottom: 1px solid var(--color-primary-600);
    height: 2.5em;
}

#main .container .hourly .row > div {
    align-self: center;
    justify-self: center;
}

#main .container .daily .row {
    display: grid;
    grid-template-columns: 20% 15% 9% 9% 9% 9% 9% 9% 9%;
    grid-template-rows: 1fr;
    border-bottom: 1px solid var(--color-primary-600);
    height: 2.5em;
}

#main .container .daily .row > div {
    align-self: center;
    justify-self: center;
    text-align: center;
}


/*--------------------------------------------------------------
#                           LIGHTBOX
--------------------------------------------------------------*/
#wrapper_lightbox {
    position: fixed;
    left: 0;
    top: 0;
    width: 100dvw;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--grey9-90);
    z-index: 1000;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
}

.lightbox {
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
    overflow: hidden;
    align-self: center;
    justify-self: center;
}

#lightbox_close {
    position: absolute;
    margin: 0;
    padding: 0;
    max-height: 64px;
    max-width: 64px;
    overflow: hidden;
    cursor: pointer;
    z-index: 1001;
}

#settings {
    position: relative;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    display: grid;
    grid-template-rows: 1fr 20%;
    grid-template-columns: 1fr;
}

#signature {
    position: relative;
    bottom: 10px;
    right: 0;
    width: 100%;
}

#help {
    position: relative;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
    min-height: 100%;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

#help > div {
    align-self: center;
    justify-content: center;
}

#weather-distance-container {
    min-height: 3em;
}

#settings .checkbox {
    height: 3em;
    width: 3em;
    position: relative;
    appearance: none;
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    margin: 0;
}
#settings .checkbox::after {
    position: absolute;
    content: "✔";
    font-size: 4.5em;
    top: -0.45em;
    left: -0.09em;
    color: rgba(175,121,60, 0.25);
}

#settings input[type="text"] {
    font-size: 1.5em;
    padding: 0.15em 0;
}

#settings .checkbox.checked {
    border: 1px solid var(--color-secondary-400);;
}

#settings .checkbox.checked::after {
    position: absolute;
    content: "✔";
    font-size: 4.5em;
    top: -0.45em;
    left: -0.09em;
    color: var(--color-secondary-400);
}

/*--------------------------------------------------------------
#                          MEDIA
--------------------------------------------------------------*/
@media screen and (orientation: portrait) {
    body {
        grid-template-rows: 46px 45% 44px 1fr;
        /*grid-template-rows: 46px calc(33 * var(--vh)) 40px calc(100vh - calc(33 * var(--vh)) - 46px);*/
        grid-template-columns: 100vw;
        grid-template-areas:
                "nav_main"
                "map_wrapper"
                "nav_sub"
                "main";
    }

    .lightbox {
        width: 85%;
        height: 85%;
    }

    #lightbox_close {
        width: 4.5em;
        height: 4.5em;
        top: 4%;
        left: 84%;
    }

    img.img-fitHeight {
        max-height: 40px;
    }

    img.img-fitHeightSmall {
        max-height: 22px;
    }

}

@media screen and (orientation: landscape) {
    body {
        grid-template-rows: 50px calc(100vh - 50px);
        grid-template-columns: 60vw 40vw;
        grid-template-areas:
                "nav_main nav_sub"
                "map_wrapper main";
    }

    .lightbox {
        width: 65%;
        height: 85%;
    }

    #lightbox_close {
        width: 4.5em;
        height: 4.5em;
        top: 4%;
        left: 81%;
    }

    #nav_sub {
        border-left: 1px solid var(--color-primary-800);
    }

    #nav_sub .header.hour {
        grid-template-columns: 8% 8% 33% 8% 8% 8% 8% 8% 11%;
        height: 100%;
    }

    img.img-fitHeight {
        max-height: 40px;
    }

    img.img-fitHeightSmall {
        max-height: 22px;
    }

}

@media screen and (orientation: landscape) and (max-width: 1023px) {
    body {
        grid-template-columns: 50vw 50vw;
    }

    #nav_sub .header.hour {
        grid-template-columns: 9% 9% 31% 8% 8% 8% 8% 8% 11%;
        height: 100%;
    }
}


@media screen and (orientation: landscape) and (max-width: 932px) {
    .lightbox {
        width: 85%;
        height: 85%;
    }

    #lightbox_close {
        width: 4em;
        height: 4em;
        top: 4%;
        left: 89%;
    }
}


/*--------------------------------------------------------------
#                 CONTROL FULL SCREEN LEAFLET
--------------------------------------------------------------*/
.fullscreen-icon {
    background-image: url('../img/ico/icon-fullscreen.svg');
    background-size: 26px 52px;
}


.fullscreen-icon.leaflet-fullscreen-on {
    background-position: 0 -26px;
}

.leaflet-touch .fullscreen-icon {
    background-position: 2px 2px;
}

.leaflet-touch .fullscreen-icon.leaflet-fullscreen-on {
    background-position: 2px -24px;
}

/* Safari still needs this vendor-prefix: https://caniuse.com/mdn-css_selectors_fullscreen */
/* stylelint-disable-next-line selector-no-vendor-prefix */
.leaflet-container:-webkit-full-screen {
    width: 100% !important;
    height: 100% !important;
    z-index: 99999;
}

.leaflet-container:fullscreen {
    width: 100% !important;
    height: 100% !important;
    z-index: 99999;
}

.leaflet-pseudo-fullscreen {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99999;
}

.iconTemperature {
}

.iconTemperatureText {
    font-weight: bold;
    font-size: 1.5em;
    color: white;
    background-color: rgba(18,38,48,0.65);
    padding: 0.05em;
    border-radius: 10%;
    margin-top: -0.25em;
}

.iconDateText, .iconDateTextSmall {
    font-weight: bold;
    font-size: 0.87em;
    padding: 0.05em;
    color: white;
    background-color: rgba(175, 121, 60, 1);
    text-align: center;
}

.iconDateTextSmall {
    font-size: 0.75em;
}

.iconDateTextBkg {
    background-color: rgba(175, 121, 60, 1);
}

.iconWindText {
    font-size: 0.87em;
    padding: 0.05em;
    color: white;
    background-color: rgba(18,38,48,0.65);
    text-align: center;
}

#icongrid {
    display: grid;
    grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    height: 100%;
    justify-items: center;
}

#icondiv1{
    grid-area: 1 / 1 / 2 / 2;
}
#icondiv2{
    grid-area: 2 / 1 / 3 / 2;
}
#icondiv3{
    grid-area: 3 / 1 / 4 / 2;
}
#icondiv4{
    grid-area: 4 / 1 / 5 / 2;
}
#icondiv5{
    grid-area: 5 / 1 / 6 / 2;
}

