* {
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body,
button,
.leaflet-control-layers-expanded,
select,
input,
.leaflet-popup {
    font-family: Roboto, sans-serif;
}

a {
    text-decoration: none;
}

.pointer:hover {
    cursor: pointer;
}

.dropshadow {
    -webkit-box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15); 
    box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15);
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    overflow: hidden;
    background-color: #18191a;
}

#preloader::before {
    content: "";
    width: 150px;
    height: 150px;
    position: fixed;
    top: calc(50vh - 75px);
    left: calc(50vw - 75px);
    background-image: url(../img/preload-icon.png);
    -webkit-animation: animate-preloader 1.5s linear;
    animation: animate-preloader 1.5s linear;
}

@-webkit-keyframes animate-preloader {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes animate-preloader {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}


/* Navigation */
nav {
    width: 100%;
    height: 70px;
    position: absolute;
    z-index: 401;
    display: flex;
    align-items: center;
    justify-content: center;
}

#nav-container {
    width: 100%;
    min-width: 300px;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 10px;
    border-radius: 10px;
    background-color: #ffffff;
}

.nav-btn {
    min-width: 50px;
    height: 50px;
    border: none;
    font-size: 24px;
    color: #b0b3b8;
    background: none;
}

#location-btn {
    border-right: 1px solid #e4e6eb;
}

#country-select {
    width: 200px;
    height: 50px;
    padding-left: 10px;
    background-color: #ffffff;
    border: none;
    outline: none;
    font-size: 15px;
}

#recenter-btn {
    border-left: 1px solid #e4e6eb;
}


/* Layer controls */
.leaflet-control-layers {
    border: none !important;
    border-radius: 10px;
    -webkit-box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15) !important; 
    box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15) !important;
}

.leaflet-control-layers-toggle {
    width: 40px !important;
    height: 40px !important;
}

.leaflet-control-layers-base span {
    color: #b0b3b8;
    font-size: 14px;
}

input:checked + span {
    color: #18191a;
}


/* Zoom controls */
.leaflet-control-zoom {
    position: fixed;
    top: 70px;
    left: 10px;
    margin: 0 !important;
    border: none !important;
    border-radius: 5px;
    -webkit-box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15) !important; 
    box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15) !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    color: #18191a !important;
}

.leaflet-control-zoom-in {
    border-bottom: 1px solid #e4e6eb !important;
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
}

.leaflet-control-zoom-out {
    border-bottom-left-radius: 5px !important;
    border-bottom-right-radius: 5px !important;
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
    background-color: #ffffff !important;
}

.leaflet-control-zoom-in:active,
.leaflet-control-zoom-out:active {
    background-color: #90ffca !important;
}

.leaflet-disabled {
    color: #b0b3b8 !important;
}


/* Easy Buttons */
#easy-btn-background {
    width: 163px;
    height: 40px;
    position: fixed;
    bottom: 10px;
    left: 10px;
    z-index: 400;
    background-color: #ffffff;
    border-radius: 10px;
    -webkit-box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15); 
    box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15);
}

.easy-button-container {
    position: fixed;
    margin: 0 !important;
    border: none !important;
    border-radius: 0;
}

.easy-button-button {
    width: 40px !important;
    height: 40px !important;
    background-color: transparent !important;
    line-height: 40px !important;
}

.easy-button-button span {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.easy-button-button span i {
    font-size: 18px;
    color: #18191a;
}

.wikipedia-btn-container {
    bottom: 10px;
    left: 10px;
    border-top-left-radius: 7px !important;
    border-bottom-left-radius: 7px !important;
}

.news-btn-container {
    bottom: 10px;
    left: 51px;
    border-left: 1px solid #e4e6eb !important;
}

.currency-btn-container {
    bottom: 10px;
    left: 92px;
    border-left: 1px solid #e4e6eb !important;
}

.weather-btn-container {
    bottom: 10px;
    left: 133px;
    border-left: 1px solid #e4e6eb !important;
}

.easy-btn-active {
    color: #ffe699 !important;
}


/* Main content */
main {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #cce7fc;
}

/* Map */
#map-container {
    width: 100%;
    height: 100%;
    flex: 1;
}

