body {
    font-size: 100%;
}

* {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
}


@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url('/static/google-materialIcons.woff2') format('woff2');
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  vertical-align: middle;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/****************************************************************/
/************* Pages ********************************************/
/****************************************************************/
div#login {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-right: -50%;
  transform: translate(-50%, -50%);
  width: 25rem;
}
div#login div {
}
div#login input {
  width: 100%;
  height: 4rem;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  padding: 1rem;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
}
body.mapState {
  height: 100vh;
}
#mapWrapper.kpviewState{
  display: none;
}

div#kpViewer {
  /*position:fixed;
  overflow: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30rem;
  height: 30rem;
  margin-top: -15rem;
  margin-left: -15rem;
  z-index: 500;
  background: #bbb;*/
  font-size: 2rem;
}
div#kpViewer.mapState {
  display: none;
}
/*
div#kpViewer i#kpViewerClose {
  position:absolute;
  top: 0.4rem;
  right: 0.4rem;
  font-size: 2rem;
} */
    

div#map_wrapper {
  flex: 1;
  position: relative;
}
div#map {
  height: 100%;
}
#kpFilters {
  display: none;
}
#kpFilters.mapState {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  right: 1.5rem;
  top: 1.5rem; 
  z-index: 500;
  padding: 0.9rem;
  backdrop-filter: blur(10px);
  box-shadow: 1rem 1rem 1rem grey;
}
#kpFilters * {
  font-family: sans-serif;
  font-size: 1.3rem;
  text-align: center;
}
#kpFilters > div.buttons {
  display: flex;
  gap: 0.5rem;
}
#kpFilters > div.buttons > input {
  flex-grow: 1;
  flex-basis: 0;
}

#kpFilters.closed {
  display: none;
}

#mapFiltersToggle {
  display: none;
}
#mapFiltersToggle.mapState {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem; 
  z-index: 500;
  font-size: 2.5rem;
  color: black;
}

.kpFilterRange {
  display: flex;
  flex-direction: column;
  padding-bottom: 1.3rem;
}
@media (min-device-pixel-ratio:1.5), (min-resolution:150dpi) {
    .kpFilterRange {
        padding-bottom: 3rem;
    }
}
.kpFilterRange > div {
  display: flex;
  justify-content: space-between;
}
.kpFilterRange > div > div:last-child {
  /*width: 7rem; */
  height: 1rem;
}

@media (min-device-pixel-ratio:1.5), (min-resolution:150dpi) {
  #mapFiltersToggle  {
     font-size: 6rem;
     right: 2.5rem;
     top: 2.5rem; 
  }
  #kpFilters * {
    font-size: 3rem;
    right: 2rem;
    top: 2rem; 
  }
  #kpFilters {
    gap: 2rem;
    right: 2.5rem;
    top: 2.5rem; 
    padding: 1.5rem;
  }
  div#map .leaflet-popup {
    font-size: 3rem;
  }
}

div.topnav {
  display: flex;
}


div#about {
  width: 100%;
  text-align: justify;
  font-size: 1.5rem;
}


/****************************************************************/
table {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

table td, table th {
  border: 1px solid #ddd;
  padding: 8px;
}

table tr:nth-child(even){background-color: #f2f2f2;}

table tr:hover {background-color: #ddd;}

table th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #04AA6D;
  color: white;
  text-align: center;
}

 /**************************************************************/
 /******* Style inputs, select elements and textareas **********/
 /**************************************************************/

div#filters input {
  font-size: 1.5rem;
}

form.kp  input[type=text], input[type=number], select, textarea{
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  resize: vertical;
}

/* Style the label to display next to the inputs */
label {
  padding: 12px 12px 12px 0;
  display: inline-block;
}

input[type=submit] {
  background-color: #04AA6D;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Style the submit button */
form.kp input[type=submit] {
  float: right;
}

/* Style the container */
.container {
  border-radius: 5px;
  background-color: #f2f2f2;
  padding: 20px;
  max-width: 1000px;
}

/* Floating column for labels: 20% width */
div.label {
  float: left;
  width: 20%;
  margin-top: 6px;
}

/* Floating column for inputs: 80% width */
div.label + div.input {
  float: left;
  width: 80%;
  margin-top: 6px;
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive layout - when the screen is less than 600px wide, make the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
  .label, .input, input[type=submit] {
    width: 100%;
    margin-top: 0;
  }
} 


@media (min-device-pixel-ratio:1.5), (min-resolution:150dpi) {
    div#about {
        width: 100%;
        text-align: justify;
        font-size: 2.5rem;
    }
    div#filters {
        font-size: 2.5rem;
    }
    div.leaflet-popup-content{
        font-size: 1.5rem !important;
    }
}

