@import url('https://fonts.googleapis.com/css2?family=Hind:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caveat&display=swap');

*{
    font-family: 'Hind', sans-serif;
    overflow: hidden;
    transition: all 0.5s ease;
}

*::-webkit-scrollbar {
    width: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
}
body{
    text-align: center;
    color: white;
    margin: 0;
    background-image: url('src/img/main.avif'); background-size: cover; background-position: center; background-repeat: no-repeat;
}
.favicon{
    max-height: 60px; 
    vertical-align: middle;
    margin-right: 10px;
}
h1{
    font-size: 55px;
    font-family: 'Caveat', cursive;
}
hr{
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255);
    border-radius: 50%;
    margin-top: -10px;
    margin-bottom: 10px;
}
.container {
    display: flex;
    background-size: cover;
    background-position: center;
    background-image: url('src/img/main.avif');
    background-repeat: no-repeat;
    align-items: center;
    justify-content: center;
    min-height: 110dvh;
}
.background {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    margin-top: -40px;
    width: 40%;
    background-color: transparent;
    backdrop-filter: blur(10px);
    filter: brightness(0.98);
    box-shadow: 0px 0px 5px -1px rgba(0, 0, 0, 0.5);
}
.textShadow{
    text-shadow: 0px 0px 4px black;
}
/* Weather Conditions */
.ash{animation:fadeIn 1.3s;background-image:url('src/img/ash.webp');}
.clear{animation:fadeIn 1.3s;background-image:url('src/img/clear.gif');}
.clouds{animation:fadeIn 1.3s;background-image:url('src/img/clouds.webp');}
.drizzle{animation:fadeIn 1.3s;background-image:url('src/img/drizzle.gif');}
.fog{animation:fadeIn 1.3s;background-image:url('src/img/fog.webp');}
.haze{animation:fadeIn 1.3s;background-image:url('src/img/mist.webp');}
.mist{animation:fadeIn 1.3s;background-image:url('src/img/mist.webp');}
.rain{animation:fadeIn 1.3s;background-image:url('src/img/rainy.webp');}
.sand{animation:fadeIn 1.3s;background-image:url('src/img/sand.webp');}
.smoke{animation:fadeIn 1.3s;background-image:url('src/img/smoke.webp');}
.snow{animation:fadeIn 1.3s;background-image:url('src/img/snow.webp');}
.squall{animation:fadeIn 1.3s;background-image:url('src/img/squall.jpg');}
.thunderstorm{animation:fadeIn 1.3s;background-image:url('src/img/thunderstorm.webp');}
.tornado{animation:fadeIn 1.3s;background-image:url('src/img/tornado.webp');}

