:root {
    --form-radius: 5px;
    --form-height: 30px;
    --red: #ed5142;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* background-color: #22B3F0; */
    margin: 0px;
    background-attachment: fixed;
    background-image: linear-gradient(to bottom, #93c0d5, #22B3F0);
    height: 100%;
    display: flex;
    flex-direction: column;
    
}

#loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: linear-gradient(to top, white, rgb(244, 239, 239));;
    border-radius: var(--form-radius);
    box-shadow: 0px 0px 10px 10px rgba(100, 100, 111, 0.2);
    width: calc(15vh * 2);
    height: 15vh;

    /* display: flex; */
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    z-index: 999;
    
}
#loading h3 {
    text-align: center;
    font-weight: 400;
    margin: 0;
}

#loading img {
    align-self: center;
    height: 8h;
    width: 8vh;
    animation: spin 2s ease infinite;
}

@keyframes spin {
    from {rotate: 0deg;}
    to {rotate: 360deg;}
}


nav {
    background-attachment: fixed;
    background-image: linear-gradient(to bottom, #bfd9e4, #22B3F0);
    /* height: 50px; */
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: column;
    
}

#title {
    font-size: 2vw;
    margin: 5px;
}

#search-location {
    padding: 20px;
    display: flex;
    justify-content: center;
}
#search-location form {
    display: flex;
    justify-content: center;
    gap: 20px;
    
}

input[type="search"] {
    border-radius: var(--form-radius);
    height: var(--form-height);
    width: max(200px, 30vw);
    height: max(30px, 5vh);
    font-size: max(1rem, 2vh);
}

#suggested-locations {
    font-size: 2vh;
    background-image: linear-gradient(to top, white, rgb(244, 239, 239));
    /* height: fit-content; */
    overflow-x: hidden;
    overflow-y: scroll;
    width: max(200px, 30vw);
    border-radius: var(--form-radius);
    position: absolute;
    max-height: 8rem;
    z-index: 9999;
    box-shadow: 0px 0px 10px 5px rgba(100, 100, 111, 0.2);
}

.suggestion, .no-location {
    font-size: min(1rem, 2vh);
    margin: 0;
    margin-block: 5px;
    padding: 5px;
}
.suggestion {
    cursor: pointer;
    user-select: none;
    transition: all .1s ease;
}

.suggestion:hover {
    background-color: #d3e4e4;
    font-size: 110%;
}

.suggestion:active {
    background-color: #f0ed22;
}



input[type="submit"] {
    background-color: #22B3F0;
    border-radius: var(--form-radius);
    height: var(--form-height);
    width: max(100px, 6vw);
    height: max(30px, 5vh);

    font-size: max(1rem, 2vh);
    transition: all 1s cubic-bezier(0.075, 0.82, 0.165, 1);
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #f0ed22;
}

input[type="submit"]:active {
    background-color: #e4e4d3;
}

form {
    background-color: #8db3c5;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 0px 5px 2px;
}


#weather-data {
    width: 100%;
    flex: 1;

    display: flex;
    flex-direction: column;
    justify-content: center;
    height: fit-content;
    

    /* max-height: 612px;  */
}


.data {
    width: 100%;
    height: 100%;   
    display: flex;
    justify-content: space-around;
    gap: 30px;
    padding: 30px;
    box-sizing: border-box;
    padding-top: 0px;
    
    min-height: 315px;
    max-height: 40vh;

    translate: 0px 10rem;
    opacity: 0;
    
    transition: all 1s ease;
}

.data > div {
    background-image: linear-gradient(to bottom, white, rgb(220, 218, 218));
    border-radius: var(--form-radius);
    box-shadow: 0px 0px 10px 5px rgba(79, 79, 84, 0.2);
    transition: all .2s ease;
    box-sizing: border-box;
    padding: 15px;
   
    
}
.data > div:hover {
    transform: scale(1.02);
    box-shadow: 0px 0px 15px 5px rgba(79, 79, 84, 0.3);
}

h2 {
    margin: 0px;
    font-size: 2vw;
}


#current-data {
    flex: 1.5;
}

#location {
    font-weight: 100;
    /* font-size: 1rem; */
}

#current-main {
    display: flex;
    justify-content: space-around;
}

#current-data * {
    margin: 0;
}
#current-temps-div {
    flex: 1.5;
}

#current-temp {
    font-size: max(6rem, 14vh);
    font-weight: 300;
    /* margin: 0; */
}

#high-low {
    display: flex;
    gap: 1rem;
    font-weight: 100;
    /* font-size: clamp(.5rem, 10vh, 1.5rem); */
    font-size: clamp(24px, 1.5rem, 2.6vh);
}

#current-extra-div {
    flex: 1;
    font-size: 20px;
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    justify-content: center;
}

#current-extra-div p {
    text-align: left;
    margin: 0;
    font-weight: 200;
    font-size: max(22px, 3vh);
    /* font-size: clamp(.5rem, 8vh, 1.3rem); */
    /* white-space: nowrap; */
}
    /* text-align: center; */

