/* font-family: 'Merriweather Sans', sans-serif; */


/* Universal selector */
*{
    margin: 0;
    border: 0;
    box-sizing: border-box;
    font-family: 'Merriweather Sans', sans-serif;
}

/* Global variables */
:root{
    --colorDark1: #11204E;
    --colorDark2: #3F72AF;
    --colorLight1: #DBE2EF;
    --colorLight2: #F9F7F7;
    --bg-gray: rgba(219, 226, 239, 0.5);
    --text-white: rgba(255, 255, 255, 0.7);
}

.wrapper{
    max-width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--colorLight2);
    background-image: linear-gradient(160deg, #112d4e 0%, #3f72af 100%);
}

.heading{
    text-align: center;
    text-transform: uppercase;
    padding-top: 35px;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: 2.5px;
}

/* 2-tabs container (switching wale) */
.tab-container{
    display: flex;
    justify-content: space-between;
    max-width: 550px;
    margin: 0 auto;
    width: 90%;
    margin-top: 3rem;
}

.tab{
    cursor: pointer;
    letter-spacing: 1.75px;
    font-size: 0.875rem;
    padding: 5px 8px;
}

/* Grey background on active tab */
.tab.current-tab{
    background-color: var(--bg-gray);
    border-radius: 4px;
}

.weather-container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Setting top & bottom margin */
    margin-block: 4rem;
}

.btn{
    /* Remove all default styling */
    all: unset;
    background-color: var(--colorDark2);
    color: white;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-radius: 5px;
    cursor: pointer;
    padding: 10px 30px;
}

.grant-btn{
    margin-bottom: 10px;
}

/* Few of the following is visible at a time :- 
    1. Grant Access container
    2. Loading Screen
    3. User Info. container
    4. Search Form
    5. Error Screen
*/


/* Common styling for all 4-containers */

.center-align-container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}



/* 1. Grant Access Container ------------- */

.grant-location-container{
    display: none; 
    /* Hide this section --> display none */
    width: 90%;
    max-width: 550px;
}

.grant-location-container.active{
    display: flex;
}

.grant-location-container img{
    margin-bottom: 2rem;
}

/* 1st <p>-type element .. inside this element */
.grant-location-container p:first-of-type{
    font-size: 1.75rem;
    font-weight: 600;
}

/* Last <p>-type element.. */
.grant-location-container p:last-of-type{
    font-size: 0.85rem;
    font-weight:lighter;
    margin-top: 0.75rem;
    margin-bottom: 1.75rem;
    letter-spacing: 0.75px;
    opacity: 0.7;
}


/* 2. Loading Screen ---------------------- */

.loading-container{
    display: none;
    /* Hides this section */
    width: 90%;
    max-width: 550px;
}

.loading-container.active{
    display: flex;
    /* To make this section visible */
}

.loading-container p{
    text-transform: uppercase;
}


/* 3. User-info. container ------------------- */

.user-info-container{
    display: none;
    /* Above command hides this section */
    /* But in default --> still visible due to JS
          (user-tab is set as current-tab (default) in JS) */
    width: 90%;
    max-width: 850px;
}

.user-info-container.active{
    display: flex;
}

.name{
    display: flex;
    /* default direction --> row */
    align-items: center;
    /* vertically center */
    gap: 0 0.5rem;
    margin-bottom: 1rem;
}

/* City name */
.name p{
    font-size: 2rem;
}

/* country icon */
.name img{
    width: 30px;
    height: 30px;
}

.weather-desc {
    font-size: 1.5rem;
    font-weight: 200;
    text-transform: capitalize;
}

.weather-icon{
    width: 90px;
    height: 90px;
}

.temp{
    font-size: 2.75rem;
    font-weight: 700;
}

.parameter-container{
    width: 90%;
    display: flex;
    flex-direction: row;
    gap: 10px 20px;
    justify-content: center;
    align-items: baseline;
    margin-top: 2rem;
}

@media(max-width: 768px) {
    .parameter-container{
        flex-direction: column;
        align-items: center;
    }
}

.parameter{
    width: 30%;
    max-width: 200px;
    background-color: var(--bg-gray);
    border-radius: 5px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 180px;
}

.para-img{
    width: 50px;
    height: 50px;
}

.para-text{
    text-transform: uppercase;
    font-size: 1.5rem;
    font-weight: 400;
}

/* Styling values */
.parameter p:last-of-type{
    font-size: 1.35rem;
    font-weight: 200;
}



/* 4. Search form ------------------------- */

.form-container{
    display: none;
    /* Above line hides this section --> display: none; */
    width: 90%;
    max-width: 550px;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    gap: 0 10px;
    margin-bottom: 3rem;
}

.form-container.active{
    display: flex;
}

/* Input of text type */
.searchInput{
    /* Remove all default stylings */
    all: unset;
    border-radius: 10px;
    cursor:text;
    width: calc(100% - 80px);
    /* 80px  -->  for gap, margin & search-btn */
    height: 40px;
    padding: 0 20px;
    background-color: var(--bg-gray);
    
}

/* Placeholder of text-input */
.searchInput::placeholder{
    color: var(--text-white);
    letter-spacing: 0.3px;
}

/* Text-input styling (clicked mode) */
.searchInput:focus{
    outline: 3px solid var(--text-white);
}

/* Search Button (the main button) */
.search-btn{
    /* Remove all paddings */
    padding: unset;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}



/* 5. Error Screen -------------------------------------- */

.error-screen{
    display: none;
    /* Above line hides this section --> display: none; */
    max-width: 550px;
    width: 90%;
}

.error-screen.active{
    display: flex;
}

.error-screen img{
    max-width: 300px;
    width: 100%;
}