.searchSection{
    margin: 1.5em;
    text-wrap: pretty;
}
.weather{
    padding: 1em;
    display: none;
}
.searchResultsContainer{
    display: none;
    margin-top: -20px;
}
#searchResults{
    align-items: center;
    text-align: center;
    border-radius: 0.85em;
    flex-wrap: wrap;
    max-height: 100px;
    z-index: 10;
    overflow: auto;
    transition: height 1s ease;
}
#searchResults button{
    text-align: left;
    width: auto;
    max-height: 40px;
    margin: 3px;
    font-size: 15px;
}
#weatherStatus{
    font-size: 29px;
    margin-bottom: -0.1em;
}
#errorText{
    margin: 0 auto;
}
#error{
    text-align: center;
}
#error404{
    margin: 0 auto;
    display: none;
    max-height: 240px;
    position: relative;
}
input{
    width: 94%;
    border: 1px solid white;
    border-radius: 5px;
    font-size: 16px;
    padding: 0.4em;
}
button{
    background-color: transparent;
    color: white;
    cursor: pointer;
    width: 98%;
    border: 1px solid white;
    border-radius: 5px;
    font-size: 18px;
    padding: 0.4em;
}
button:hover{
    background-color: rgba(255, 255, 255, 0.3);
    color: rgba(0, 0, 0, 0.7);
}
#noSelected {
    padding: 1em;
    position: absolute; right: -300px; bottom: 40px;
    cursor: default;
    display: none;
    opacity: 0;
}
#noSelected span{
    font-size: 18px;
    padding: 0.5em;
    border-radius: 1em;
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.5);
    
}
@keyframes fadeIn {
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}
.flag{
    opacity: 0;
}
.hide{
    animation: fadeIn 1.2s;display: none;
}
.fadeIn{
    animation: fadeIn 1s ease-in-out both;
}
.show{
    display: block;
}
.flex {
    margin-bottom: -20px;
    width: 100%;
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
}
.item{
    margin: 0.8em;
    cursor: pointer;
}
header{
    width: 100%; height: auto;
    position: absolute; top: 0; left: 0;
    z-index: 10;
}
nav{
    display: flex; justify-content: space-between;
    height: 100px;
}
#myLocation{
    position: relative; top: 36px;
    width: auto;
    margin-left: 3.5em; margin-right: 10px;
    background-color: transparent; backdrop-filter: blur(20px); box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
}
#myLocation:hover{
    color: white;
    background-color: rgba(0, 0, 0, 0.2);
}
#myLocation img{
    vertical-align: middle;
    width: 35px;
    height: 35px;
}
.githubProfile{
    margin-right: 4em; position: relative; top: 40px;
    &:hover{
        filter: brightness(0);
    }
}
footer{
    position: absolute;
    bottom: 10px;
    text-align: center;
    width: 100%;
}
footer p{
    background-color: transparent;
    backdrop-filter: blur(4px);
    width: 15em;
    font-size: 18px;
    border-radius: 2em;
    box-shadow: 0px 0px 20px 2px rgba(0, 0, 0, 0.5);
    margin: 20px auto;
}
.StevenTete {
    position: relative;
    color: white;
    font-weight: bold;
    text-decoration: none;
}
.StevenTete:hover {
    color: yellow;
}
.StevenTete::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 4px;
    left: 0;
    background-color: yellow;
    transition: width 0.3s ease;
}
.StevenTete:hover::before {
    width: 100%;
}
@keyframes tooltipTransition {
    0%{
        visibility: hidden;
        opacity: 0;
    }100%{
        visibility: visible;
        opacity: 1;
    }
}
@keyframes tooltipOut {
    0%{
        visibility: visible;
        opacity: 1;
    }100%{
        visibility: hidden;
        opacity: 0;
    }
}
.tooltip {
    position: absolute;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    font-size: 14px;
    padding: 0.5em;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0.6em;
    margin: 1em;
    z-index: 2;
    visibility: hidden;
    opacity: 0;
}
.arrow {
    z-index: 3;
    position: absolute;
    width: 0;
    height: 0;
    transition: all 0.2s ease-in-out;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 15px solid rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 0;
}
#arrow1 { margin: 2.9em 16em 0 0; }
#arrow2 { margin: 2.9em 0 0 0.6em; }
#arrow3 { margin: 2.9em 0 0 18em; }
#tooltip1 { margin: 7em 19em 0 0; }
#tooltip2 { margin: 7em 17.5em 0 17.6em; }
#tooltip3 { margin: 7em 0 0 19.8em; }
.tooltipTransition{
    animation: tooltipTransition 0.3s ease-in-out both;
}
.tooltipOut{
    animation: tooltipOut 0.3s ease-in-out;
}
/* Responsive Styles */
@media (max-width: 800px) {
    body{
        animation: fadeIn 1s;
    }
    #temp,#humidity,#wind{text-wrap: wrap;}
    h1{
        font-size: 44px;
    }
    .favicon{
        max-height: 40px; 
        vertical-align: middle;
        margin-right: 10px;
    }
    #error404{
        max-height: 200px;
    }
    .background{
        width: 85%;
        padding: 0.2em 0em;
    }
    
    .item{
        padding-top: 20px;
        width: 33%;
        margin: -1.6em 0.8em;
        text-align: center;
    }
    .item img{
        display: block;
        margin: 8px auto;
    }
    .item h2{
        font-size: 18px;
        padding-bottom: 12px;
    }
    #myLocation{
        margin-left: 1.5em;
    }
    .githubProfile{
        margin-right: 1.5em;
    }
    #noSelected {
        padding: 2em;
        bottom: 90px; left: -370px;
        width: 100%;
    }
    #noSelected span{
        line-height: 17px; text-wrap: nowrap;
        width: 15em;
        font-size: 18px;
        border-radius: 2em;
        box-shadow: 0px 0px 20px 2px rgba(0, 0, 0, 0.3);
        margin: 20px auto;
    }
    .flex{
        margin-bottom: 0px;
    }
}
.contentDisabled{
    display: none;
    height: 100%; width: 100%;
    position: absolute;
    z-index: 15;
    background-color: transparent;
    backdrop-filter: blur(16px);
    transition: none;
}
@media (max-width: 350px) {
    body{
        background-repeat: no-repeat;
        background-size: 100% 200dvh;
    }
    header, footer, .container{
        display: none;
    }
    .contentDisabled{
        display: block;
    }
}
@media (min-width: 800px) and (max-width: 1000px){
    .background{
        width: 70%;
    }
}
.connected, .disconnected{
    width: 140px; position: absolute; bottom: 30px; left: 30px; scale: 0;
    text-shadow: 0px 0px 4px black;
}
.wifi, .disconnectedLogo{
    vertical-align: middle;
}