@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;350;400;500;600;700;800;900&display=swap");

:root {
  --verde: #47cbad;
  --azul: #6ab4d5;
  --roxo: #af55cc;
}

* {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: "Lato", sans-serif;
  font-weight: 400;
  display: flex;
  /* Adicionada a propriedade display com o valor flex */
  /* flex-direction: column; */
  background-color: #ffffff;
  flex-direction: column;
  align-items: center;
}

#map {
  /* position: absolute; */
  bottom: 0;
  width: 100%;
  height: 590px;
  border-radius: 15px;
  z-index: 1;
  margin-top: 34px;
  /* border: 1.5px #d7d7d7 solid; */
}

#map > div.mapboxgl-control-container > div.mapboxgl-ctrl-bottom-left {
  display: none;
}


div#layer-controls {
  width: 160px;
  height: 256px;
  z-index: 10;
  position: fixed;
  top: 359px;
  left: 10px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 1);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 7px;
  overflow-y: scroll;
  scrollbar-width: thin;
  /* Mostra sempre a barra de rolagem */
  box-shadow: 0px 10px 15px #00000033;


  /* desabilitar selecao dos textos */
  -webkit-touch-callout: none;
  /* iOS Safari */
  -webkit-user-select: none;
  /* Safari */
  -khtml-user-select: none;
  /* Konqueror HTML */
  -moz-user-select: none;
  /* Old versions of Firefox */
  -ms-user-select: none;
  /* Internet Explorer/Edge */
  user-select: none;
}

div#layer-controls>div {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: space-between;
  padding-bottom: 5px;
}

div#layer-controls>div:not(:first-child) {
  justify-content: space-between;
}

div#layer-controls>div:not(:last-child) {
  border-bottom: 1.7px #d9d9d9 dotted;
}

div#layer-controls>div input,
div#layer-controls>div label {
  cursor: pointer;
  text-align: center;
}

div#layer-controls>div label {
  cursor: pointer;
  text-align: center;
  padding: 2px 20px;
  border-radius: 20px;
  color: white;
  width: 90px;
  margin-right: 0px;
  font-size: 13px;
}


div#layer-controls>div label.perimetro {
  color: #000000;
  background-color: #e4e4e4 !important;
  border: 2px dashed #000000;
}

div#layer-controls>div input {
  width: 17px;
}

input {
  width: 20px;
}

h1 {
  text-align: center;
  color: #000000;
  font-size: 22px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-top: 0px;
  margin-bottom: 7px;
}

h2 {
  font-size: 13.9px;
  font-weight: 500;
  color: #8d8d8d;
  max-width: 400px;
  text-align: center;
  line-height: 20px;
}

.mapboxgl-ctrl-geocoder {
  min-width: 250px !important;
  left: 50px;
  top: 33px;
  border-radius: 50px !important;
}

.mapboxgl-ctrl-geocoder .suggestions {
  z-index: 40 !important;
}

/* #layer-controls>div:nth-child(1) {
  font-weight: 600;
  border-bottom: 1px #252525 solid;
  padding-bottom: 5px;
  margin-bottom: 10px;
  justify-content: flex-start;
  gap: 5px;
  padding-left: 0px;
  padding-right: 10px;
} */

#layer-controls div.btn-zona {
  color: #c7c7c7;
  font-weight: 500;
  font-size: 19px;
  cursor: pointer;
}

/* div#layer-controls > div:not(:first-child)::after {
  content: "+";
  color: #c7c7c7;
  font-weight: 500;
  font-size: 19px;
  cursor: pointer;
} */

/* div#layer-controls > div:first-child::after {
  content: "+";
  color: #ffffff00;
  font-weight: 500;
  font-size: 19px;
} */

input[type="checkbox"] {
  accent-color: #838383;
}

.geocoder {
  position: absolute;
  z-index: 1;
  width: 50%;
  left: auto;
  margin-left: auto;
  top: 50px;
  width: 200px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;

}

.mapboxgl-ctrl-geocoder {
  min-width: 100%;
  left: auto !important;
}

.mapboxgl-ctrl-geocoder--input {
  padding: 21px 35px !important;
}

.mapboxgl-ctrl-geocoder--icon {
  top: 11px !important;
}

.mapboxgl-ctrl-geocoder--icon-close {
  margin-top: 7px !important;
  margin-right: 2px !important;
}


.mapboxgl-ctrl-geocoder--input:focus {
  border-radius: 50px;
  color: #a5a5a5 !important;
  outline: thin solid !important;
}

section.popup-bg {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 300;
  background-color: #0000007f;
}


