/* Mapa de pontos (Leaflet) com abertura, busca, localização e ficha do ponto. */

/* O Leaflet define a própria fonte; mantém a Poppins também dentro do mapa */
.leaflet-container {
  font-family: inherit;
  background: var(--floresta-escura);
}

#mapa {
  width: 100%;
  height: 100%;
}

/* Tinge a base cinza da Esri com o verde da marca */
.leaflet-tile-pane {
  filter: sepia(0.9) hue-rotate(115deg) saturate(1.3) brightness(0.9);
}

/* ---------- Marcadores ---------- */

.marcador img {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.marcador::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--verde);
  border-radius: 50%;
  animation: anel 1.8s ease-out infinite;
}

.voce-esta-aqui span {
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--branco);
  border-radius: 50%;
  background: #3d8bff;
  box-shadow: 0 0 0 6px rgba(61, 139, 255, 0.25);
}

/* ---------- Barra de busca + localização ---------- */

.barra {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  display: flex;
  gap: 6px;
  z-index: 1000;
}

#busca {
  flex: 1;
}

#busca-campo,
#localizar {
  height: 30px;
  border: 1px solid rgba(195, 235, 198, 0.25);
  border-radius: 999px;
  background: rgba(11, 34, 36, 0.92);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

#busca-campo {
  width: 100%;
  padding: 0 12px;
  font-family: var(--texto);
  font-size: 11px;
  font-weight: 500;
  color: var(--branco);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

#busca-campo::placeholder {
  color: var(--verde-claro);
}

#busca-campo:focus {
  border-color: var(--verde);
}

#busca-campo::-webkit-search-cancel-button {
  display: none;
}

#localizar {
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  color: var(--verde);
  cursor: pointer;
}

#localizar svg {
  width: 14px;
  height: 14px;
}

#busca.carregando #busca-campo,
#localizar.carregando {
  border-color: var(--verde);
  animation: respirar 0.9s ease-in-out infinite;
}

#aviso {
  position: absolute;
  left: 50%;
  top: 46px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--floresta);
  background: var(--creme);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -6px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  z-index: 1000;
}

#aviso.visivel {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Abertura ---------- */

.intro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px 18px;
  background:
    var(--montanhas) bottom / 100% 54px no-repeat,
    radial-gradient(circle at 85% 15%, rgba(82, 181, 90, 0.3), transparent 45%),
    radial-gradient(circle at 50% 40%, var(--floresta-clara), var(--floresta) 75%);
  z-index: 1100;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.intro.dispensada {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro > *,
.intro-conteudo > * {
  animation: surgir 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.intro-chamada {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verde);
  animation-delay: 0.2s;
}

.intro-conteudo h1 {
  margin-top: 4px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
  animation-delay: 0.35s;
}

.intro-texto {
  margin-top: 6px;
  max-width: 230px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--verde-claro);
  animation-delay: 0.5s;
}

.intro-texto strong {
  color: var(--branco);
}

.intro-conteudo .btn {
  margin-top: 12px;
  animation:
    surgir 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.65s backwards,
    respirar 1.6s ease-in-out 1.5s infinite;
}

/* ---------- Ficha do ponto (bottom sheet) ---------- */

#ficha-fundo {
  position: absolute;
  inset: 0;
  background: rgba(5, 18, 19, 0.45);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
  z-index: 1200;
}

#ficha-fundo.visivel {
  opacity: 1;
  visibility: visible;
}

#ficha {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px 12px;
  border-radius: 14px 14px 0 0;
  background: var(--floresta);
  border-top: 1px solid rgba(195, 235, 198, 0.2);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1300;
}

#ficha.aberta {
  transform: none;
}

.ficha-alca {
  display: block;
  width: 32px;
  height: 4px;
  margin: 0 auto 6px;
  border-radius: 2px;
  background: rgba(195, 235, 198, 0.35);
}

#ficha-fechar {
  position: absolute;
  right: 8px;
  top: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--verde-claro);
  background: transparent;
  cursor: pointer;
}

.ficha-nome {
  padding-right: 24px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.ficha-linha {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--verde-claro);
}

.ficha-linha svg {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-top: 1px;
  color: var(--verde);
}

#ficha .btn {
  margin-top: 9px;
}

@keyframes anel {
  from {
    opacity: 0.9;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.8);
  }
}
