@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body{
    min-height: 100vh;
    color: #f5f5f5;
}

.bg-image1{
    background: linear-gradient(to right, rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url("images/bg_images/bg1.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    padding: 30px 0;
    height: 100vh;
}

/* Search and Notification Start */
.search-n-notification{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 32px;
    position: relative;
}

.search-container{
    margin: 32px;
    padding: 10px 16px;
    /* border-bottom: 2px solid #f5f5f5; */
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    transition: background 0.5s;

    backdrop-filter: blur( 3px );
    -webkit-backdrop-filter: blur( 3.0px );
}

.search-container:hover{
    background: rgba(255, 255, 255, 0.29);
}

.search-container:focus-within{
    background: rgba(255, 255, 255, 0.29);
}

input#search-box{
    background: none;
    border: none;
    outline: none;
    color: #f5f5f5;
    font-size: 25px;
    width: 307px;
    transition: width 0.4s;
}

input#search-box::placeholder{
    color: #f5f5f5;
}

input#search-box:focus{
    width: 390px;
}

button.search-btn {
    background: none;
    color: #f5f5f5;
    border: none;
    cursor: pointer;
    font-size: 25px;
    margin-left: 9px;
}

.notification-container{
    font-size: 25px;
    display: none;
    position: absolute;
    top: 100px;
}

.notification-container.show-notification-container{
    display: flex;
}
/* Search and Notification End */

/* Weather Main Start */
.weather-main {
    max-width: 70%;
    margin: 40px auto;
    font-size: 25px;
}

.weather-info__city-country {
    font-size: 50px;
    margin-bottom: 8px;
}

.weather-info__date, .weather-info__time {
    font-size: 30px;
    margin-bottom: 5px;
}