.leaflet-container {
    background-color: transparent;
}

/* Modals */
.modal {
    width: 420px;
    max-width: calc(100% - 60px);
    max-height: calc(100% - 144px);
    position: absolute;
    top: 70px;
    right: 10px;
    z-index: 401;
    display: none;
    overflow-y: auto;
    overflow-x: hidden;
    color: #18191a;
    background-color: #ffffff;
    border-radius: 12px;
    -webkit-box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15); 
    box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15);
}

.no-data-modal {
    width: 100%;
    height: 200px;
    justify-content: center;
    align-items: center;
    text-align: center;
}


/* Wikipedia */
#wikipedia-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
}

#wikipedia-logo {
    padding: 15px;
}

#wikipedia-summary-flag {
    max-height: 40px;
    margin-bottom: 15px;
}

#wikipedia-summary-description {
    overflow: auto;
    padding: 0 15px;
}

a#wikipedia-summary-more {
    padding: 15px;
    color: #5b5efd;
    text-decoration: none;
    text-align: center;
}

a#wikipedia-summary-more:visited {
    color:  #5b5efd;
}


/* News */
#news-feed-content {
    display: flex;
    flex-direction: column;
}

.news-feed-article {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    margin: 0  12px 12px 12px;
    border: 1px solid #e4e6eb;
}

.news-feed-article {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    margin: 0  12px 12px 12px;
    border: 1px solid #e4e6eb;
}

.news-feed-article:nth-child(1) {
    margin-top:12px;
}

.news-feed-article-image {
    max-height: 125px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-feed-article-image img {
    max-width: 100%;
}

.news-feed-article-headline {
    margin: 10px 0;
    padding: 0 15px;
    color: #18191a;
}

.news-feed-article-story {
    max-height: 100px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    padding: 0 15px;
    color: #646667;
}

.news-feed-article-source {
    align-self: flex-start;
    margin-top: 10px;
    padding: 0 15px;
    color: #b0b3b8;
    font-size: 14px;
    text-decoration: none;
}

.news-feed-article-source {
    color:  #b0b3b8;
}

.news-feed-article-timestamp {
    align-self: flex-start;
    padding: 0 15px 15px 15px;
    color: #b0b3b8;
    font-size: 14px;
}


/* Currency */
#currency-content {
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

#currency-header {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

#currency-header-symbol {
    margin-right: 5px;
    font-size: 50px;
    font-family: 'Times New Roman', Times, serif;
    line-height: 50px;
}

#currency-header-name {
    text-align: center;
}

#currency h2 {
    margin: 10px 0;
    font-weight: 500;
    text-align: center;
}


/* Currency converter */
#currency-converter {
    display: flex;
    flex-direction: column;
    padding: 0 10px;
}

#convert-amount-label,
#from-currency-label,
#to-currency-label {
    font-weight: bold;
    margin-bottom: 8px;
}

#amount-container {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 5px;
    background-color: #ffffff;
    border: 1px solid #b0b3b8;
    border-radius: 5px;
}

#amount-symbol {
    margin-right: 5px;
}

#convert-amount {
    height: 40px;
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 16px;
}

#from-currency-label,
#to-currency-label {
    margin-top: 20px;
}

#from-currency-code {
    height: 40px;
    display: flex;
    align-items: center;
    padding-left: 5px;
    border: 1px solid #b0b3b8;
    border-radius: 5px;
}

#to-currency-container {
    height: 40px;
    display: flex;
    align-items: center;
    border: 1px solid #b0b3b8;
    border-radius: 5px;
}

#currency-select {
    width: 100%;
    height: 40px;
    padding-left: 10px;
    background-color: #ffffff;
    border: none;
    border-radius: 5px;
    outline: none;
    font-size: 16px;
}

#to-currency-code {
    display: flex;
    padding-left: 5px;
}

#to-currency-code,
#change-currency {
    display: none;
}

#change-currency {
    margin-left: 5px;
    color: #5b5efd;
    font-size: 14px;
    font-style: italic;
    text-decoration: underline;
}

