* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

@view-transition {
  navigation: auto;
}

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);
}

.border_coral.red {
  border-top: 3px solid crimson;
  border-bottom: 3px solid crimson;
}

.border_coral.left_border {
  border-left: 3px solid crimson;
  border-top: 3px solid crimson;
  border-bottom: 3px solid crimson;
}

.coral {
  background-color: crimson;
  color: white;
}

.row p.total_time {
  flex-basis: 100%;
  background-color: crimson;
  color: white;
}

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,
.download {
  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;
}

div.download {
  width: 86px;
}

div.download:active {
  margin-top: 10px;
}

nav ul li:hover,
nav ul li.active:hover,
.download: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;
}

.popup_title1 {
  font-size: 18px;
  /* margin: 0px 0px 1em 0px; */
  text-align: center;
}

#trig {
  /* display: none; */
  font-size: 50px;
}

.form {
  max-width: 550px;
  margin: 0px auto;
  color: black;
  padding: 7px 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);
  transform: scale(0);
}

.checkbox_input:checked+.checkbox_label::after {
  -webkit-transform: scale(1);
  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;
  margin-top: 25px;
  /* 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;
}


.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;
}

#bg {
  height: 100vh;
  /* background-color: #F0F0F0; */
  /* padding: 20px; */
  /* background-image: url('../images/backgrounds/kitchenBg.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;
}

.desktop_grid_container {
  position: relative;
}

.desktop_grid_container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(51, 51, 51, 0.85) url('../images/loading.gif') center / 50px no-repeat;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease 0s;
}

.desktop_grid_container.sending:after {
  opacity: 1;
  visibility: visible;
}

.dropdown-content {
  display: none;
  position: absolute;
  /* width: 50%; */
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  top: 50px;
  left: 0;
  z-index: 1;
}

.drop_btn {
  /* font-family: arial; */
  text-decoration: none;
  display: block;
  color: #FFFFFF;
  background: linear-gradient(rgb(162, 164, 172), rgb(130, 136, 133)) rgb(162, 164, 172);
  height: 50px;
  padding: 16px;
}

/* li.dropdown{
  display: inline-block;
  /* position:relative; 
}*/

*/ .dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;

}

.drop_btn:hover {
  background: gray;
}



@media (min-width: 851px) {
  /* DESCKTOP VIEW*/



  .dropdown-content {
    width: 50%;
  }


  .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: 50%;
  }

  #map svg {
    height: calc(100vh - 50px);
  }

  .container {
    display: none;
  }

  h1.heading {
    font-size: 20px;
  }

  .graph_legend {
    display: grid;
    width: 100%;
    grid-template-columns: 33% 33% 33%;
    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,
  .sensorIcon1 {
    grid-area: 2/1/3/2;
    height: 100%;
    justify-self: center;

  }


  .sensorValue {
    grid-area: 1/2/3/3;
    /* background-color: pink; */
    width: 100px;
    justify-self: center;
  }


  .download {
    grid-area: 2/3/2/3;
    align-self: center;
    justify-self: center;
  }

  .standAlone {
    margin-top: 20px;
  }

  .download i {
    font-size: 50px;

  }

  .sensorValue.water2 {
    grid-area: 2/2/3/3;

  }

  .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%;
  }

  #bg {
    width: 50%;
  }

  .sensor {

    height: 200px;
    margin: 10% 5% 0 5%;

  }


}


@media (max-width: 850px) {
  /*  MOBILE VIEW */

  .mobile {
    position: absolute;
    top: 2%;
    right: 6%;
    z-index: 1;
    transition: all 0.5s ease 0s;
    color: #3192ff;
  }

  #cont {
    position: relative;
    transition: all 0.5s ease 0s;
  }

  .right {
    position: absolute;
    background-color: gray;
    width: 100%;
    text-align: center;
    color: white;
  }

  nav ul {
    justify-content: space-evenly;
  }


  .preloader-img {
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100vh;
  }


  .dropdown-content {
    width: 100%;
  }

  .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;
  }

  .desktop_grid_container {
    height: calc(100vh - 90px);
  }
}