/*
? @document-start
======================
| PRIMARY STYLESHEET |
==================================================================================================================================

? @author:                 William J. Horn
? @document-name:          main-style.css
? @document-created:       03/24/2022
? @document-modified:      03/26/2022
? @document-version:       v1.0.0

==================================================================================================================================

? @document-info
==================
| ABOUT DOCUMENT |
==================================================================================================================================

Document containing the main CSS styling for the landing page.

==================================================================================================================================

? @document-changelog
======================
| DOCUMENT CHANGELOG |
==================================================================================================================================

==================================================================================================================================

? @document-todo
=================
| DOCUMENT TODO |
==================================================================================================================================

-   Reorganize selectors to group relevant sections of components together --NOT DONE
-   Rely less on media queries for responsiveness. Look into making my own CSS framework or use someone else's --NOT DONE

==================================================================================================================================
*/

/* ---------------- */
/* Global Variables */
/* ---------------- */

:root {
    --stormBlue: #637379;
    --rainBlue: #7b9199;
    --sunnySkyBlue: #9fb7c0;

    --mainBackgroundColor: #abb2bc;
    --mainBackgroundColorOpacity-75: #abb2bcbd;
    --secondBackgroundColor: #667891;

    --searchBackgroundColor: white;

    --primaryFont: 'Nunito', sans-serif;
}

/* ------------------- */
/* Global Declarations */
/* ------------------- */

* {
    /* overwrite bulma */
    line-height: normal;
}

p {
    color: white;
}

html {
    overflow-y: scroll;
    overflow-x: hidden;
}

body {
    background-color: white;
    font-family: var(--primaryFont);
}

h1, h2, h3 {
    /* font-family: var(--primaryFont); */
    font-family: system-ui;
    color: #f3f3f3;
    font-weight: 900;
    margin-bottom: 0;
}

h2 {
    /* text-shadow: 0 0 5px #c8c8c8; */
    color: var(--stormBlue);
}

h3 {
    color: var(--stormBlue);
}

/* --------------- */
/* Utility Classes */
/* --------------- */

.main-bg {
    background-color: var(--mainBackgroundColor);
}

.main-bg-75 {
    background: var(--mainBackgroundColorOpacity-75);
}

.second-bg {
    background-color: var(--secondBackgroundColor);
}

.break-first p:first-child {
    word-break: break-all;
}

.invisible {
    opacity: 0;
}

.fade-in {
    animation: fadeIn ease 2s forwards;
}

@keyframes fadeIn {
    0% { opacity: 0 }
    100% { opacity: 1 }
}

/* ------------- */
/* Top Container */
/* ------------- */

.big-heading {
    letter-spacing: 2px;
    font-size: 3rem;
}

.big-header {
    /* background-color: var(--stormBlue); */
    /* background-color: var(--rainBlue); */
    /* background-color: var(--sunnySkyBlue); */
    /* background-color: #2A1F1D; */ /* brown */
    /* background-color: #BAB9BF; */ /* light gray */
    /* background-color: #CCD3D9; */ /* light blue */
    /* background-color: var(--mainBackgroundColor); */ /* perfect blue */
    padding: 30px 0 30px 0;
    background-color: #485466;
}

.wrapper {
    width: 100%;
}

.top-container {
    max-width: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-image: url(../../assets/imgs/search-background.png);
}

.search-container {
    width: 100%;
    padding-top: 30px;
    padding-bottom: 100px;
    max-width: 1100px;
}

