*{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body{
  /* height: 100vh;
  background-color: #F0F0F0;
  /* padding: 20px; */
  /*background-image: url('../images/bg.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center; */
  /* position: fixed; */
  position: relative;
  z-index: -2;
}
/* #bg{
  height: 100vh;
  background-image: url('../mapForStan.html');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  position: fixed;
  z-index: -2;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
} */

.preloader{
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height:100vh;
  z-index: 10;
  background-image: url('../images/SplashLogo.png');
  background: radial-gradient(circle at top, #3192ff, #0066d9);
  /* background-image: radial-gradient(cercle, #3192ff, #0066d9); */
  background-repeat: no-repeat;
  background-position: center;
}

.preloader-img{
  position: absolute;
  top: 0;
  left: 30%;
  bottom: 0;
  right: 30%;
  /* width: 100%; */
  /* height:100vh; */
  z-index: 10;
  background-image: url('../images/SplashLogo.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

#stop-scrolling{
  height: 100% !important;
  overflow: hidden !important;
}

.graph, .gates{
  opacity: 0;
  visibility: hidden;
  transition: all 0.8s ease-in-out;
  transform: translate(0px,500px);
  overflow-y: hidden;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.green{
  border: #38F504 thin solid;
  background-color: rgb(200,255,200);
  }

foreignObject.green{
  border: #38F504 thin solid;
  color: green;
}

.blue{
    border: #3192FF thin solid;
}

.gray{
  border: #979797 thin solid;
}

.red{
  border: red thin solid;
  background-color: rgb(255,200,200);
}
foreignObject.red{
  border: red thin solid;
  color: red;
}

.yellow{
  border: yellow thin solid;
}
.brown{
  border: brown thin solid;
}
.orange{
  border: orange thin solid;
}
.black{
  border: black thin solid;
}

.level1, .level2{
  position: absolute;
  width:100%;
  height:100%;
  background-color: #3192ff;
  left:0;
  z-index: -1;
  top: 166px;
  transition: top 2s ease-in-out 0s;

}

.sensorName, .sensorValue{
  background-color: #EEEEEE;
  text-align: center;
  border-radius: 5px;
  font-weight: bold;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.water1, .water2{
  position: relative;
  z-index: 0;
}

.sensor{
  transition: transform 0.3s ease 0s;
  width: 90%;
  /* height: clamp(100px, 30vw, 150px); */
  height: 100px;
  background-color: #E5E5E5;
  margin: 5% 5% 0 5%;
  border-radius: 5px;
  transform: scale(0);
  display: grid;
  grid-gap: 10px;
  grid-template-columns: 70% 25%;
  grid-template-rows: 25% 65%;
  padding: 10px;
}
nav{
  background-color: #E5E5E5;
  width: 100%;
  height: 50px;
}

nav ul{
  display: flex;
  /* align-items: center; */
  /* justify-content: space-evenly; */
  height: 100%;
}

nav ul li{
  list-style-type: none;
  align-self: center;
  border-radius: 15px;
  opacity: .5;
  border: #999 thin solid;
  padding: 8px;
  transition: all 0.5s ease-in-out;
  width: 45px;
  text-align: center;
}

nav ul li:hover, nav ul li.active:hover{
  background-color: #3192ff;
  color: white;
  opacity: 1;
  cursor: pointer;
}

nav ul li.active{
  border: #3192ff thin solid;
  color: #3192ff;
  opacity: 1;
}

.fas{
  font-size: 25px;
}

.container{
  display: flex;
  flex-direction: column;
}

.popup{
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  top: 0;
  left:0;
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  overflow-x: hidden;
  transition: all .8s ease 0s;
}

.popup:target{
  opacity: 1;
  visibility: visible;
}

.popup:target .popup_content{
  transform: perspective(600px) translate(0px,0px) rotateX(0deg);
  opacity: 1;
}

.popup_area{
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: default;
}

.popup_body{
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 10px;
}

.popup_content{
  background-color: rgba(255,255,255, 1);
  border-radius: 10px;
  color: #000000;
  max-width: 800px;
  padding: 30px;
  position: relative;
  transition: all 0.8s ease 0s;
  opacity: 0;
  transform: perspective(600px) translate(0px,-100%) rotateX(45deg);
}

.denied{
  position: absolute;
  height: 100%;
  width: 100%;
  background-image: url('../images/denied.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  top: 0;
  left: 0;
  opacity: 1;
  z-index: 2;
  transition: all .8s ease 0s;
}

.popup_close{
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 20px;
  color: #000000;
  text-decoration: none;

}

.popup_title{
  font-size: 40px;
  /* margin: 0px 0px 1em 0px; */
  text-align: center;
}

#trig{
  /* display: none; */
  font-size: 50px;
}

.form{
  max-width:550px;
  margin: 0px auto;
  color: black;
  padding: 30px 0;
}

.form_item{
  margin: 0px 0px 10px 0px;
  position: relative;
  display: flex;
  flex-flow: column-reverse;
}

/* .form_label{
  font-size: 18px;
  display: block;
  margin: 0px 0px 10px 0px;
} */

.form_input{
  height: 50px;
  padding: 0px 20px;
  border-radius: 5px;
  width: 100%;
  font-size: 18px;
}

.form_label, .form_input {
  transition: all 0.2s;
  touch-action: manipulation;
}

.form_input:placeholder-shown + .form_label{
  cursor: text;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform-origin: left bottom;
  transform: translate(15px, 37px) scale(1.2);
  text-align: left;
  color: gray;
}

.checkbox_label{
  font-size: 16px;
  line-height: 140%;
  display: inline-flex;
  align-items: center;
  width: 100%;
  position: relative;
  cursor: pointer;
}

.checkbox_input{
  display: none;
}

.checkbox_label::before{
  content: '';
  align-self: flex-flex-start;
  flex: 0 0 24px;
  height: 24px;
  background-color: #E0E0E0;
  border-radius: 4px;
  margin-right: 10px;
}

.checkbox_label::after{
  transition: transform 0.5s ease 0s;
  content: '';
  width: 16px;
  height: 16px;
  position: absolute;
  top: 4px;
  left: 4px;
  background-color: #3192ff;
  border-radius: 4px;
  -webkit-transform: scale(0);
}

.checkbox_input:checked + .checkbox_label::after{
  -webkit-transform: scale(1);
}

/* .form_input{
  color: #D7D7D7;
} */

.form_input:not(:placeholder-shown) + .form_label, .form_input:focus + .form_label{
  transform: translate(0px, 0px) scale(0.7);
  cursor: pointer;
  transform-origin: left bottom;
}

::-moz-placeholder {
  opacity: 0;
  transition: inherit;
  color: #D7D7D7;
}
::-webkit-input-placeholder{
  opacity: 0;
  transition: inherit;
  color: #D7D7D7;
}

.form_input:focus::-moz-placeholder {
  opacity: 1;
}
.form_input:focus::-webkit-input-placeholder{
  opacity: 1;
}

.form_label{
  text-align: left;
  width: 100%;
}

.form_button{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 5px;
  background-color: #3192ff;
  color: white;
  text-shadow: 0 0 5px black;
  /* box-shadow: 0 5px 0 #161b13; */
}

.form_button:hover{
  background-color: #60aeef;
}



.graph_button, .submit{
  width: 18%;
  font-weight: 700;
  font-size: 16px;
  transition: all .8s ease 0s;
  background-color: #E5E5E5;
  border-radius: 5px;
  height: 33px;
  border: #3192ff thin solid;
}

.graph_button.active, .submit:hover{
  background-color: #3192ff;
  color: white;
  border-color: blue;
}

.line{
  font-size: 20px;
  color: darkgray;
}



.outOfMap{
  position:absolute;
  top: 0;
  right: 0;
  margin: 20px;
}

.map_button{
  width: 140px;
  height: 45px;
  /* border: #999 thin solid; */
  color: #999;
  border-radius: 15px;
  margin-bottom: 10px;
  transition: all 0.8s ease 0s;
  display: flex;
  align-items: center;
  background-color: white;
  font-weight: 700;
}

.mapValue{
  margin: 0 auto;
}

.mapIcon img{
  width: 100%;
}

.mapIcon{
  width: 44%;
  padding-top: 5px;
}

foreignObject:hover, .link:hover{
  cursor: pointer;
}

.map_button:hover{
  background-color: #3192ff;
  border: blue thin solid;
  color: white;
}

#temperature{
  background-image: url('../images/tempIcon.png');
}

#pressure{
  background-image: url('../images/barometricPressureIcon.png');
}

#humidity{
  background-image: url('../images/humidityIcon.png');
}

#airQuality{
  background-image: url('../images/airQualityIcon.png');
}

#temperature, #pressure, #humidity, #airQuality{
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;

}

