@import url("https://fonts.googleapis.com/css2?family=Quicksand&display=swap");

:root {
    --myFont: "Quicksand", sans-serif;
    --headerSize: calc(2vmin + 12px);
    --citySize: calc(2vmin + 2rem);
    --textSize: calc(2vmin + 8px);
}

* {
    box-sizing: border-box;
    margin: 0;
}

body {
    display: flex;
    flex-flow: column;
    min-height: 100vh;

    background-image: url(./images/weatherBg/clear.svg);
    background-size: cover;
    background-repeat: no-repeat;

    color: #e4fde1;
    font-family: var(--myFont);
    font-size: var(--textSize);

    transition: background-image 300ms ease-in-out;
}

/* Header Styles */
.header {
    padding: 1rem;
    font-size: var(--headerSize);

    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;

    background: rgba(60, 122, 137, 0.3);
    backdrop-filter: blur(8px);
}

.header > p {
    text-align: center;
}

#searchForm {
    display: flex;
    align-items: center;

    padding-top: 10px;
    gap: 10px;
}

#searchTarget {
    width: 80%;
    height: 2.5rem;

    border-radius: 5px;
    border: none;

    font-family: inherit;
    font-size: 24px;
    text-align: center;

    background-color: #ccc;
}

#searchTarget:focus {
    background-color: #9fa2b2;
    outline: none;
}

#searchPlaceButton {
    border: 0px;
    background-color: #1d70a2;
    border-radius: 5px;
}

#searchPlaceButton:hover {
    background-color: #6761a8;
}

/* Content Styles */
.content {
    flex: 1 0 auto;
    padding: 1rem;

    display: flex;
    justify-content: center;
    align-items: center;
}

.weatherStats {
    width: max(40%, 400px);
    padding: var(--headerSize);
    font-size: var(--textSize);

    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    gap: var(--textSize);

    border-radius: 10px;
    backdrop-filter: invert(15%);
}

.statsContainer {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;

    gap: var(--textSize);
}

.city {
    font-size: var(--citySize);

    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.cityWeather {
    display: flex;
    flex-flow: column;
    align-items: center;
}

#weatherCondition {
    margin-top: 1rem;
    font-size: var(--headerSize);
    text-align: center;
}

#temp {
    flex: 1 0 auto;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--citySize);
}

.otherStats {
    display: flex;
    flex-flow: column nowrap;
}

.otherStats > div {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem;
}

.source {
    grid-column: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--textSize);
}

/* Footer Styles */
.footer {
    margin-top: auto;
    padding: 5px;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    font-size: var(--textSize);

    background: rgba(181, 226, 250, 0.3);
    backdrop-filter: blur(8px);
}

.footer > a {
    color: inherit;
    text-decoration-color: inherit;
}

@media (max-width: 600px) {
    .weatherStats {
        width: initial;
    }
}
