@import url('https://fonts.googleapis.com/css?family=Montserrat&display=swap');
:root {
    --theme-color-main: rgba(0, 100, 150, .75);
    --theme-color-white: rgba(255, 255, 255, 1);
    --theme-color-grey: #333333;
}

* {
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

hr {
    color: #FFFFFF;
    margin: 0;
}

html {
    height: 100%;
}

body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-size: 25px;
}

small {
    font-size: 0.5em;
}

button  {
    border: none;
    background-size: contain;
    background-color: transparent;
    height: 100%;
    min-width: 60px;
    padding: 15px;
    cursor: pointer;
    margin: 0;
    font-size: 25px;
    color: #FFFFFF;
    display: table-cell;
    vertical-align: middle;
}

button#top_close > img, button#top_open > img, button#bottom_openClose > img {
    height: 100%;
}

#meteo {
    overflow: hidden !important;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    font-size: inherit;
    color: var(--theme-color-white);
    user-select: none;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #000000;
}


/* +++++++++++++++++++++++++++++++++ LOADER +++++++++++++++++++++++++++++++++++++++++++++*/

    #meteo-loader {
        display: flex;
        position: absolute;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: var(--theme-color-grey);
        align-items: center;
        justify-content: center;
        transition: opacity 0.5s;
    }

        #meteo-loader>div {
            border: 5px solid #555555;
            border-radius: 50%;
            border-top: 5px solid #4591b7;
            width: 10%;
            animation: spin 1s linear infinite;
        }
        #meteo-loader>div:after {
            content: "";
            display: block;
            padding-bottom: 100%;
        }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* --------------------------------- LOADER ---------------------------------------------*/

    #meteo-browser_support {
      display: none;
      position: fixed;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      background-color: #333;
      color: #FFF;
      z-index: 1;
      vertical-align: middle;
      text-align: center;
    }

    #meteo-top {
        position: relative;
        top: -100%;
        width: 100%;
        height: calc(100% + 60px);
        color: #FFFFFF;
        background-color: var(--theme-color-main);
        transition: 0.5s;
    }
        #meteo-top-top {
            position: absolute;
            width: 100%;
            padding: 0;
            display: grid;
            grid-template-columns: 60px calc(100% - 120px);
            grid-template-rows: 60px 5px auto;
            grid-template-areas:
              "top_close meteo-top-top-tab_buttons"
              "hr hr";
            align-items: center;
            background-color: rgb(0,33,50);
            font-size: inherit;
            height: 60px;
            overflow: hidden;
            z-index: 1;
        }
            #meteo-top-top-spacer {
              position: relative;
              height: 60px;
            }
            #meteo-top-top-hr { grid-area: hr; }
            #top_close { grid-area: top_close; }
            #chartMenu_openClose { grid-area: chartMenu_openClose; }

            #meteo-top-top-tab_buttons {
                grid-area: meteo-top-top-tab_buttons;
                margin: auto;
                display: flex;
                flex-direction: row;
                height: 100%;
            }

                #meteo-top-top-tab_buttons > button {
                    background-color: transparent;
                    color: #FFFFFF;
                    font-family: inherit;
                    font-size: inherit;
                    border: none;
                    outline: none;
                    cursor: pointer;
                    padding: 10px;
                    margin: 0;
                }
                #meteo-top-top-tab_buttons > button.active {
                    border-bottom: 2px solid #FFFFFF;
                }
                #meteo-top-top-tab_buttons > button:hover {
                    border-left-width: 0 !important;
                }

        #meteo-top-tabs {
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            height: calc(100% - 120px);
            padding: 20px;
            overflow-y: scroll;
        }

            .meteo-top-tabs-tab {
              position: relative;
            }
              .meteo-top-tabs-tab > .chart-container {
                position: relative;
                width: 100%;
                height: 50vh;
                margin: 10px 0;
              }

        #meteo-top-bottom {
            height: 60px;
            display: flex;
            justify-content: space-between;
        }

    #meteo-bottom {
        position: absolute;
        background-color: var(--theme-color-main);
        padding: 10px;
        height: 90px;
        width: 100%;
        bottom: 0;
        display: grid;
        grid-template-areas: "time meteo-bottom-hr_1 temperature meteo-bottom-hr_2 pressure meteo-bottom-hr_3 humidity";
        grid-template-columns: 1fr 2px 1fr 2px 1fr 2px 1fr;
        grid-template-rows: 1fr;
        transition: 0.5s;
    }

        #meteo-bottom>div {
            text-align: center;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            font-size: 15px;
        }

            #meteo-bottom>div>p.reload {
                font-size: 25px;
                text-decoration: none;
                margin: 0 !important;
                color: var(--theme-color-white);
                transition: opacity .5s ease-in-out;
            }

        #meteo-bottom>.time { grid-area: time; }
        #meteo-bottom>.temperature { grid-area: temperature; }
        #meteo-bottom>.pressure { grid-area: pressure; }
        #meteo-bottom>.humidity { grid-area: humidity; }
        #meteo-bottom-hr_1 { grid-area: meteo-bottom-hr_1; }
        #meteo-bottom-hr_2 { grid-area: meteo-bottom-hr_2; }
        #meteo-bottom-hr_3 { grid-area: meteo-bottom-hr_3; }


@media (max-width: 720px) {
    #meteo-bottom {
        grid-template-areas:
            "time meteo-bottom-hr_1 temperature"
            "meteo-bottom-hr_2 meteo-bottom-hr_2  meteo-bottom-hr_2"
            "pressure meteo-bottom-hr_3  humidity";
        grid-template-columns: 1fr 2px 1fr;
        grid-template-rows: 1fr 2px 1fr;
        height: 180px;
    }
}

@media (max-width: 550px) {
    #meteo-top-top {
        height: 60px;
        grid-template-areas:
          "top_close none chartMenu_openClose"
          "hr hr hr"
          "meteo-top-top-tab_buttons meteo-top-top-tab_buttons meteo-top-top-tab_buttons";
        grid-template-columns: 60px calc(100% - 185px);
    }

    #meteo-top-top-tab_buttons {
        flex-direction: column;
        width: 100%;
    }

    #meteo-top-top-tab_buttons > button.active {
      border: 0;
      color: rgb(0,33,50);
      background-color: rgb(255,255,255);
    }

    #meteo-top-top-tab_buttons > button:not(.active):hover {
      background-color: rgba(255,255,255,.5);
    }
    #meteo-top-tabs {
        height: calc(100% - 120px);


}

@media (max-width: 350px) {
    #meteo-bottom {
        grid-template-areas:
            "time"
            "meteo-bottom-hr_1"
            "temperature"
            "meteo-bottom-hr_2"
            "pressure"
            "meteo-bottom-hr_3"
            "humidity";
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 2px 1fr 2px 1fr 2px 1fr;
        height: 360px;
    }
}
