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

/* Official GIZ color palette from https://www.giz.de/cdc/de/html/59638.html */
:root {
    --giz-red: #c80f0f;
    --giz-grey: #6f6f6f;
    --giz-light-grey: #eceded;
    --giz-black: #000000;
    --giz-yellow: #fdc400;
    --giz-light-yellow: #ffdd00;
    --giz-green: #89ae10;
    --giz-light-green: #bfd688;
    --giz-orange: #ef9424;
    --giz-light-orange: #f6b859;
    --giz-turquoise: #009bc2;
    --giz-light-turquoise: #83c8d1;
    --giz-purple: #876ba1;
    --giz-light-purple: #c9bad1;
    --giz-blue: #0077b2;
    --giz-light-blue: #6dcff6;
    --giz-light-red: #f1c6c6; /* not offical */

}

/* Official GIZ fonts */
@font-face {
    font-family: calaregular;
    src: url("../fonts/CalaReg-webfont.woff2") format("woff2"), url("../fonts/CalaReg-webfont.woff") format("woff");
    font-style: normal;
    font-weight: normal;
}
@font-face {
    font-family: calabold;
    src: url("../fonts/CalaBol-webfont.woff2") format("woff2"), url("../fonts/CalaBol-webfont.woff") format("woff");
    font-style: normal;
    font-weight: normal;
}
@font-face {
    font-family: GravurCodensed-Regular;
    src: url("../fonts/GravurCodensed-Regular.woff") format("woff");
}

body {
    margin: 0;
    font-family: calaregular, sans-serif;
}
body.ar{
    direction: rtl;
    overflow: hidden;
}

a {
    color: var(--giz-blue);
    text-decoration: none;
}
a:visited {
    color: var(--giz-purple);
}

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

#map {
    display: flex;
    width: 100vw;
    height: 100%;
}
#map input[type="checkbox"] {
    accent-color: var(--giz-red);
}
#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("../img/svg/loading.svg");
    -webkit-mask-attachement: url("../img/svg/loading.svg");

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

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

/* Ticks for left panel slider and right panel legend bar */

.range-tick {
    fill: black;
}

.range-tick:first-child {
    -webkit-transform: translateX(2px);
    -moz-transform: translateX(2px);
    -ms-transform: translateX(2px);
    -o-transform: translateX(2px);
    transform: translateX(2px);
}

.range-tick:last-child {
    -webkit-transform: translateX(-3px);
    -moz-transform: translateX(-3px);
    -ms-transform: translateX(-3px);
    -o-transform: translateX(-3px);
    transform: translateX(-3px);
}

.tick-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 12px;
    color: black;
}


.fa{
    width: 1em;
    height: 1em;
    display: inline-block;
    background: var(--giz-grey);
    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 var(--giz-light-grey);
    text-align: left;
    cursor: help;
}

.tooltip .top, .tooltip .bottom {
    /* text-align: justify; */
    /* margin-left: 10px; */
    padding:10px 20px;
    color: #000000;
    background-color: var(--giz-light-grey);
    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(--giz-light-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;
}

/* Notification pane */
#notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    
    background-color: var(--giz-grey);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.2);
    
    font-family: calaregular, sans-serif;
    font-size: 14px;
    text-align: center;
    max-width: 500px;
    min-width: 200px;
    
    z-index: 1002; /* Higher than your spinner at 1001 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

#notification.show {
    opacity: 1;
    visibility: visible;
}

#notification.success {
    background-color: var(--giz-green);
}

#notification.warning {
    background-color: var(--giz-orange);
}

#notification.error {
    background-color: var(--giz-red);
}

#notification.info {
    background-color: var(--giz-grey);
}