.search-drop-down {
    display: none;
    position: absolute;
    background-color: var(--searchBackgroundColor);
    width: 100px;
    z-index: 10;
    transform: translate(0, 50px);
    width: calc(100% - 2*25px);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.scroll {
    overflow-y: scroll;
    max-height: 200px;
    width: 98%;
    margin: 0 auto;
    margin-bottom: 10px;
}

.scroll::-webkit-scrollbar {
    width: 10px;
}
  
/* Track */
.scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* Handle */
.scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

/* add class for search result buttons in js */
.search-history-results button {
    display: block;
    color: #8e8e8e;
    padding: 10px 15px;
    background: none;
    text-align: left;
    width: 100%;
    transition: background-color 0.2s;
}

.search-history-results button:hover {
    background-color: #dbdbdb;
}
/* add class for search result buttons in js */

.search-icon {
    height: 36px;
    display: none;
}

.menu-icon {
    width: 50px;
    opacity: 0.5;
    display: none;
}

.current-weather-container {
    margin-top: 30px;
    /* margin-bottom: 50px; */
}

.current-weather-display {
    width: 100%;
    opacity: 0;
}

.current-weather-display p, .weather-data p {
    font-size: 1.6rem;
    letter-spacing: 1px;
    font-family: system-ui;
    font-weight: 900;
    text-shadow: 0 0 5px #737373;
}

/* general weather data display */
.weather-data > * {
    /* border-radius: 10px; */
    padding: 15px;
    display: flex;
    background-color: var(--secondBackgroundColor);
}

.weather-data > *:nth-child(2n) {
    background-color: var(--mainBackgroundColor);
}

.weather-header p {
    font-size: 1.5rem;
    font-weight: 400;
    margin-left: 20px;
    margin-right: 20px;
    text-align: center;
}

.weather-header h2 {
    padding: 0;
    margin-bottom: 10px;
}

.weather-icon {
    box-shadow: 0 0 20px #74819b;
    border-radius: 50%;
    margin-top: 30px;
}

.weather-header h2 {
    font-size: 2rem;
}

.weather-data p:first-child {
    flex: 0.7;
}

.weather-data p:nth-child(2) {
    text-align: right;
    letter-spacing: initial;
    flex: 0.3;
    font-weight: 100;
}

.weather-card {
    width: 100%;
    /* max-width: 300px; */
    min-width: 250px;
    border-radius: 10px;
    margin-bottom: 30px;
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 20px;
    opacity: 0;
}

.weather-card .weather-icon {
    margin-top: 20px;
    margin-bottom: 30px;
}

.search-drop-down p {
    color: black;
}

.search-bg {
    border-radius: inherit;
    background-color: var(--searchBackgroundColor);
    padding: 15px 25px;
    box-shadow: 0 0 10px #c0c0c0;
    position: relative;
    display: flex;
}

input {
    padding-left: 15px;
    padding-right: 15px;
    text-align: center;
    background: none;
    color: #c1c1c1;
    font-size: 1.7rem;
}

.forecast-container h2, footer h2 {
    color: white;
    font-size: 2em;
    padding-top: 15px;
    padding-bottom: 15px;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 25px;
    width: 70%;
    margin: 0 auto;
}

footer p {
    text-align: center;
}

footer .container {
    height: 200px;
    /* padding: 30px; */
    flex-direction: column;
    justify-content: center;
}

footer .container p {
    color: black;
    text-align: center;
    margin-bottom: 10px;
}

#weather-card-container {
    width: 100%;
}

#current-uvi {
    font-weight: 900;
    text-shadow: 2px 2px 0px black;
}

/* ------------- */
/* Media Queries */
/* ------------- */


@media screen and (min-width: 418px) {
    .search-container {
        width: 80%;
        margin: 0 auto;
        border-radius: 20px;
    }

    #weather-card-container {
        width: 70%;
    }

    .search-icon {
        display: block;
    }

    .menu-icon {
        display: block;
    }

    .current-weather-display .weather-data > * {
        box-shadow: 0 0 10px rgb(100, 100, 100);
    }

    .current-weather-display {
        width: 418px;
    }

    .weather-card {
        width: 350px;
    }

    .forecast-container h2 {
        font-size: 3em;
    }

    .weather-header h2 {
        font-size: 2.3rem;
    }

    .weather-data > * {
        margin-bottom: 5px;
        border-radius: 10px;
    }
}

@media screen and (min-width: 680px) {
    .big-heading {
        font-size: 4.5rem;
    }

    .weather-data p {
        font-size: 2rem;
    }

    .current-weather-display {
        width: 500px;
    }

    .weather-header .weather-icon {
        width: 150px;
    }

}

@media screen and (min-width: 1370px) {
    .current-weather-display .weather-data p {
        font-size: 2.3rem;
    }

    .current-weather-display {
        width: 600px;
    }
}