.form_input._error{
  box-shadow: 0 0 15px red;
}

.gate_status{
margin: 20px 0;
}
.gate_status p.labels.green{
  text-shadow: 0px 0px 3px #38F504;
  font-weight: 700;
}
.gate_status p.labels.red{
  text-shadow: 0px 0px 3px red;
  font-weight: 700;
}

.gate_table table{
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  border: 1px solid #cbcbcb;
  font-size: 20px;
}
.gate_table table thead{
  background-color: #E0E0E0;
  vertical-align: middle;
}
.gate_table table thead th{
  border-width: 0 0 1px 0;
  border-bottom: 1px solid #cbcbcb;
}
.gate_table table tr:nth-child(even){
  background-color: #F2F2F2;
}
.gate_table table tr{
  height: 45px;
  text-align: center;
}
.gate_table{
  /* overflow-y: auto; */
  /* width: 100%; */
}

.author{
  color: white;
  font-weight: bold;
  position: absolute;
  width: 100%;
  bottom: 0;
}

#pollingTime{
  display: inline-block;
  text-align: right;
  width: 80px;
}


.row{
  display: flex;
  flex-wrap: wrap;
  /* align-items: center; */
}

.row p{
  flex-basis: 33.33%;
  border: lightgray thin solid;
  /* align-self: center; */
  /* display: flex;
  align-items: center; */
  text-align: center;
}