.weather-info-center{
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.weather-info__temperature-description{
    text-align: center;
    margin: auto 0;
}

.weather-info__temperature_outer_container{
    font-size: 100px;
    font-weight: 400;
    display: flex;
    justify-content: center;
}

.weather-info__description{
    font-size: 40px;
    font-weight: 400;
    text-transform: capitalize;
}

.weather-info__icon{
    height: 200px;
    width: 200px;
}

.weather-details-container{
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

.weather-details{
    /* background-color: rgba(214, 214, 214, 0.247); */
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    margin: 10px;
    flex: 1 1 22%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    box-shadow: 0 2px 17px 0 rgba( 255, 255, 255, 0.2);
    backdrop-filter: blur( 3px );
    -webkit-backdrop-filter: blur( 3.0px );
    border: 1px solid rgba( 255, 255, 255, 0.18);

    transition: background 0.3s;
}

.weather-details:hover{
    background-color: rgba(214, 214, 214, 0.1);
}

.weather-details__icon{
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}

.weather-details__data_outer_container{
    display: flex;
    justify-content: center;
}
/* Weather Main End */

.bg2{
    background: linear-gradient(to top left, #540034, #000947);
    padding: 30px 0;
}

/* Weather Forecast Start */
.weather-forecast{
    max-width: 90%;
    margin: 40px auto;
    font-size: 25px;
}

/* Tab Buttons Start */
.tabs{
    display: flex;
    margin-bottom: 20px;
}

.tab-btn{
    font-size: 35px;
    font-weight: 500;
    background-color: rgba( 255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    margin-right: 10px;
}

.tab-btn:hover{
    background-color: rgba( 255, 255, 255, 0.19);
}

.tab-btn.active-tab{
    background-color: rgba( 255, 255, 255, 0.25);
}
/* Tab Buttons End */

/* Tab Content - Hourly and Weekly Forecast Start */
.tab-content{
    display: none;
    animation: fadeEffect 1s;
}

@keyframes fadeEffect {
    from {
        opacity: 0;
        transform: translate(-120px, 0px);
    }
    to {
        opacity: 1;
        transform: translate(0px);
    }
}

.tab-content.active-tab-content{
    display: block;
}

.weather-forecast .heading{
    font-size: 35px;
    font-weight: 500;
    margin-bottom: 20px;
}

.forecast-hourly-container, .forecast-weekly-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    overflow: auto;
    margin-bottom: 60px;
    /* border: 2px solid rgba(255, 255, 255, 0.29); */
}

.forecast-hourly, .forecast-weekly {
    margin: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    /* background-color: rgba(214, 214, 214, 0.247); */
    padding: 25px;
    border-radius: 0 25px 0 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 0 0 10%;
    text-align: center;

    box-shadow: 0 2px 10px 0 rgba( 255, 255, 255, 0.2);
    backdrop-filter: blur( 3px );
    -webkit-backdrop-filter: blur( 3.0px );

    transition: background 0.15s;
}

.forecast-hourly:hover, .forecast-weekly:hover{
    background-color: rgba(255, 255, 255, 0.1);
}

.forecast-hourly .forecast-hourly__icon, .forecast-weekly .forecast-weekly__icon {
    width: 100px;
    height: 100px;
    margin: 10px 0;
}

.forecast-hourly__temperature_outer_container, .forecast-weekly__temperature_outer_container {
    display: flex;
    justify-content: center;
}

.forecast-hourly__description, .forecast-weekly__description{
    font-size: 20px;
    text-transform: capitalize;
}

.forecast-weekly{
    flex: 0 0 15%;
}

.SLASH{
    font-size: 30px;
    line-height: 1;
}
/* Tab Content - Hourly and Weekly Forecast End */

/* Weather Forecast End */


/* Toggle Button Start */
body{
    position: relative;
}

.button
{
    position: absolute;
    top: 4%;
    right: 6%;
    width: 94px;
    height: 36px;
    overflow: hidden;
    border-radius: 20px;
}

.checkbox
{
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
}

.temp-units, .layer
{
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.temp-units
{
    z-index: 2;
}

#toggle-button .temp-units:before, #toggle-button .temp-units:after, #toggle-button .temp-units span
{
    position: absolute;
    top: 4px;
    width: 40px;
    height: 10px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    line-height: 0.8;
    padding: 9px 4px;
    border-radius: 20px;
    transition: 0.3s ease all;
}

#toggle-button .temp-units:before
{
    content: '';
    left: 4px;
    background-color: rgba(255, 255, 255, 0.24);
}

#toggle-button .temp-units:after
{
    content: '°F';
    right: 4px;
}

#toggle-button .temp-units span
{
    left: 7px;
}

#toggle-button .checkbox:checked + .temp-units:before
{
    left: 42px;
}

.layer
{
    width: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s ease all;
}

/* Toggle Button End */


/* Adding active and not adding active styles - Start */
.weather-main, .bg2, .button{
    display: none;
}    

.weather-main.active, .bg2.active, .button.active{
    display: block;
}    

.bg-image1.active{
    height: auto;
}
/* Adding active and not adding active styles - End */


/* Media Queries */
@media only screen and (max-width: 768px){
    .bg-image1{
        background: linear-gradient(to right, rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url("images/bg_images/bg1-sm.png");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    input#search-box, input#search-box:focus {
        width: 307px;
    }
    
    .button {
        top: 4%;
        right: 5%;
    }   

    .notification-container{
        text-align: center;
        font-size: 21px;
    }

    .weather-main {
        max-width: 85%;
        margin: 40px auto;
        font-size: 20px;
    }

    .weather-info__city-country {
        font-size: 40px;
    }

    .weather-info__temperature_outer_container {
        font-size: 80px;
    }

    .weather-info__icon {
        height: 150px;
        width: 150px;
    }

    .weather-forecast {
        font-size: 20px;
    }

    .weather-forecast .heading, .tab-btn {
        font-size: 30px;
    }

    .forecast-hourly__description,.forecast-weekly__description {
        font-size: 18px;
    }
}

@media only screen and (max-width: 426px){
    input#search-box, input#search-box:focus {
        width: 290px;
    }

    .search-n-notification, .search-container {
        margin: 0;
    }

    .notification-container {
        font-size: 15px;
        top: 53px;
        margin: 0 10px;
    }

    input#search-box, button.search-btn {
        font-size: 16px;
    }

    .button {
        top: 5%;
        right: 5%;
        width: 84px;
    }

    #toggle-button .temp-units:before, #toggle-button .temp-units:after, #toggle-button .temp-units span{
        width: 30px;
    }

    .weather-info__city-country {
        font-size: 27px;
        padding-top: 58px;
    }

    .weather-info__date, .weather-info__time {
        font-size: 20px;
    }

    .weather-info__temperature_outer_container {
        font-size: 50px;
    }

    .weather-info__description {
        font-size: 30px;
    }

    .weather-info__icon {
        height: 120px;
        width: 120px;
    }

    .weather-details__icon {
        width: 80px;
        height: 80px;
    }

    .weather-forecast .heading, .tab-btn {
        font-size: 26px;
    }

    .forecast-hourly,.forecast-weekly {
        margin: 6px;
    }

    .forecast-hourly .forecast-hourly__icon, .forecast-weekly .forecast-weekly__icon {
        width: 90px;
        height: 90px;
    }
}

@media only screen and (max-width: 320px){
    .button {
        top: 4%;
        width: 70px;
    }

    #toggle-button .temp-units:before, #toggle-button .temp-units:after, #toggle-button .temp-units span {
        width: 23px;
        font-size: 13px;
    }

    #toggle-button .checkbox:checked + .temp-units:before {
        left: 35px;
    }

    input#search-box, input#search-box:focus {
        width: 225px;
    }

    .notification-container {
        margin: 0;
    }

    .weather-info__temperature_outer_container {
        font-size: 40px;
    }

    .weather-info__description {
        font-size: 27px;
    }

    .weather-info__icon {
        height: 100px;
        width: 100px;
    }
}