/*!***********************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js!./src/styles/main.css ***!
  \***********************************************************************/
/* CSS Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Fonts*/
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: normal;
    src: url(assets/fonts/281179d375517d9c131b.woff) format('woff'),
        url(assets/fonts/acb6629fe45c43ad5d8b.woff2)
            format('woff2');
}

/* CSS Variable */
:root {
    /* Tailwind color palette: Orange */
    --orange50: #fff7ed;
    --orange100: #ffedd5;
    --orange200: #fed7aa;
    --orange300: #fdba74;
    --orange400: #fb923c;
    --orange500: #f97316;
    --orange600: #ea580c;
    --orange700: #c2410c;
    --orange800: #9a3412;
    --orange900: #7c2d12;
}

/* Main */
body {
    font-family: 'Montserrat', sans-serif;
    color: var(--orange50);
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    z-index: -1;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

main {
    display: grid;
    grid-template:
        [row1-start] 'search search' 0.1fr [row1-end]
        [row2-start] 'main forecast' 1.9fr [row2-end]
        / 1fr 1fr;
    gap: 2em;
    width: 100vw;
    height: 100vh;
}

/* Section search  */
.section-search {
    grid-area: search;
    position: relative;
    justify-self: center;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 90%;
    width: 90%;
    margin: 1em 0;
    border-radius: 15px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(225, 225, 225, 0.3);
    background-color: rgba(249, 115, 22, 0.4);
}

/* Search: Input and button */
.search-area {
    display: flex;
    flex-direction: row;
}

input[type='text'],
.btn {
    padding: 0.7em 1.5em;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    color: var(--orang600);
    border: none;
    border-radius: 15px;
    outline-color: var(--orange600);
}

input[type='text'] {
    background-color: var(--orange50);
    color: black;
    width: 100%;
}

input[type='text']::placeholder {
    color: var(--orange600);
}

.btn {
    margin-left: 2em;
    background-color: var(--orange600);
    box-shadow: 5px 5px 5px 2px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    opacity: 0.9;
    cursor: pointer;
}

.btn:active {
    transform: translateY(3px);
    box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.3);
}

/* Locations list */
.locations {
    list-style: none;
    position: absolute;
    z-index: 1;
    top: 4.1em;
    color: var(--orange600);
    background-color: var(--orange50);
    padding: 0.5em 1em;
    border: 2px solid var(--orange600);
    border-radius: 15px;
    max-width: 30%;
}

li {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    justify-items: center;
    align-items: center;
    gap: 5px;
}

li:hover {
    background-color: var(--orange200);
}

/* Toggle metric/imperial */
.units-area {
    display: flex;
    justify-content: center;
    align-items: center;
}

input[type='checkbox'] {
    width: 0;
    height: 0;
    visibility: hidden;
}

.switch {
    display: block;
    width: 10em;
    height: 3em;
    background-color: var(--orange50);
    border-radius: 100px;
    position: relative;
    cursor: pointer;
    transition: 0.5s;
    box-shadow: 5px 5px 5px 2px rgba(0, 0, 0, 0.3);
}

.switch::after {
    display: flex;
    justify-content: center;
    align-items: center;
    content: '\00B0 C - m/s';
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.2em;
    width: 4.7em;
    height: 3em;
    color: var(--orange50);
    background-color: var(--orange600);
    position: absolute;
    border-radius: 100px;
    top: 0.67em;
    left: 0.5em;
    transition: 0.5s;
}

.switch:hover {
    background-color: var(--orange300);
}

input:checked + .switch::after {
    left: calc(100% - 0.5em);
    transform: translateX(-100%);
    content: '\00B0 F - Mph';
}

/* Section main */
.section-main {
    grid-area: main;
    position: relative;
    z-index: -1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    padding: 1em;
    height: 40%;
    width: 70%;
    justify-self: center;
    border-radius: 15px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(225, 225, 225, 0.3);
    background-color: rgba(249, 115, 22, 0.4);
}

.city-name {
    color: var(--orange50);
    font-weight: 900;
}

.icon-temp {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

.main-weather-data-text {
    font-weight: 700;
}

/* Section forecast */
.section-forecast {
    grid-area: forecast;
    height: 50%;
    width: 70%;
    justify-self: center;
    border-radius: 15px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(225, 225, 225, 0.3);
    overflow: auto;
    background-color: rgba(249, 115, 22, 0.4);
}

.days {
    display: grid;
    grid-template:
        [row1-start] 'day forecast-hours' 1fr [row2-end]
        / 0.3fr 1.7fr;
    padding: 0.5em;
    gap: 1em;
}

.day-name {
    grid-area: day;
    color: var(--orange50);
    font-weight: 700;
}

.forecast-hours {
    grid-area: forecast-hours;
    display: grid;
    grid-template-columns: 0.5fr 1.5fr 1fr 1fr;
    justify-items: center;
    align-items: center;
}

/* Loading */
.loader-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(225, 225, 225, 0.3);
    overflow: auto;
    background-color: rgba(249, 115, 22, 0.4);
}

.spinner {
    width: 64px;
    height: 64px;
    border: 8px solid;
    border-color: var(--orange50) transparent var(--orange50) transparent;
    border-radius: 50%;
    animation: spin-anim 1.2s linear infinite;
}

@keyframes spin-anim {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