#table_head{
  font-weight: bolder;
}
#table_head p{
  border: none;
}

div.row{
  padding: 0 !important;
    height: auto !important;
}

@media (min-width: 851px){


  .buttons{
    display: flex;
    justify-content: space-around;
    padding: 36px 0 20px 0;
  }

  .desktop_grid_container{
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    /* padding: 0 20px 0 0; */
    /* grid-gap: 20px; */
    position: relative;
  }
  .desktop{
    height: calc(100vh - 50px);
    grid-area: 1 / 1 / 2 / 2;
    overflow: hidden;
    position: relative;
    /* padding: 10px; */
  }

  .graph, .gates{
    grid-area: 1 / 2 / 2 / 3;
    padding: 10px;
    text-align: center;
    height: calc(100vh - 50px);
    /* display: none; */
    overflow-y: auto;
  }
  #graph{
    width: 100%;
    height: 300px;
  }
  #map svg{
    height: calc(100vh - 50px);
  }
.container{
  display: none;
}

h1.heading{
  font-size: 20px;
}

.graph_legend{
  display: grid;
  width: 100%;
  grid-template-columns: 50% 50%;
  grid-template-rows: 30px 50% 50%;
  margin-top: 30px;
  padding: 10px;
  grid-gap: 10px;
}

.legend{
  grid-area: 1/1/2/3;
  text-align: center;
  font-size: 18px;
}

.sensorIcon{
  grid-area: 2/1/3/2;
  height: 100%;
  justify-self: center;

}

.sensorValue{
  grid-area: 2/2/3/3;
  /* background-color: pink; */
  width: 100px;
  justify-self: center;
}

