/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v7.0.29,
* Autoprefixer: v9.7.6
* Browsers: last 4 version
*/

@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@200;300;400;500;700&display=swap");

html,
body {
  width: 100%;
  height: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  justify-items: center;
  font-family: Rubik, sans-serif;
  background-image: url(images/pattern-bg.png);
  /* background-repeat: no-repeat; */
  background-size: contain;
  position: fixed;
  top: 0;
  left: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  z-index: -1;
}

.app-title {
  color: rgb(255, 255, 255);
  font-size: 2rem;
  font-weight: 400;
  position: absolute;
  top: 30px;
  width: 100%;
  text-align: center;
  z-index: 2;
}

.input-container-parent {
  width: 100%;
  height: 3.75rem;
  position: absolute;
  top: 95px;
  left: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.input-container {
  width: 554px;
  max-width: 99vw;
  height: 100%;
  overflow: hidden;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  position: absolute;
  top: 0;
  border-radius: 15px;
  z-index: 2;
}

input:focus {
  outline: none;
}

.ip-input {
  line-height: 100%;
  font-family: Rubik, sans-serif;
  font-weight: 400;
  font-size: 1.2rem;
  padding-left: 20px;
  width: 100%;
  height: 100%;
  background-color: rgb(255, 255, 255);
  border-style: hidden;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.submit {
  width: 58px;
  height: 100%;
  font-size: 1.25rem;
  background-color: black;
  color: rgb(255, 255, 255);
  border-radius: 0 15px 15px 0;
  border: none;
  position: absolute;
  top: 0;
  right: 0;
}

.submit:hover {
  cursor: pointer;
  background-color: hsl(0, 0%, 17%);
}

.results-container-parent {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  justify-content: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  width: 100%;
  min-height: 145px;
  position: absolute;
  top: 200px;
  left: 0;
}

.results-container {
  height: auto;
  max-width: 99vw;
  padding: 15px 0;
  border-radius: 15px;
  -webkit-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 40px 0 rgba(0, 0, 0, 0.19);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 40px 0 rgba(0, 0, 0, 0.19);
  background-color: rgb(255, 255, 255);
  color: black;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  position: absolute;
  top: 0;
  z-index: 3;
}

.hide-show {
  position: absolute;
  top: 10px;
  right: 10px;
  width: auto;
  height: auto;
  padding: 2px 15px;
  font-size: .75rem;
  text-align: center;
  color: rgb(255, 255, 255);
  background-color: rgb(0, 0, 0);
  text-decoration: none;
  border-radius: 15px;
  z-index: 5;
}

.hide-show:hover {
  cursor: pointer;
  background-color: hsl(0, 0%, 17%);
}

.result-box {
  width: 200px;
  height: auto;
  margin: 10px 30px;
  text-align: left;
  z-index: 4;
}

.location {
  min-width: 150px;
}

.vertical-bar {
  -ms-flex-item-align: center;
  -ms-grid-row-align: center;
  align-self: center;
  float: left;
  height: 75px;
  width: 2px;
  background-color: rgb(190, 182, 182);
}

h5 {
  margin: 10px auto 15px;
  font-weight: 500;
  color: hsl(0, 0%, 59%);
  white-space: nowrap;
}

h2 {
  margin: 0;
  color: hsl(0, 0%, 17%);
  font-weight: 500;
  font-size: 1.3rem;
}

#map-container {
  width: 100%;
  position: absolute;
  /* top: 272px; */
  top: 250px;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.leaflet-control-zoom {
  visibility: visible;
}

.attribution {
  padding: 2px 5px;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  position: absolute;
  bottom: 0;
  text-align: left;
  background: rgba(255, 255, 255, 0.7);
  color: rgb(100, 100, 100);
  z-index: 401;
}

/* MAX 900PX SCREEN 
   Changes results container to column display */
@media screen and (max-width: 900px) {
  .body {
    height: 825px;
  }

  .map-container {
    height: auto;
  }

  .app-title {
    font-size: 1.75rem;
    top: 30px;
  }

  .input-container-parent {
    height: 55px;
    top: 85px;
  }

  .input-container {
    width: 310px;
  }

  .ip-input {
    width: 100%;
    font-weight: 300;
    font-size: 1rem;
  }

  .submit {
    width: 58px;
    margin: 0;
  }

  h5 {
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.10rem;
    margin: 5px;
  }

  h2 {
    font-size: 1rem;
  }

  .results-container-parent {
    height: 250px;
    top: 165px;
  }

  .results-container {
    width: 310px;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    margin: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    justify-items: center;
  }

  .result-box {
    width: auto;
    text-align: center;
    margin: 5px;
  }

  .vertical-bar {
    display: none;
  }
}

/* MAX 410PX SCREEN
   Removes zoom control in really small phones. */
@media screen and (max-width: 410px) {

  .leaflet-control-zoom,
  .leaflet-control-attribution {
    display: none;
  }
}

/* MAX 812PX AND MIN 320PX SCREEN */
/* Forces phone or tablet to keep portrait orientation */
@media screen and (min-width: 320px) and (max-width: 850px) and (orientation: landscape) {
  body {
    -webkit-transform: rotate(-90deg);
    -ms-transform: rotate(-90deg);
    transform: rotate(-90deg);
    -webkit-transform-origin: left top;
    -ms-transform-origin: left top;
    transform-origin: left top;
    width: 100vh;
    height: 100vw;
    overflow-x: hidden;
    position: absolute;
    top: 100%;
    left: 0;
  }
}

/* MAX 375PX SCREEN - VERY SMALL SCREEN */
@media screen and (max-width: 600px) and (max-height: 600px) {

  .app-title {
    font-size: 1rem;
    top: 10px;
  }

  .input-container-parent {
    height: 2.25rem;
    top: 40px;
  }

  .input-container {
    border-radius: 10px;
  }

  .ip-input {
    font-size: 1rem;
  }

  .submit {
    border-radius: 0 10px 10px 0;
  }

  #map-container {
    top: 130px;
  }

  .results-container-parent {
    top: 90px;
  }
}