:root{
    --background-color-card: #0093E9;
    --background-image-card: linear-gradient(160deg, #0093E9 0%, #80D0C7 100%);

    --background-image-primary:  linear-gradient(-225deg, #5D9FFF 0%, #B8DCFF 48%, #6BBBFF 100%);
    --btn-col-hover: #d0ebff;

    --col-text:#212529;
    --col-background:#f2f2f2;
}


/*Default Styles*/
*{
    margin:0;
    padding:0;
    box-sizing: border-box;
}

body{
    font-family: Arial, sans-serif;
    background-color: var(--col-background);
    /*background-color: #333333;*/
    min-height: 100%;
    transition: all 0.3s ease-in-out;
    color: var(--col-text);
}

body.dark-mode {
    background-color: var(--col-text);
}

html{
    font-size:62.5%;
}

h1{
    font-size: 3.6rem;
}

h2{
    font-size: 2.4rem;
}

h3{
    font-size: 2.1rem;
    font-weight: normal;
}

h4{
    font-size: 1.8rem;
    font-weight: normal;
}

a{
    text-decoration: none;
}

li{
    list-style: none;
}

span{
    font-size: 1.8rem;
}


/*General Styles*/
.btn{
    height:3.6rem;
    width:3.6rem;
    border: none;
    background-color: inherit;
    border-radius: 0.6rem;
    transition: all 0.1s ease-in-out;
}

.btn:hover{
    background-color: var(--btn-col-hover);
    cursor: pointer;
    transform: scale(1.1);
}

.width-1{
    width: 80vw;
    margin: auto;
}

.hidden{
    display: none;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.btn-active{
    border:0.3rem solid #339af0;
}

.blurBackground-error {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.error-closePopupBtn {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 3rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.error-closePopupBtn:hover{
    color: red;
}


/* Header */
nav{
    display:flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding:2.4rem 3rem;
    background-image: var(--background-image-primary);
    margin-bottom: 2.4rem;
    box-shadow: 1px 3px 9px -4px rgba(0,0,0,0.59);
    -webkit-box-shadow: 1px 3px 9px -4px rgba(0,0,0,0.59);
    -moz-box-shadow: 1px 3px 9px -4px rgba(0,0,0,0.59);
}

nav h1{
    background-color: inherit;
    color: white;
    padding:0.5rem;
    transform: skewX(-10deg);
}

.nav-right{
    display: flex;
}

nav ul{
    display: flex;
    align-items: center;
}

nav ul li{
    margin-right: 2rem;
}

.form-search{
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-search{
    width: 20rem;
    padding:1.2rem 0.5rem;
    border-radius: 0.6rem;
    font-size: 1.8rem;
    border:0.1rem solid black;
    margin-right: 1.2rem;
}

.btn-search{
    height: 4.8rem;
    width: 4.8rem;
}


/* Main */
main{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding:1.2rem;

}


/* Change Unit */
.temperature-switch{
    align-self: flex-end;
    position: relative;
}

.btn-toggle-temp img{
    height: 3.6rem;
    width: 3.6rem;
}

.btn-toggle-temp:hover{
    background-color: inherit;
}

.weather-settings{
    background-color: var(--background-color-card);
    background-image: var(--background-image-card);
    position: absolute;
    top:5rem;
    right:1rem;
    width: 13vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-radius: 1.2rem;
    margin-bottom: 1.2rem;
    padding:1.2rem
}

.settings-top{
    width:100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.btn-close-settings{
    cursor:pointer;
    font-size: 2.4rem;
}

.settings-bottom{
    width:100%;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap:.6rem;
}

.units-btns{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 1.2rem;
}


/* Weather Card */
.weather-card__container{
    width: 40%;
    background-color: var(--background-color-card);
    background-image: var(--background-image-card);
    border-radius: 1.2rem;
    padding:1.2rem;
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    -webkit-box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition:all 0.3s ease-in-out;
}

.weather-card__container:hover{
    transform: translateY(-1rem);
    box-shadow: 0 8px 16px rgba(0,0,0,0.09);
    -webkit-box-shadow: 0 8px 16px rgba(0,0,0,0.09);
    -moz-box-shadow: 0 8px 16px rgba(0,0,0,0.09);
}

.weather-card{
    display: flex;
    flex-direction: column;
}
.weather-card h2{
    margin-bottom: 1.2rem;
}

.weather{
    margin-top: 2.4rem;
    display: flex;
    justify-content: flex-start;
    width:90%;
    gap:4.8rem
}

.temperature{
    display: flex;
    align-items: center;
    justify-content: center;
    gap:2.4rem
}

.weather-description{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap:1.2rem
}

.img-current__weather{
    height:9.6rem;
    width: 9.6rem;
}

.feels-like{
    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap:1.2rem;
}

.weather-details{
    margin-top: 6rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap:6rem;
}


/* Forecast */
.forecast-container{
    width: 100%;
    height: 50vh;
    margin-top: 3.6rem;
    align-self: flex-start;
    padding:1.2rem
}

body.dark-mode .forecast-container h2{
    color: var(--col-background);
}

.img-forecast__weather{
    height:6rem;
    width: 6rem;
}

.forecast{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 1.2rem;
    width: 100%;
}

.forecast-card{
    margin-right: 2.4rem;
    background-color: var(--btn-col-hover);
    border-radius: 1.2rem;
    padding:0.6rem;
    width:10%;
    height:15%;
    transition: all 0.2s ease-in-out;
}

.forecast-card:hover{
    transform: scale(1.1);
    box-shadow: 0 5px 7px -5px rgba(0,0,0,0.5);
    -webkit-box-shadow: 0 5px 7px -5px rgba(0,0,0,0.5);
    -moz-box-shadow: 0 5px 7px -5px rgba(0,0,0,0.5);
}

.forecast-details{
    height:70%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.high-low__temperature{
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap:2.4rem;
    width:50%;
}

.high-low{
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


/* Footer */
footer{
    height:10vh;
    background-image: var(--background-image-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
}

.img-social__links{
    height: 3.6rem;
    width: 3.6rem;
    cursor: pointer;
}

.social-media{
    margin-top: 1.2rem;
    display: flex;
    gap: 2.4rem;
}


/* Error Popup */
.error-popup {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30%;
    width: 30%;
    background-color: #ffffff;
    border-radius: 1.2rem;
    position: fixed; /* Position it fixed */
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust position */
    z-index: 1001; /* Ensure it's on top */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional shadow for better visibility */
    transition: opacity 0.3s; /* Smooth transition if showing/hiding */
}