.graph_form{
  grid-area: 3/1/4/3;
  /* background-color: #E5E5E5; */
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.labels{
  margin: auto;
  width: 100%;
  border-radius: 10px;
  /* border: #3192FF thin solid; */
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 10px;
  font-size: 25px;
}

#init{
  /* background-image: url('../images/SplashLogo.png'); */

  height: calc(100vh - 50px);
  grid-area: 1 / 2 / 2 / 3;
  /* overflow: hidden; */
  background-image: url('../images/SplashLogo.png');
  background: radial-gradient(circle at top, #3192ff, #0066d9);
  /* background-image: radial-gradient(cercle, #3192ff, #0066d9); */
  background-repeat: no-repeat;
  background-position: center;
  transform: translate(0, 0);
  opacity: 1;
  visibility: visible;
  padding: 0;
}

#init .preloader-img{
  left: 5%;
  right: 5%;
}

foreignObject.map_button{
  display: block;
  }
  foreignObject div.mapIcon{
    float: left;
    padding-top: 4px;
    }
    foreignObject div.mapValue{
      margin: 13px 0 0 72px;
      }
      foreignObject div.valuePos{
        margin: 13px 0 0 64px;
        }

    nav ul{
      width: 50%;
      display: block;
      float: left;
    }

    nav ul li{
      margin-left: 30px;
      float:left;
      margin-top: 3px;
    }

    .right{
      /* height: 100%; */
      border-radius: 15px;
      opacity: .5;
      border: #999 thin solid;
      padding: 12px;
      transition: all 0.5s ease-in-out;
      /* width: 50%; */
      text-align: center;
      float: right;
      margin-right: 30px;
      margin-top: 3px;
      height: 86%;
    }

}


@media (max-width: 850px){

  .right{
    display: none;
  }

nav ul{
  justify-content: space-evenly;
}


  .preloader-img{
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height:100vh;
  }

  #bg{
    height: 100vh;
    /* background-color: #F0F0F0; */
    /* padding: 20px; */
    background-image: url('../images/bg.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    /* position: fixed; */
    position: fixed;
    z-index: -2;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }




  .sensorName{
    grid-area: 1 / 1 / 2 / 2;
    }
  .sensorValue{
    grid-area: 1 / 2 / 3 /3
  }

  .sensorIcon{
    max-height: 100%;
    grid-area: 2 / 1 / 3 / 2;
    justify-self: center;
  }

  /* .sensorName, .sensorValue{
    background-color: #EEEEEE;
    text-align: center;
    border-radius: 5px;
    font-weight: bold;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #water{
    position: relative;
    z-index: 0;
  } */

  #weather{
    display: grid;
    grid-template-columns: 50% 50%;
    grid-template-rows: 33% 33% 34%;
    width: 100%;
    height: 100%;
    align-items: center;
  }

  .pressure{
    grid-area: 1 / 1 / 2 / 3;
  }
  .uv{
    grid-area: 2 / 1 / 3 / 3;
  }
  .tempr{
    grid-area: 3 / 1 / 4 / 2;
  }
  .wind{
    grid-area: 3 / 2 / 4 / 3;
  }
  .pressure, .uv, .tempr, .wind{
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  /* #level{
    position: absolute;
    width:100%;
    height:100%;
    background-color: #3192ff;
    left:0;
    z-index: -1;
  } */
  .desktop{
    display: none;
  }
  .graph, .gates{
    display: none;
  }

  #graph, .buttons, .graph_form{
    width: 90%;
    margin: 0 auto;
    transition: all 0.5s ease 0s;
    /* transform: scaleY(1); */
  }

  #graph{

    /* height: 300px; */
     transition: all 0.8s ease-in-out;
    opacity: 0;
    visibility: hidden;
    height: 0px;
    /* position:absolute; */

   }

    .buttons{
      transition: all 0.8s ease-in-out;
     opacity: 0;
     visibility: hidden;
     /* height: 0px; */
     margin: 0;
    display: flex;
      justify-content: space-around;

    }
#graph.show{
    margin-top: 30px;
  /* position: relative; */
    visibility: visible;
    opacity: 1;
    height: 300px;
}
.buttons.show{
  visibility: visible;
  opacity: 1;
  /* height: 33px; */
  margin: 0 auto;
  padding: 36px 0 20px 0;
}

  .graph_form{
    background-color: white;
    text-align: center;
  }
  .gate_table{
    max-height: 300px;
    overflow-y: scroll;
    background-color: #E2E2E2;
  }
  .gate_table table{
    font-size: 10px;
  }
}