#current-condition-image-div {
    flex: 1;
    display: flex;
    /* align-content: center; */
    justify-content: center; 
}

#current-condition {
    object-fit: contain;
    height: max(160px, 22vh);
    width: max(160px, 22vh);
    border-radius: var(--form-radius);
    box-shadow: 0px 0px 25px 5px rgba(79, 79, 84, 0.3);
    /* transform: translate(30%, 5%); */
}

#current-condition-container-description {
    height: 8cqh;
    overflow: auto;
    display: flex;
    align-items: center; /* Centers vertically */
    
}

#current-condition-description {
    font-weight: 100;
    font-size: clamp(15px, 1.5rem, 2.3vh);
    line-height: 1.2;
    padding-top: 5px;

}

#sun-data {
    flex: .5;
    display: flex;
    align-content: center;
    justify-content: space-around;
    flex-direction: column;
    text-align: center;
}

.hour {
    font-weight: 100;
}

#moon-data {
    flex: .7;
    text-align: center;
    font-weight: 100;
}

#moon {
    width: max(180px, 25vh);
    height: max(180px, 25vh);
    border-radius: var(--form-radius);
}
#moon-phase-label {
    margin: 0;
    font-size: max(1.4rem, 3vh);
}

#moon-data h2, #hourly-data h2, #daily-data h2, #sun-data h2 {
    font-weight: 100;
    /* font-size: 30px; */

}

#daily-data {
    flex: 1;
    text-align: center;
    height: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: .2rem;
    flex-wrap: nowrap;
}

#days {
    height: 80%;
    background-image: radial-gradient(#bfd9e4, #71d0f9);
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: var(--form-radius);
    white-space: nowrap;

    padding: 3px;
   
}

#days > div {
    height: 95%;
    width: 18%;
    margin: .2rem .2rem;
    margin-block: .3rem;
    display: inline-block;
    vertical-align: top;
    white-space: normal;
    justify-content: space-around;
    align-content: center;
    /* background-color: white; */
    background-image: linear-gradient(to top, white, rgb(244, 239, 239));
    border-radius: var(--form-radius);
    box-shadow: 0px 0px 10px 1px rgba(79, 79, 84, 0.3);
    
}
.day img {
    width: 3.5vw;
    height: 3.5vw;
    /* padding-block: .1rem; */
    border-radius: var(--form-radius);
    /* transform: translateX(30%); */
}
.day * {
    padding-top: max(.2px, .5%);
    
}

.day-label {
    font-size: clamp(1rem, 1.2vw, 1.9rem);
    margin: 0px;
}

.day-temp {
    margin: 0px;
    font-size: clamp(1rem, 1.3vw, 2.8rem);
    font-weight: 300;
    /* padding-bottom: 10px; */
}

.night-temp {
    margin: 0px;
    font-size: clamp(.9rem, 1.1vw, 2.6rem);
    font-weight: 300;
    /* padding-bottom: 10px; */
}

.day-precip {
    margin: 0px;
    font-size: clamp(1rem, 1.1vw, 1.8rem);
    font-weight: 300;
}

.day-wind {
    margin: 0px;
    font-size: clamp(.4rem, .8vw, 1.1rem);;
    font-weight: 300;
}

#hourly-data {
    flex: 1;
    text-align: center;
    height: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 5px;

    position: relative;
}


#hours {
    height: 100%;
    /* background-image: radial-gradient(#bfd9e4, #71d0f9); */
    overflow-x: none;
    overflow-y: scroll;
    border-radius: var(--form-radius);

    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 3px;
    gap: 5px;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
}

#graph-selector {
    position: absolute;
    top: 1.5rem;
    right: 2rem;

    display: flex;
    gap: .4rem;
}

#graph-selector > div {
    /* background-color: #71d0f9; */
    /* width: 1.3rem; */
    height: clamp(1.2rem, 24px, 3vh);
    width: clamp(1.2rem, 24px, 3vh);
    /* background-image: linear-gradient(to bottom, #bfd9e4, #71d0f9); */
    user-select: none;
    cursor: pointer;
    transition: all .1s linear;
    border: 1px gray solid;
    border-radius: var(--form-radius);
    box-shadow: rgba(100, 100, 111, 0.2) 0px 0px 5px 2px;
    align-content: center;
}

#graph-selector > div:hover {
    background-color: #f0ed22;
    box-shadow: rgba(86, 86, 92, 0.2) 0px 0px 5px 2px;
}

#graph-selector > div:active {
    background-color: #e4e4d3;
    box-shadow: rgba(25, 25, 25, 0.2) 0px 0px 5px 2px;
}

#graph-selector :nth-child(1) {
    background-color: #ec6155;
}

#graph-selector :nth-child(2) {
    background-color: #55bce8;
}

#graph-selector :nth-child(3) {
    background-color: #8ae97b;
}


