@import url("components/header.css");
@import url("components/left-panel.css");
@import url("components/right-panel.css");

/* Customer variables  */

:root {
    --left-panel-accent-color: #3db0ff;
    --left-panel-select-background-color: #3db0ff;
    --left-panel-select-color: #ffffff;
    --left-panel-color: #ffffff;
    --left-panel-background-color: #0057aa;
    --left-panel-border-color: #ffffff;
    --left-panel-title-color: #3db0ff;
    --left-panel-subtitle-color: #ffffff;
    --header-color: #0057aa;
    --header-background-color: #fff;
    --link-color-visited: #fff;
    --link-color: #fff;
    --hystmodal-zindex: 7000 !important;
}

/* Fonts */

@font-face {
    font-family: DanoneOne-Condensed;
    src: url(/static/map/fonts/DanoneOne-Condensed.woff) format("woff"),
        url(/static/map/fonts/DanoneOne-Condensed.woff2) format("woff2"),
        url(/static/map/fonts/DanoneOne-Condensed.eot) format("eot"),
        url(/static/map/fonts/DanoneOne-Condensed.ttf) format("ttf"),
        url(/static/map/fonts/DanoneOne-Condensed.ttf) format("otf");
}

@font-face {
    font-family: DanoneOne-CondensedBold;
    src: url(/static/map/fonts/DanoneOne-CondensedBold.woff) format("woff"),
        url(/static/map/fonts/DanoneOne-CondensedBold.woff2) format("woff2"),
        url(/static/map/fonts/DanoneOne-CondensedBold.eot) format("eot"),
        url(/static/map/fonts/DanoneOne-CondensedBold.ttf) format("ttf"),
        url(/static/map/fonts/DanoneOne-CondensedBold.otf) format("otf");
}

@font-face {
    font-family: DanoneOne-Light;
    src: url(/static/map/fonts/DanoneOne-Light.woff) format("woff"),
        url(/static/map/fonts/DanoneOne-Light.woff2) format("woff2"),
        url(/static/map/fonts/DanoneOne-Light.eot) format("eot"),
        url(/static/map/fonts/DanoneOne-Light.ttf) format("ttf"),
        url(/static/map/fonts/DanoneOne-Light.otf) format("otf");
}


body {
    margin: 0;
    font-family: DanoneOne-Light, sans-serif;
}

a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: bold;
}

a:visited {
    color: var(--link-color-visited);
}

#main {
    display: flex;
    flex-direction: row;
    position: relative;
    height: calc(100vh - 80px);
}

#map {
    display: flex;
    width: 100vw;
    height: 100%;
}

#spinner {
    z-index: 1001;
    position: absolute;
    top: 50%;
    left: 50%;

    filter: drop-shadow(0 0 2px white);
    -webkit-filter: drop-shadow(0 0 2px white);
}

#spinner .fa {
    font-size: 48px;
    filter: drop-shadow(0 0 2px white);
    -webkit-filter: drop-shadow(0 0 2px white);

    mask: url("/static/map/img/svg/loading.svg");
    -webkit-mask-attachement: url("/static/map/img/svg/loading.svg");

    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.fa {
    width: 1em;
    height: 1em;
    display: inline-block;
    background: var(--header-color);
    mask-size: cover;
    font-size: 24px;
    cursor: pointer;
}

/* Tooltip from http://www.menucool.com/tooltip/css-tooltip */

.tooltip {
    display: inline-block;
    position: relative;
    border-bottom: 1px dotted #6f6f6f;
    text-align: left;
    cursor: help;
}

.tooltip .top,
.tooltip .bottom {
    padding: 10px 20px;
    color: #ffffff;
    background-color: #6f6f6f;
    font-weight: normal;
    font-size: 13px;
    border-radius: 8px;
    position: absolute;
    z-index: 1001;
    box-sizing: border-box;
    display: none;
}

.tooltip .top {
    width: 200px;
    top: -10px;
    left: 50%;
    transform: translate(-30%, -100%);
}

body.ar .tooltip .top {
    right: 50%;
    transform: translate(30%, -100%);
}

.tooltip .bottom {
    max-width: 120px;
    top: 35px;
    left: 50%;
    transform: translate(-50%, 0);
}

body.ar .tooltip .bottom {
    right: 50%;
    transform: translate(50%, 0);
}

.tooltip:hover .top,
.tooltip:hover .bottom {
    display: block;
}

.tooltip .top i {
    position: absolute;
    top: 100%;
    left: 30%;
    width: 30px;
    height: 15px;
    overflow: hidden;
}

body.ar .tooltip .top i {
    right: 30%;
}

.tooltip .bottom i {
    position: absolute;
    left: 50%;
    bottom: 100%;
    margin-left: -15px;
    width: 30px;
    height: 15px;
    overflow: hidden;
}

.tooltip .top i::after,
.tooltip .bottom i::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: var(--map-grey);
}

.tooltip .top i::after {
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.tooltip .bottom i::after {
    left: 50%;
    transform: translate(-50%, 50%) rotate(45deg);
}

a#download-link {
    display: none;
}

.hystmodal__window {
    width: 60vw !important;
    height: 60vh !important;
    max-height: 100% !important;
}

/* Grid cell tooltip styling */
.grid-cell-tooltip {
    background-color: rgba(0, 0, 0, 0.8) !important;
    border: none !important;
    border-radius: 4px !important;
    color: white !important;
    font-weight: normal !important;
}

.grid-cell-tooltip:before {
    border-top-color: rgba(0, 0, 0, 0.8) !important;
}

/* Grid cells - simple styling */
.leaflet-overlay-pane svg {
    pointer-events: auto;
}

.leaflet-overlay-pane svg path {
    cursor: default;
}