#convert-btn {
    height: 40px;
    margin: 20px 0 10px 0;
    background-color: #5b5efd;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    outline: none;
    font-size: 16px;
    text-align: center;
}


/* Currency conversion */
#conversion {
    display: none;
    flex-direction: column;
    padding: 0 10px;
}

#conversion-result {
    padding: 10px;
    border: 1px solid #b0b3b8;
    border-radius: 5px;
}

#conversion.error {
    text-align: center;
}

#conversion-error {
    font-style: italic;
}

#conversion-error-code {
    color: #b0b3b8;
    font-size: 15px;
    font-style: italic;
}

#from-paragraph {
    font-weight: 500;
}

#to-paragraph {
    margin: 10px 0 20px 0;
    font-size: 24px;
    font-weight: 700;
}

#edit-conversion-btn {
    height: 40px;
    margin: 20px 0 10px 0;
    background-color: #e4e6eb;
    border: 1px solid #b0b3b8;
    border-radius: 5px;
    outline: none;
    font-size: 16px;
    text-align: center;
}

#no-conversion {
    box-sizing: border-box;
    width: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border: 1px solid #b0b3b8;
    border-radius: 5px;
    text-align: center;
}

#no-conversion h2 {
    margin: 0 0 10px 0;
}

#no-conversion p {
    color: #5b5efd;
    font-size: 15px;
}

/* Weather */
#weather {
    box-sizing: border-box;
    padding: 10px;
}

#weather-content {
    flex-direction: column;   
}

#weather-header {
    border-bottom: 1px solid #18191a;
    padding-bottom: 10px;
}

#city-select {
    border: none;
    outline: none;
    background-color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    text-align: left;
}

#city-select option {
    font-size: 15px;
}

#weather-large-container {
    display: flex;
    align-items: center;
}

#weather-today-weather {
    flex: 1;
    text-align: center;
}

#weather-today-temp {
    font-size: 50px;
    font-weight: 700;
}

#weather-today-clouds {
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
    text-transform: capitalize;
}

#weather-forecast {
    display: flex;
}

.daily-forecast-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.daily-forecast-container p {
    font-size: 14px;
    text-align: center;
}

.daily-forecast-date {
    flex-grow: 1;
}


/* Weather Scales */
.owm-scale-container {
    box-sizing: border-box;
    width: 300px;
    max-width: calc(100% - 70px);
    position: absolute;
    top: 70px;
    right: 10px;
    z-index: 400;
    display: none;
    flex-direction: column;
    padding: 5px;
    background-color: #ffffff;
    border-radius: 7px;
    -webkit-box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15); 
    box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.15);
    font-size: 12px;
}

.owm-scale-label {
    align-self: center;
}

.owm-scale {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.owm-scale-stops {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 3px 0;
}

.owm-scale-gradient {
    height: 3px;
    border-bottom: 1px solid #f2f2f2;
    border-left: 1px solid #f2f2f2;
}

#owm-cloud-gradient {
    background: linear-gradient(
        to right, 
        rgba(247, 247, 255, 0) 0%, 
        rgba(251, 247, 255, 0) 10%, 
        rgba(244, 248, 255, 0.1) 20%, 
        rgba(240, 249, 255, 0.2) 30%, 
        rgba(221, 250, 255, 0.4) 40%, 
        rgba(224, 224, 224, 0.9) 50%, 
        rgba(224, 224, 224, 0.76) 60%, 
        rgba(228, 228, 228, 0.9) 70%, 
        rgba(232, 232, 232, 0.9) 80%, 
        rgb(214, 213, 213) 90%, 
        rgb(210, 210, 210) 95%, 
        rgb(183, 183, 183) 100%
    );
}

#owm-rain-gradient {
    background: linear-gradient(
        to left, 
        rgb(170, 43, 195), 
        rgb(255, 0, 146), 
        rgb(255, 0, 100), 
        rgb(255, 0, 0), 
        rgb(255, 91, 0), 
        rgb(255, 150, 0), 
        rgb(255, 205, 0), 
        rgb(239, 248, 0), 
        rgb(0, 70, 0), 
        rgb(0, 90, 0), 
        rgb(0, 160, 0),
        rgb(0, 211, 0), 
        rgb(0, 250, 100), 
        rgba(0, 0, 0, 0)
    );
}

