@charset "utf-8";

/*
--------------------------------------
themes
--------------------------------------
*/

/* font-family: 'Montserrat', sans-serif; */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    src: local('Montserrat Regular'), local('Montserrat-Regular'), url(./fonts/Montserrat.woff2) format('woff2');
}

/* font-family: 'Roboto Slab', serif; */
@font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Roboto Slab Regular'), local('RobotoSlab-Regular'), url(./fonts/RobotoSlab.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* theme variables */
:root {
    --theme-font-primary: 'Montserrat', sans-serif;
    --theme-font-secondary: 'Roboto Slab', serif;

    --theme-font-brand: 'Roboto Slab', serif;
    --theme-bg-brand: #00264c;
    --theme-color-brand: white;

    --theme-timing-function-bounce: cubic-bezier(.5, -0.7, .5, 1.7);
}
.theme-font-secondary {
    font-family: var(--theme-font-secondary);
}

/*
--------------------------------------
global elements
--------------------------------------
*/
html,
body {
    font-family: var(--theme-font-primary);
}
a,
a:hover {
    color: var(--info);
}
select:focus {
    -webkit-box-shadow: inherit !important;
    box-shadow: inherit !important;
}
label,
select,
option {
    cursor: pointer;
}

/*
--------------------------------------
nav and footer
--------------------------------------
*/
.navbar-brand {
    font-family: var(--theme-font-brand);
    font-size: 1.8rem;
}
nav,
footer {
    background: var(--theme-bg-brand);
    color: var(--theme-color-brand);
    -webkit-transition: opacity 400ms;
    transition: opacity 400ms;
}
nav a {
    cursor: pointer;
}
nav a:hover {
    text-decoration: underline !important;
}
footer a,
footer a:hover {
    color: var(--theme-font-primary);
}

/*
--------------------------------------
layout
--------------------------------------
*/

body,
#map {
    z-index: 0;
    background: white;
}
#panel {
    z-index: 1;
    top: 0;
    width: 29rem;
    right: -4rem;
    padding-right: 4rem;
    -webkit-transition: right 400ms var(--theme-timing-function-bounce), opacity 400ms linear;
    transition: right 400ms var(--theme-timing-function-bounce), opacity 400ms linear;
}
#panel.hidden {
    right: -29rem;
}
#loading {
    z-index: 2;
    background: white;
    color: #ddd;
}
nav,
footer {
    z-index: 3 !important;
}
nav:hover,
footer:hover,
#panel:hover {
    opacity: 1 !important;
}

/* small - panel full width */
@media only screen and (max-width: 36rem) {
    #panel {
        width: calc(100% + 4rem);
    }
    #panel.hidden {
        right: -47rem;
    }
}

/*
--------------------------------------
collapsible sections
--------------------------------------
*/

/* all headers */
.collapse-header {
    cursor: pointer;
}
.collapse-header.hover-light:hover {
    background: #e6e6e6;
}
.collapse-header.hover-dark:hover {
    background: #454d54;
}

/* 1st order headers */
.collapse-header-1 i {
    -webkit-transition: all 600ms var(--theme-timing-function-bounce);
    transition: all 600ms var(--theme-timing-function-bounce);

}
.collapse-header-1.show i {
    -webkit-transform: rotate(360deg) scale(1.5);
    transform: rotate(360deg) scale(1.5);
}

/* 2nd order headers */
.collapse-header-2.show {
    color: white;
}
.collapse-header-2 i {
    -webkit-transition: all 200ms linear;
    transition: all 200ms linear;
}
.collapse-header-2.show i {
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
}
.collapse-header-2.show .btn {
    display: none;
}

/* usgs color theme */
.collapse-header-1.layer-group-usgs {
    color: var(--success);
}
.collapse.layer-group-usgs .collapse-header-2.show {
    background: var(--success);
}

/* weather color theme */
.collapse-header-1.layer-group-weather {
    color: var(--warning);
}
.collapse.layer-group-weather .collapse-header-2.show {
    background: var(--warning);
}

/* hydro color theme */
.collapse-header-1.layer-group-hydro {
    color: var(--primary);
}
.collapse.layer-group-hydro .collapse-header-2.show {
    background: var(--primary);
}

/* basemap color theme */
.collapse-header-1.layer-group-basemap {
    color: var(--info);
}

/*
--------------------------------------
legend
--------------------------------------
*/
#legend div[data-legend-name].hidden {
    display: none;
}
#legend td {
    vertical-align: middle;
}

/*
--------------------------------------
misc
--------------------------------------
*/
.btnClearMap {
    -webkit-transition: all 600ms var(--theme-timing-function-bounce);
    transition: all 600ms var(--theme-timing-function-bounce);
}
.btnClearMap.hidden {
    -webkit-transform: scale(0);
    transform: scale(0);
    opacity: 0;
}

/*
--------------------------------------
bootstrap
--------------------------------------
*/

/* border radius */
.btn,
.alert,
.modal-content,
.modal-header {
    border-radius: 0;
}

/* modals */
.modal-header {
    border: 1px solid white;
    background-color: var(--theme-bg-brand) !important;
}

/* collapse speed */
.collapsing {
    -webkit-transition: height 150ms linear;
    transition: height 150ms linear;
}

/*
--------------------------------------
leaflet
--------------------------------------
*/

/* fonts */
.leaflet-container,
.leaflet-popup-content {
    font-family: var(--theme-primary-font);
}

/* popups */
.leaflet-popup-close-button {
    display: none;
}

/*
--------------------------------------
search api
--------------------------------------
*/
.search-api-container {
    border-radius: 0;
}
.search-api-menu-content {
    max-height: 50rem !important;
}

/*
--------------------------------------
custom scrollbar
--------------------------------------
*/
::-webkit-scrollbar {
    width: 0.7rem;
}
::-webkit-scrollbar-track {
    background: none;
}
::-webkit-scrollbar-thumb {
    background: #666;
}
::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/*
--------------------------------------
responsive rem unit scaling
px2rem converter: https://www.ninjaunits.com/converters/pixels/pixels-rem/
--------------------------------------
*/

/* < 576px: sm - small devices (landscape phones) */
@media (max-width: 576px) {
    html {
        font-size: 80%;
    }
}
/* >= 576px: sm - small devices (landscape phones) */
@media (min-width: 576px) {
    html {
        font-size: 80%;
    }
}
/*  >= 768px: md - medium devices (tablets, navbar toggle appears at this breakpoint) */
@media (min-width: 768px) {
    html {
        font-size: 80%;
    }
}
/* >= 992px: lg - large devices (desktops) */
@media (min-width: 992px) {
    html {
        font-size: 80%;
    }
}
/* >= 1200px: xl - extra large devices (large desktops) */
@media (min-width: 1200px) {
    html {
        font-size: 80%;
    }
}
