/* Mapa do Brasil — malha oficial simplificada e interação acessível. */

.painel-mapa {
  padding: 24px;
}

.mapa-wrapper {
  position: relative;
  min-height: 470px;
  padding: 22px;
  overflow: visible;
  background: #ebe8e1;
  border: 0;
  border-radius: 4px;
}

.mapa-brasil {
  display: flex;
  width: 100%;
  min-height: 426px;
  align-items: center;
  justify-content: center;
}

.mapa-brasil svg {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  overflow: visible;
}

.mapa-uf {
  cursor: pointer;
  outline: none;
}

.mapa-uf path {
  fill: #faf8f3;
  stroke: #69665f;
  stroke-width: 0.18;
  vector-effect: non-scaling-stroke;
  transition: fill 140ms ease, stroke 140ms ease;
}

.mapa-uf:hover path,
.mapa-uf:focus path {
  fill: #ffd3a5;
  stroke: #6f3400;
  stroke-width: 0.28;
}

.mapa-uf:focus-visible path {
  filter: drop-shadow(0 0 0.08px #171715);
}

.mapa-uf.ativo path {
  fill: var(--accent);
  stroke: #542600;
  stroke-width: 0.3;
}

.mapa-uf.sem-dados {
  cursor: not-allowed;
  opacity: 0.45;
}

.mapa-alvo-ampliado {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.mapa-dica {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  max-width: calc(100% - 28px);
  padding: 7px 9px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  background: #171715;
  border-left: 3px solid var(--accent);
  pointer-events: none;
}

.mapa-carregando {
  color: var(--texto-suave);
  font-size: 0.9rem;
}

.mapa-acoes {
  display: flex;
  align-items: end;
  gap: 8px;
  min-width: 280px;
}

.mapa-acoes .campo-uf {
  flex: 1;
  min-width: 0;
}

.mapa-acoes .btn-limpar-mapa {
  flex: 0 0 auto;
  min-height: 46px;
}

.mapa-acoes .btn-limpar-mapa:disabled {
  color: var(--texto-suave);
  background: transparent;
  border-color: var(--borda);
  cursor: default;
  opacity: 0.55;
}

.campo-uf label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.campo-uf select {
  width: 100%;
  min-height: 46px;
  padding: 0 38px 0 11px;
  color: var(--texto);
  font: inherit;
  background: var(--card);
  border: 1px solid #a9a399;
  border-radius: 4px;
}

.mapa-ajuda,
.mapa-fonte {
  margin: 0;
  color: var(--texto-suave);
  font-size: 0.78rem;
  line-height: 1.45;
}

.mapa-fonte {
  padding-top: 10px;
  border-top: 1px solid var(--borda);
}

@media (max-width: 700px) {
  .painel-mapa {
    padding: 18px;
  }

  .painel-mapa-topo,
  .mapa-acoes {
    align-items: stretch;
    flex-direction: column;
  }

  .mapa-acoes {
    width: 100%;
    min-width: 0;
  }

  .mapa-wrapper {
    min-height: 330px;
    padding: 12px;
  }

  .mapa-brasil {
    min-height: 305px;
  }

  .mapa-dica {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }

  .mapa-ajuda {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mapa-uf path {
    transition: none;
  }
}