#owm-wind-gradient {
    background: linear-gradient(
        to left, 
        rgb(158, 128, 177), 
        rgba(116, 76, 172, 0.9), 
        rgb(164, 123, 170), 
        rgba(170, 128, 177, 0.84), 
        rgba(176, 128, 177, 0.71), 
        rgba(170, 128, 177, 0.54), 
        rgba(170, 128, 177, 0.44), 
        rgba(255, 255, 0, 0)
    );
}

#owm-temp-gradient {
    background: linear-gradient(
        to right, 
        rgb(159, 85, 181) 0%, 
        rgb(44, 106, 187) 8.75%, 
        rgb(82, 139, 213) 12.5%, 
        rgb(103, 163, 222) 18.75%, 
        rgb(142, 202, 240) 25%, 
        rgb(155, 213, 244) 31.25%, 
        rgb(172, 225, 253) 37.5%, 
        rgb(194, 234, 255) 43.75%, 
        rgb(255, 255, 208) 50%, 
        rgb(254, 248, 174) 56.25%, 
        rgb(254, 232, 146) 62.5%, 
        rgb(254, 226, 112) 68.75%, 
        rgb(253, 212, 97) 75%, 
        rgb(244, 168, 94) 82.5%, 
        rgb(244, 129, 89) 87.5%, 
        rgb(244, 104, 89) 93.75%, 
        rgb(244, 76, 73) 100%
    );
}


/* Markers */
.leaflet-popup-content h3 {
    margin-bottom: 10px;
    font-size: 15px;
}

.leaflet-popup-content p {
    margin-top: 0;
    margin-bottom: 10px;
    color: #b0b3b8;
    font-size: 14px;
}

.leaflet-popup-content a {
    color: #5b5efd;
    font-size: 14px;
}


/* Media queries */
@media only screen and (min-width: 360px) {
    nav {
        width: auto;
        right: 10px;
    }
    
    #nav-container {
        width: auto;
        margin: 0;
    }

    .leaflet-control-zoom {
        top: 10px;
    }

    .modal {
        max-width: calc(100% - 20px);
        max-height: calc(100% - 158px);
        top: 84px;
        right: auto;
        left: 10px;
    }

    #currency-header-symbol {
        font-size: 60px;
    }

    #currency-header-name {
        font-size: 18px;
        text-transform: uppercase;
    }
}

@media only screen and (min-width: 400px) {
    nav {
        left: 50%;
        transform: translate(-50%, 0);
    }

    .owm-scale-container {
        left: 50%;
        transform: translate(-50%, 0);
    }

}

@media only screen and (min-width: 440px) {
    .modal {
        max-width: none;
        left: calc(50% - 210px);
    }
}

@media only screen and (min-width: 480px) {
    .leaflet-control-layers-toggle {
        width: 50px !important;
        height: 50px !important;
    }
    
    #easy-btn-background {
        width: 203px;
        height: 50px;
        left: 50%;
        transform: translate(-50%, 0);
    }

    .easy-button-button {
        width: 50px !important;
        height: 50px !important;
        line-height: 50px !important;
    }

    .easy-button-button span i {
        font-size: 22px;
    }
              
    .wikipedia-btn-container {
        width: 50px;
        height: 50px;
        left: 50%;
        transform: translate(-101px, 0);
    }
    
    .news-btn-container {
        width: 50px;
        height: 50px;
        left: 50%;
        transform: translate(-51px, 0);
    }
    
    .currency-btn-container {
        width: 50px;
        height: 50px;
        left: 50%;
    }
    
    .weather-btn-container {
        width: 50px;
        height: 50px;
        left: 50%;
        transform: translate(51px, 0);
    }
}

@media only screen and (min-width: 520px) {
    .modal {
        max-height: calc(100% - 140px);
        top: 70px;
    }
}

@media only screen and (min-width: 560px) {
    .leaflet-control-layers {
        position: fixed;
        top: 10px;
        right: 0;
    }
}