/* PeabiruSYS — desempenho cartográfico / atualização 08 */

/* MarkerCluster exclusivo da Sinalização. */
.pf-sinal-cluster {
  background: transparent !important;
  border: 0 !important;
}

.pf-sinal-cluster > div {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 50%;
  color: #172033;
  background: rgba(250, 204, 21, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.32);
  font-family: Poppins, Arial, sans-serif;
  font-weight: 800;
  line-height: 1;
}

.pf-sinal-cluster i {
  font-size: 10px;
}

.pf-sinal-cluster span {
  font-size: 11px;
}

.pf-sinal-cluster.is-large span {
  font-size: 10px;
}

/* Rótulo municipal semelhante aos labels usuais de QGIS/ArcGIS:
   sem caixa, baixo contraste visual e halo branco. */
.leaflet-tooltip.municipio-label-sig {
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #334155;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: none;
  text-shadow:
    -1px -1px 0 rgba(255,255,255,.96),
     1px -1px 0 rgba(255,255,255,.96),
    -1px  1px 0 rgba(255,255,255,.96),
     1px  1px 0 rgba(255,255,255,.96),
     0    0   3px rgba(255,255,255,.98);
}

.leaflet-tooltip.municipio-label-sig::before {
  display: none;
}

/* Atualização 10 — Atalhos sem coluna vazia e feedback imediato. */
.pf-floating-grid {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* As ações já existem na barra superior consolidada. Não reservar a antiga
   coluna lateral para elas dentro do painel de Atalhos. */
.pf-floating-row--acoes {
  display: none !important;
}

.pf-floating-row {
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

.pf-floating-row > .pf-floating-buttons-scroll {
  min-width: 0 !important;
  flex: 1 1 auto;
}

.pf-floating-buttons-inline[hidden] {
  display: none !important;
}

/* O botão principal continua visível durante a consulta, mas deixa claro que
   o mapa está trabalhando sem travar toda a interface. */
.pf-float-btn.is-loading {
  cursor: progress;
  opacity: .78;
}

.pf-float-btn.is-loading > i:first-child {
  animation: pf-atalho-pulse .8s ease-in-out infinite alternate;
}

@keyframes pf-atalho-pulse {
  from { transform: scale(.92); opacity: .55; }
  to { transform: scale(1.06); opacity: 1; }
}

@media (max-width: 700px) {
  .pf-floating-row__heading {
    flex: 0 0 auto;
  }
  .pf-floating-buttons-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }
}

/* Neutraliza offsets herdados do layout antigo de duas colunas. */
#pfFloatingTools .pf-floating-grid,
#pfFloatingTools .pf-floating-row {
  margin-left: 0 !important;
  padding-left: 0 !important;
  left: auto !important;
}


/* Atualização 11 — cluster de POI e carregamento não bloqueante. */
.pf-poi-cluster {
  background: transparent !important;
  border: 0 !important;
}

.pf-poi-cluster > div {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.30);
  font-family: Poppins, Arial, sans-serif;
  font-weight: 800;
  line-height: 1;
}

.pf-poi-cluster i { font-size: 10px; }
.pf-poi-cluster span { font-size: 11px; }
.pf-poi-cluster.is-large span { font-size: 10px; }

/* Durante consultas móveis o botão continua clicável: um segundo toque
   cancela/desliga a camada em vez de deixar a interface bloqueada. */
.pf-float-btn.is-loading {
  pointer-events: auto !important;
}

/* Atualização 12 — feedback visível sem bloquear o mapa. */
.pf-map-async-status {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1450;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 3px 14px rgba(15, 23, 42, .18);
  color: #0f172a;
  font-family: Poppins, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.pf-map-async-status[hidden] {
  display: none !important;
}

.pf-map-async-status i {
  flex: 0 0 auto;
}

/* O botão mostra estado de trabalho, mas nunca captura/bloqueia o mapa. */
.pf-float-btn.is-loading {
  pointer-events: auto !important;
  opacity: .86;
}

.pf-float-btn.is-loading > i:first-child {
  animation: none !important;
}

@media (max-width: 700px) {
  .pf-map-async-status {
    bottom: 18px;
    padding: 7px 10px;
    font-size: 11px;
  }
}

/* Atualização 14 — loading sempre perceptível e sem bloquear o mapa. */
.pf-map-async-status {
  top: 78px;
  right: 16px;
  bottom: auto;
  left: auto;
  transform: none;
  z-index: 3200;
  border-color: rgba(15, 23, 42, .22);
  box-shadow: 0 4px 18px rgba(15, 23, 42, .24);
}

.pf-map-async-status i {
  color: #2563eb;
}

@media (max-width: 700px) {
  .pf-map-async-status {
    top: 68px;
    right: 10px;
    bottom: auto;
    left: 10px;
    justify-content: center;
    max-width: none;
  }
}
