body {
    margin: 0;
    padding: 0;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 200;
    background-color: #F7Edf0;
    color: #0e0608;
}

.hidden {
    display: none;
}

/* typography */

h1 {
    text-align: center;
    color: #F7Edf0;
    margin: 0;
    padding: .5em;
    font-weight: 200;
    position: relative;
}

nav ul {
    list-style: none;
}

a {
    text-decoration: none;
    font-weight: 700;
    color: #F7Edf0;
}

a:hover,
a:focus {
    color: #e7dde0;
    cursor: pointer;
}

.small {
    margin: 0;
    font-size: .75rem;
}

#location {
    margin: 0 1em;
    font-weight: 400;
    font-size: 1rem;
    max-width: 50%;
    overflow: hidden;
    white-space: nowrap;
}

#btn-get-dewpoint, #location-search {
    font-size: 1rem;
}

input#location-search {
    margin-left: 1em;
    font-family: inherit;
    padding: .5em;
    background-color: #62CEF9;
    border: none;
    border-radius: 5px;
    flex: 1;
    color: #0e0608;
}

input#location-search::placeholder {
    color: #1e1618
}

#location-search:focus {
    outline: none !important;
    box-shadow: 0px 0px 2px #3ac2f8;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

#btn-cancel-search {
    width: 25px;
}

#location-results-list {
    list-style: none;
    padding-left: 3em;
    margin: 0;
    background-color: #Fff;
    max-height: 70vh;
    overflow: auto;
}

li.location-result {
    padding: .75em;
}

li.location-result:hover, 
li.location-result:focus {
    background-color: #3ac2f8;
    cursor: pointer;
}

li.location-result:active {
    background-color: #4ad2ff;
}

.btn {
    font-size: .75rem;
    padding: .5em 1em;
    border-radius: 5px;
    background-color: #2DC842;
    transition: background 250ms;
}

.btn:hover,
.btn:focus {
    background-color: #48D55B;
    color: #F7Edf0;
}

.btn:active {
    transform: scale(1.1);
}

.btn-warning {
    padding: .5em;
    border-radius: 5px;
    background-color: #9B1D20;
}

.day-title {
    margin: 0;
}

.max-min-temp {
    margin: 0 0 0 .75em;
}

.time {
    font-size: .75rem;
    margin: 0;
}

.dew-point {
    margin: 0;
    font-weight: 400;
}

footer > p {
    margin: 0;
    padding: 1em;
    color: #F7Edf0;
    font-size: .8rem;
}

@media  (min-width: 600px) {
    html {
        font-size: 1.5rem;
    }
    
}

/* layout */

.container {
    width: 90%;
    margin: 0 auto;
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    background-color: #0e0608;
    z-index: 3;

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

nav ul {
    padding-right: 1em;
}

main {
    margin: 5em 0 1em;
}

.modal {
    height: 100vh;
    width: 100%;
    background-color: #e7dde0;
    z-index: 3;
    position: fixed;
    top: 72px;
}

.location-selection-container {
    display: flex;
    flex-direction: column;
}

.search-field-container {
    display: flex;
    align-items: center;
    background-color: #3ac2f8;
    padding: 1em;
}

footer {
    background-color:#0e0608;
    text-align: center;
}

.flex-vertical {
    display: flex;
    flex-direction: column;
}

.location-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.color-legend {
    margin-top: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.color-legend > p {
    margin: 0 1em;
}
.color-legend > div {
    width: 20px;
    height: 20px;
}

.day-header {
    display: flex;
    align-items: center;
    padding: 0;
    margin-bottom: 1em;
}

.dew-point-table {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.day-chart {
    max-width: 420px;
    margin: 1em auto 1.5em;
}

.dew-point-table > div {
    padding: .3em .1em;
    width: 15%;
    text-align: center;
}

footer {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

@media (min-width: 600px) {
    .modal {
        top: 108px;
    }

    #dew-point-charts {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-evenly;
    }

    .day-chart {
        margin: 1em auto;
    }

    .color-legend > div {
        width: 40px;
        height: 40px;
    }
}

/* visual styles */

.dew-point-table > div:nth-child(1) {
    border-top-left-radius: 5px;
}

.dew-point-table > div:nth-child(6) {
    border-top-right-radius: 5px;
}

.dew-point-table > div:nth-child(19) {
    border-bottom-left-radius: 5px;
}

.dew-point-table > div:nth-child(24) {
    border-bottom-right-radius: 5px;
}

svg.rain-drop {
    transform: rotate(15deg) translate(2px, 2px);
}

.current-hour {
    position: relative;
}

.current-hour:before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    content: '';
    border: 2px solid #F7Edf0;
    border-radius: 5px;
    z-index: 2;
}

/* colors for dew point hours */
.miserable, .danger {
    color: #F7Edf0;
}

.dry {
    background-color: #3AC2F8;
}

.comfortable {
    background-color: #2DC842;
}

.alright {
    background-color: #F9C80E;
}

.uncomfortable {
    background-color: #F86624;
}

.miserable {
    background-color: #9B1D20;
}

.danger {
    background-color: #671415;
}

/* Loading animation */
.lds-dual-ring {
  /* display: inline-block; */
  margin: 2em auto;
  width: 80px;
  height: 80px;
}
.lds-dual-ring:after {
  content: " ";
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 6px solid #4ad2ff;
  border-color: #4ad2ff transparent #62CEF9 transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}