@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;400;700&display=swap');

:root {
    --light-grey: #3c3c44;
    --transprent-light: rgba(24 , 24, 27, 0.8);
    --transprent:  rgba(42, 43, 42, 0.418);
    --white: #ffff;
    --grey: #757575;
    --red-transprent: rgba(255, 0, 0, 0.6);
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    background-image: url("weather-earth.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    font-family: 'Poppins', sans-serif;
    color: var(--white);
    min-height: 100vh;
}
h1{
    width: 100%;
    font-size: 1.5rem;
    text-align: center;
    font-weight: 400;
    text-transform: capitalize;
    letter-spacing: .3rem;
}
.container {
    display: flex;
    flex-direction: column;
    padding: 30px;   
    align-items: center;
}





.container .search {
    display: flex;
    flex-direction: column;
    margin-top: 50%;
    padding: 15px 15px;
}
.container.active .search{
    display: none;
}
.search .input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    width: 100%;
}
.search .input-container input {
    background: var(--transprent-light);
    color: var(--white);
    padding: 10px 15px;
    width: 100%;
    border: none;
    font-size: 1rem;
}
.search .input-container input:focus {
    border: none;
    outline: none;
}
.search .input-container .btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
}
.search .input-container .btn i {
    font-size: 2rem;
    margin: 10px;
    color: var(--white);
}

.search .error-container .error-text {
    font-size: .8rem;
    font-weight: 400;
    letter-spacing: .2rem;
    text-transform: capitalize;
}
.error-text.error {
    color: var(--white);
    background: var(--red-transprent);
    padding: 10px 25px;
    border-radius: 8px;
}
.error-text.wait {
    color: var(--white);
    padding: 10px 25px;
    background: var(--transprent);
    border-radius: 8px;     
}
.container .current  {
    justify-content: space-between;
}
.date-container .time {
    font-size: 5rem;
    font-weight: 100;
}
.date-container .time  #am-pm {
    font-size: 2.5rem;
    text-transform: uppercase;
}
.date-container .date {
    font-size: 1.7rem;
}
.place {
    text-align: center;
    display: none;
    flex-direction: column;
}
.container.active .place {
    display: flex;
}
.place .time-zone {
    font-size: 2rem;
    font-weight: 100;
}
.place .country {
    font-size: 1rem;
    font-weight: 700;
}
.current {
    display: none;
}
.container.active .current{
    display: flex;
}
.current .others  {
    display: flex;
    flex-direction: column;
    font-size: 1rem;
    font-weight: 200;
    text-transform: capitalize;
    background-color: var(--transprent);
    padding: 20px;
    border-radius: 10px;
    margin: 10px 0;
}

.current .others .weather-condition-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-size: 1.5rem;
    margin: 15px;
}
.current .others .other-details {
    display: flex;
    flex-direction: column;
    padding: 20px;
}
.others .other-details .grid-left, .grid-right {
    display: flex;
    flex-direction: column;
    margin: 10px;
}
.others .other-details .grid-left .spaced-content {
    display: flex;
    justify-content: space-evenly;
}
.others .other-details .grid-right .spaced-content {
    display: flex;
    justify-content: space-evenly;
}
.other-details .grid-left .spaced-content div {
    font-size: 1rem;
}
.other-details .grid-right .spaced-content div {
    font-size: 1rem;
}


@media only screen and (min-width: 769px){
    h1 {
        font-size: 3rem;
    }    
    .container .search {
        margin-top: 15%;
        padding: 15px 15px;
        width: 100%;
        align-items: center;
        justify-content: center;
    }
    .search .input-container {
        font-size: 1.2rem;
        padding: 20px ;
    }
    .search .input-container input { 
        width: 70%;
        padding: 20px 15px;
    }
   
    .search .error-container .error-text {
        font-size: .9rem;
    }
    .search .input-container .btn i {
        font-size: 2.5rem;
    }
    .place {
        display: none;
    }
    .current {
        display: none;
    }
    .container.active .current{
        display: flex;
    }
    
    .current .others  {
        display: flex;
        flex-direction: row;
    }
    
    .current .others .weather-condition-container {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 30px;
        font-size: 2rem;
        margin: 15px;
    }
    .current .others .other-details {
        display: flex;
        flex-direction: row;
        padding: 20px;
        margin-left: 40px;
    }
    .others .other-details .grid-left, .grid-right {
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;    
        margin: 10px;
        padding: 0 50px;
    }

    .others .other-details .grid-left .spaced-content {
        display: flex;
        justify-content: space-evenly;
    }
    .others .other-details .grid-right .spaced-content {
        display: flex;
        justify-content: space-evenly;
    }
    .other-details .grid-left .spaced-content div {
        margin: 0 50px;
        font-size: 1.2rem;
    }
    .other-details .grid-right .spaced-content div {
        margin: 0 50px;
        font-size: 1.2rem;
    }

}