div.popup {
  width: 305px;
  height: auto;
  position: fixed;
  background-color: #FFFFFF;
  z-index: 50;
  border-radius: 10.5px;
  /* padding: 35px; */
}


div.popup .title {
  width: 100%;
  height: 16px;
  background-color: #868665;
  padding: 24px 0px;
  text-align: center;
  font-size: 12px;
  border-radius: 10px 10px 0px 0px;
  color: #FFFFFF;

}

.btn-close {
  width: 25px;
  height: 25px;
  position: absolute;
  right: 8px;
  font-weight: 800;
  top: 10px;
  color: #ffffffa1;
  cursor: pointer;
}

div.popup p {
  padding: 24px 20px;
  line-height: 24px;
}

.popup h2 {
  font-size: 20px;
}

p.more-infos {
  font-size: 11.6px;
  color: #838383;
  padding-bottom: 3px;
  background-color: #ffffff;
  position: fixed;
  bottom: 43px;
  z-index: 200;
  left: 10px;
  width: 160px;
  text-align: center;
  padding: 5px 20px;
  border-radius: 0px 0px 10px 10px;
  display: block;
}



#legend {
  position: absolute;
  bottom: 40px;
  left: 20px;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  border-radius: 3px;
  line-height: 18px;
  z-index: 100;
  width: 150px;
}

#legend h4 {
  margin-top: 0;
  margin-bottom: 5px;
}

#legend div {
  margin-bottom: 5px;
}

.legend-scale {
  display: inline-block;
  width: 20px;
  height: 10px;
  border-radius: 2px;
}


div#controles {
  position: fixed;
  /* background-color: aqua; */
  top: 50px;
  display: flex;
  z-index: 100;
  gap: 10px;
  flex-direction: row-reverse;
}

div#controles>div.btn {
  cursor: pointer;
  background-color: #f2f2f2;
  padding: 10px 24px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

div#controles>div.btn.active {
  background-color: #2575e8;
  color: white;
}


@media (max-width: 600px) {

  body {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #map {
    height: 570px;
    margin-top: 50px;
    margin-bottom: 180px;

  }

  #map > div.mapboxgl-control-container > div.mapboxgl-ctrl-bottom-left {
    display: none;
  }

  div#layer-controls {
    position: absolute;
    top: 504px;
    left: auto;
    width: 160px;
    height: 143px;
    padding: 20px;
  }

  .mapboxgl-ctrl-geocoder {
    /* position: fixed !important; */
    width: 100px !important;
    left: auto !important;
    margin-top: 80px;
  }


  /* #layer-controls>div:nth-child(1) {
    gap: 18px;
  } */

  .mapboxgl-ctrl-geocoder--input {
    padding: 23px 41px !important;
    font-size: 16px !important;
  }

  .geocoder {
    position: absolute;
    z-index: 1;
    width: 50%;
    left: auto;
    margin-left: auto;
    top: 0px;
    width: 200px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;

  }

  .mapboxgl-ctrl-geocoder.mapboxgl-ctrl {
    position: absolute !important;
  }

  h1 {
    font-size: 18px;
  }

  #map>div.mapboxgl-control-container>div.mapboxgl-ctrl-top-right {
    top: 27px !important;
  }

  p.more-infos {
    font-size: 11.6px;
    color: #838383;
    padding-bottom: 3px;
    background-color: rgb(255, 255, 255);
    position: absolute;
    bottom: 10px;
    z-index: 200;
    left: auto;
    width: none;
    text-align: center;
    padding: 5px 20px;
    border-radius: 0px 0px 10px 10px;
  }

  div.popup {
    width: 270px;
    height: auto;
    position: fixed;
    background-color: #FFFFFF;
    z-index: 50;
    border-radius: 10.5px;
    /* padding: 35px; */
  }

  .popup h2 {
    font-size: 18px;
  }

  .popup p {
    font-size: 14px;
    line-height: 18px;
  }


  div#controles {
    width: 90%;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row;
    gap: 8px;
  }

  div#controles>div.btn:nth-child(1) {
    order: 6;
  }

  div#controles>div.btn:nth-child(2) {
    order: 5;
  }

  div#controles>div.btn:nth-child(3) {
    order: 4;
  }

  div#controles>div.btn:nth-child(4) {
    order: 3;
  }

  div#controles>div.btn:nth-child(5) {
    order: 2;
  }

  div#controles>div.btn:nth-child(6) {
    order: 1;
  }
  
  div#controles>div.btn {
    cursor: pointer;
    background-color: #f2f2f2;
    padding: 9px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13.5px;
  }

  
  #legend {
    bottom: 15px;
    right: 15px;
    left: auto;
    width: 130px;
  }

  div#layer-controls>div label {
    font-size: 12.5px;
  }

}
