*, 
*::after, 
*::before{
    padding: 0%;
    margin: 0%;
    box-sizing: border-box;
    font-family: "Outfit", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}

body{
    min-height: 100vh;
    max-width: 100vw;
    background-color: #112d4e;
    background-image: linear-gradient(160deg, #112d4e 0%, #3f72af 100%);
    color: white;
    position: relative;
}

#wrapper{
    padding: 2rem;
    text-align: center;
}

h1{
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    word-spacing: 6px;
}

.location-section{
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 1px;
    word-spacing: 3px;
    margin: 0 auto;
    margin-top: 4rem;
    max-width: 700px;
    width: 90%;
}

.weather-tab{
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 5px;
}

.weather-tab.active{
    background-color: rgba(219, 226, 239, 0.5);
}

.weather-container{
    margin-block: 4rem;
}

.sub-container{
    width: 90%;
    margin: 0 auto;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grant-access{
    display: none;
    /* max-width: 700px;
    width: 90%;
    margin: 0 auto; */
    margin-top: 4rem;
}

.grant-access.active{
    display: block;
}

.grant-access p:first-of-type{
    margin-top: 2rem;
    font-size: 1.8rem;
    word-spacing: 3px;
}

.grant-access p:last-of-type{
    margin-top: 1rem;
    font-weight: 300;
    font-size: 1rem;
    word-spacing: 1px;
}

.grant-access button{
    margin: 1.5rem;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: all .3s ease-in-out;
    background-color: #3f72af;
    color: white;
    text-transform: uppercase;
    border: none;
}

.grant-access button:active{
    transform: scale(1.1);
    border: 1px solid;
}

.loading-section{
    display: none;
}

.loading-section.active{
    display: block;
}

.loading-section img{
    height: 9rem;
    width: 9rem;
}

.loading-section p{
    text-transform: uppercase;
    font-size: 1.5rem;
}

.search-section{
    display: none;
    /* display: flex; */
    align-items: center;
    justify-content: center;
    gap:0 10px;
    max-width: 700px;
    width: 90%;
    margin: 0 auto;
    margin-top: 2rem;
}

.search-section.active{
    display: block;
}

.search-section input{
    width: 85%;
    padding: 0.8rem 1rem;
    margin: 0.5rem;
    border-radius: 10px;
    background-color: rgba(219, 226, 239, 0.5);
    color: white;
    border: none;
}

.search-section input::placeholder{
    color: rgba(255, 255, 255, 0.712);
    font-size: 1rem;
    word-spacing: 1px;
}

.search-section input:focus{
    border: 3px solid rgba(219, 226, 239, 0.5);
    outline: none;
}

.search-section button{
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 50%;
    background-color: #3f72af;
    border: none;
    cursor: pointer;
}

.search-section button img{
    height: 1.5rem;
    width: 1.5rem;
}

.weather-display-section{
    display: none;
    letter-spacing: 1px;
}

.weather-display-section.active{
    display: block;
}

.city-header{
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.city-name{
    font-size: 2.3rem;
    font-weight: 300;
}

.city-flag{
    height: 1.5rem;
    width: 2rem; 
}

.city-weather{
    font-size: 1.5rem;
    font-weight: 200;
    margin-top: 1rem;
}

.weather-img{
    height: 4rem;
    width: 4rem;
}

.temperature{
    font-size: 3rem;
}

.cards{
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 700px;
    width: 90%;
    margin: 0 auto;
    margin-top: 1.5rem;
}

.card{
    width: 30%;
    max-width: 200px;
    border-radius: 5px;
    background-color: rgba(219, 226, 239, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    gap: 5px 0;
}

.card img{
    height: 4rem;
    object-fit: cover;
}

.card p:first-of-type{
    font-size: 1.5rem;
    font-weight: 300;
    text-transform: uppercase;
}

.card p:last-of-type{
    font-weight: 400;
    font-size: 1.8rem;
}

.api-error-container{
    display: none;
}

.api-error-container.active{
    display: flex;
    gap: 1rem 0;
}

.api-error-container p{
    text-align: center;
    font-size: 1.5rem;
}

.api-error-container img{
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1 /1;
    object-fit: cover;
}

.api-error-container button{
    margin: 1.5rem;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: all .3s ease-in-out;
    background-color: #3f72af;
    color: white;
    text-transform: uppercase;
    border: none;
}

.api-error-container button:active{
    transform: scale(1.1);
    border: 1px solid;
}

footer{
    position: fixed;
    background-color: transparent;
    text-align: center;
    top: 97%;
    left: 45%;
}

footer p{
    font-weight: 300;
}

@media(max-width: 600px){
    .card{
        width: 80%;
    }
}

@media((min-width: 601px) and (max-width: 992px)){
    .card{
        width: 45%;
    }
}
