/* ========== CONTROLE DO PEGMAN (STREET VIEW) ========== */

.leaflet-control-pegman {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  right: 0.75vw !important;
}

.leaflet-control-pegman a {
  background: #00042C !important;
  border: none !important;
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  margin: 2px;
  transition: all 0.3s ease;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 4, 44, 0.3);
  cursor: grab;
}

.leaflet-control-pegman a:hover {
  background: linear-gradient(86.3deg, rgba(0, 119, 182, 1) 3.6%, rgba(8, 24, 68, 1) 87.6%) !important;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 4, 44, 0.4) !important;
}

.leaflet-control-pegman a:active {
  cursor: grabbing;
}

.leaflet-control-pegman a::before {
  content: "\f183";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 18px;
  color: #F8DD4F;
  line-height: 1;
}

.leaflet-control-pegman.active a {
  background: linear-gradient(86.3deg, rgba(0, 119, 182, 1) 3.6%, rgba(8, 24, 68, 1) 87.6%) !important;
  transform: scale(1.02);
  box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.4) !important;
}

#pegman-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  font-size: 36px;
  color: #F8DD4F;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
  transform: translate(-50%, -100%);
  display: none;
}

.pegman-icon {
  background: none !important;
  border: none !important;
}

/* ========== PAINEL DO VISUALIZADOR MAPILLARY ========== */

#mapillary-modal {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 94vh;
  z-index: 9999;
  background: #1a1a2e;
  flex-direction: column;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  border-top: 3px solid #05CB63;
}

/* INDICADOR DE CARREGAMENTO (LOADING) */
#mapillary-loading {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px 30px;
  border-radius: 10px;
  font-size: 16px;
  align-items: center;
  gap: 10px;
}

/* Animação do Spinner de carregamento */
.spinner-mapillary {
  width: 24px;
  height: 24px;
  border: 3px solid #05CB63;
  border-top-color: transparent;
  border-radius: 50%;
  animation: girarSpinner 1s linear infinite;
}

/* MENSAGENS FLUTUANTES */
#mapillary-message {
  display: none;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  background: #e74c3c;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  white-space: pre-line;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@keyframes girarSpinner {
  to {
    transform: rotate(360deg);
  }
}

/* ========== RESPONSIVIDADE (MOBILE) ========== */

@media (max-width: 768px) {
  .leaflet-control-pegman a {
    width: 36px !important;
    height: 36px !important;
    font-size: 14px;
  }

  #mapillary-modal {
    height: 40vh; /* Altura menor em celulares para economizar espaço de tela */
  }
}
