@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Roboto:wght@400;500&display=swap');

*{
    margin: 0;
    left: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root{
    --sky-blue:#43AFFC;
    --sky-blue2:#00cec9;
}

html {
   font-size: 62.5%;
}

body{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background:url(images/cloud.jpg);
}

.wrapper{
    width: 35%;
    border-radius: .7rem ;
    background: #fff;
}

.wrapper header{
    color: var(--sky-blue);
    font-size: 2rem;
    font-weight: 600;
    padding: 1.6rem 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #bfbfbf;
}

header i{
    cursor: pointer;
    font-size: 2rem;
    margin-right: .8rem;
    color: var(--sky-blue);
}

.wrapper.active header i{
    font-size: 3rem;
    margin-left: .5rem;
}
.wrapper.active .input-part{
    display: none;
}

.wrapper .input-part{
    /* display: none; */
    margin: 2rem 2.5rem 3rem;
}

.input-part :where(input, button){
    width: 100%;
    height: 4rem;
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: .5rem;
    font-size: 1.6rem;
    font-weight: 500;
}

.input-part input{
    border: 1px solid #bfbfbf;
    height: 4rem;
    text-align: center;
    font-size: 1.4;
    cursor: text;

}

.input-part button{
    color: #fff;
    background: var(--sky-blue);
}

.input-part button:hover{
    background: #76bff3;
    z-index: 2;
}


.input-part .seperator{
    height: 1px;
    width: 100%;
    margin: 2rem 0;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seperator::before{
    content: "or";
    color: #ccc;
    font-size: 1.5rem;
    padding: 0 1.5rem;
    background: #fff;
}

.input-part .info-txt{
    font-size: 1.4rem;
    display: none;
    text-align: center;
    padding: 1.2rem 1rem;
    border-radius: .5rem;
    margin-bottom: 1rem;
}

.info-txt.error{
    display: block;
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.info-txt.pending{
    display: block;
    color: #0c5460;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
}

.input-part input:is(:focus, :valid){
    border: 2px solid var(--sky-blue);
}


/* main area of app */

.wrapper .weather-part{
    margin: 3rem 0 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.weather-part img{
    width: 15vw;
    height: 33vh;
    margin-top: -4rem;
}

.wrapper.active .weather-part{
    display: flex;
}

.weather-part .temp{
    display: flex;
    font-size: 6rem;
    font-weight: 600;
}
.weather-part .deg{
    margin-left: -2rem;
}
.weather-part .temp .deg{
    font-size: 4rem;
    margin: 1rem 0 0 ;
    display: block;
}

.weather-part .weather{
    font-size: 1.7rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 1rem;
}

.weather-part .location{
    display: flex;
    align-items: center;
    font-size: 1.7rem;
    margin-bottom: 3rem;
}

.location i{
    font-size: 1.8rem;
    margin-right: .5rem;
}

.weather-part .bottom-details{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #bfbfbf;
}

.bottom-details .column{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.column i{
    color: var(--sky-blue);
    font-size: 3rem;
}

.humidity{
    border-left: 1px solid #bfbfbf;
}

.details{
    padding: .7rem;
}

.details .temp, .humidity span{
    font-size: 1.8rem;
    font-weight: 600;
}

.details .temp .deg{
    margin: 0;
    font-size: 1.6rem;
    pad: 0 .2rem 0 .1rem;
}


.details p{
    font-size: 1.4rem;
    margin-top: -.8rem;
}


@media (max-width:380px){
    html {
        font-size: 50%;
     }

     .wrapper{
        width: 80%;
        height: 50%;
        border-radius: .7rem ;
        background: #fff;
    }

    .weather-part img{
        width: 50vw;
        height: 35vh;
        margin-top: -4rem;
    }
}