#map {
  height: 90%;
  z-index: 1;
}

.map_container {
  height: 95vh;
  min-height: 50vh;
  flex-grow: 1;
  flex-shrink: 1;
  
}

#legend_table{
display: flex;
}

li {
  display: flex;
  flex:auto;
}

ul {
  display: flex;
  align-items: stretch;
  /* Default */
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 0;
  flex-basis: 25%;
  flex: auto;
  z-index: 1;
  flex-shrink: 2;
}

* {
  box-sizing: border-box;
}

#legend {
  z-index: 2;
  background-color: #fff;
  padding: 5px;
  /* border: 1px solid #999; */
  /* border: 1px solid black; */
  text-align: left;
  font-family: 'Roboto', 'sans-serif';
  line-height: 30px;
  width: 100%;
  flex: 1 auto;
  flex-grow: 1;
  flex-shrink: 1;
  box-sizing: border-box;
  visibility: visible;
}


/* Optional: Makes the sample page fill the window. */
html,
body {
  width: 100%;
  height: 100vh;
  min-height: 100vh;

}

#infoBox {
  display: flex;
  flex-direction: row;
  align-content: flex-start;
  flex-wrap: nowrap;
  max-height: 70vh;
  flex: 1;
  /* max-width: -moz-min-content; */

}

.heading {
  font-weight: bold;
}

.table {
  display: table;
  /* Allow the centering to work */
  margin: 0 auto;
}

.invisible {
  display: none;
}

img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1%;
  flex-wrap: nowrap;
  max-width: 100%;
  max-height: 50vh;
  height: auto;
  width: auto\9;
  /* ie8 */
  height: max-content;
}
.popupText {
  text-align: center;
  /* margin-top: 5%; */
}

.header {
  width: 100%;
  display: flex;
}

.header50 {
  flex: 1
}

#legend_table ul {
  display: flex;
  flex: 1;
  justify-content: space-around;
  /*  border: 2px solid black; */
  padding: 0;

}


#legend_table label {
  display: block;
  text-align: center;
  /* outline: 1px solid blue; */

}

input[type=checkbox] {
  /* outline: 1px solid red; */
  width: auto;
  transform: scale(2);
  float: left;
}

#legend_button {
  visibility: hidden;
  display: none;
  z-index: 3;

}

#legend #submitLegend {
  visibility: hidden;
  display: none;
}

@media (max-height:500px) {
  .footer {
    visibility: hidden;
  }

  .map_container {
    height: 100vh;
  }
}


@media screen and (max-width: 760px) {

  .invisible {
    display: none;
  }

  .footer {
    visibility: hidden;
    display: none;
  }

  .map_container {
    height: 100vh;
  }

  #map {
    height: 100%
  }

  #legend {
    visibility: hidden;
    /* clear: both; */
    /* float: left;
    margin: auto;
    width: 28%; */
    display: none;

  }

  #legend_table{
    margin: auto;
    border:3px black;
    display:flex;
    flex-direction: column !important;
    justify-content: center;
  }

  #legend #submitLegend {
    visibility: visible;
    display: block;
    margin-top: 10px;
  }


  #legend_button {
    position: absolute;
    font-size: 5vw;
    visibility: visible;
    display: flex;
    width: 100%;
  }

  #infoBox {
    height: 100%;
    width: 100%;
    top: 0;
    bottom: 0;
    display: flex;
    background: white;
    max-width: 100%;
  }

  #infoBox figure {
    height: auto;
    flex: 1
  }


  ;
}