/**************************************************************************/
/************************  Responsive top navbar  *************************/
/**************************************************************************/
.topnav {
  overflow: hidden;
  background-color: #333;
  font-family: sans-serif;
  flex-wrap: wrap;
}

.topnav a {
  color: #f2f2f2;
  text-align: center;
  text-decoration: none;
  font-size: 2rem; 
  padding: 1rem 1rem;
}

@media (hover: hover){
  .topnav a:hover {
    background-color: #ddd;
    color: black;
  }
}

.topnav a.active {
  background-color: #04AA6D;
  color: white;
}

.topnav .icon {
  display: none;
}


@media (min-device-pixel-ratio:1.5), (min-resolution:150dpi) {
  .topnav a {
     font-size: 4rem;
     padding: 0.8rem 1.1rem;
  }
}

@media (max-width: 1100px) {
  /*  .topnav a:not(:first-child) { */
  .topnav a:not(.active) { 
    display: none; 
  } 
  .topnav a.icon {
/*    float: right; */
    display: block;
    position: absolute;
    right: 0;
    top: 0; 
  }
  .topnav.responsive {
    /*position: relative; */
    flex-direction: column;
  }
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
}


/**************************************************************/
/****************** Two-sided slider **************************/
/**************************************************************/
input[type='range'] {
  width: 100%;
  height: 30px;
  overflow: hidden;
  cursor: pointer;
    outline: none;
}
input[type='range'],
input[type='range']::-webkit-slider-runnable-track,
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
    background: none;
}
input[type='range']::-webkit-slider-runnable-track {
  width: 100%;
  height: 1px;
  background: #003D7C;
}

input[type='range']:nth-child(2)::-webkit-slider-runnable-track{
  background: none;
}

input[type='range']::-webkit-slider-thumb {
  position: relative;
  height: 15px;
  width: 15px;
  margin-top: -7px;
  background: #fff;
  border: 1px solid #003D7C;
  border-radius: 25px;
  z-index: 1;
}
@media (min-device-pixel-ratio:1.5), (min-resolution:150dpi) {
    input[type='range']::-webkit-slider-thumb {
        height: 45px;
        width: 45px;
        margin-top: -22px;
    }
}


input[type='range']:nth-child(1)::-webkit-slider-thumb{
  z-index: 2;
}

.rangeslider{
    position: relative;
    width: 100%;
    /*display: inline-block; */
    margin-top: -0.6rem;
}
.rangeslider input{
    position: absolute;
    left:0px;
}
/*
.rangeslider{
    position: absolute;
} */

/*
.rangeslider span{
    position: absolute;
    margin-top: 30px;
    left: 0;
}

.rangeslider .right{
   position: relative;
   float: right;
   margin-right: -5px;
}

*/
/* Proof of concept for Firefox */
@-moz-document url-prefix() {
  .rangeslider::before{
    content:'';
    width:100%;
    height:2px;
    background: #003D7C;
    display:block;
    position: relative;
    top:16px;
  }

  input[type='range']:nth-child(1){
    position:absolute;
    top:35px !important;
    overflow:visible !important;
    height:0;
  }

  input[type='range']:nth-child(2){
    position:absolute;
    top:35px !important;
    overflow:visible !important;
    height:0;
  }
input[type='range']::-moz-range-thumb {
  position: relative;
  height: 15px;
  width: 15px;
  margin-top: -7px;
  background: #fff;
  border: 1px solid #003D7C;
  border-radius: 25px;
  z-index: 1;
}

  input[type='range']:nth-child(1)::-moz-range-thumb {
      transform: translateY(-20px);    
  }
  input[type='range']:nth-child(2)::-moz-range-thumb {
      transform: translateY(-20px);    
  }
}
@media (min-device-pixel-ratio:1.5), (min-resolution:150dpi) {
    @-moz-document url-prefix() {
        input[type='range']::-moz-range-thumb {
        height: 55px;
        width: 55px;
        margin-top: -27px;
}
    }
}
