/**
 * Mapa do Brasil clicável (wizard etapa 2) — tabs Mapa/Lista, paths dos
 * estados, siglas e controles de zoom. Interação em wizard_map.js.
 * Evidência de seleção pelo CONTORNO do estado (fill + stroke do path);
 * nunca outline retangular.
 */

/* Tab bar Mapa/Lista no padrão segmented control: trilho cinza, aba
   ativa em "pílula" branca elevada. No mobile o trilho ocupa toda a
   largura, com as abas dividindo o espaço igualmente. */
.br-map-tabs {
  display: flex;
  width: 100%;
  gap: 0.25rem;
  margin-bottom: 0.9rem;
  padding: 0.25rem;
  background: #f1f5f9;
  border-radius: 0.75rem;
}

.br-map-tabs__tab {
  flex: 1 1 0;
  justify-content: center;
}

@media (min-width: 576px) {
  .br-map-tabs {
    display: inline-flex;
    width: auto;
  }

  .br-map-tabs__tab {
    flex: 0 0 auto;
  }
}

.br-map-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 0.55rem;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--gf-color-neutral-600, #64748b);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.br-map-tabs__tab .material-icons {
  font-size: 1.1rem;
}

.br-map-tabs__tab:hover {
  color: var(--gf-color-neutral-900, #0f172a);
}

.br-map-tabs__tab.is-active {
  background: #fff;
  color: var(--gf-color-primary);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.25);
}

.br-map-tabs__tab:focus-visible {
  outline: 2px solid var(--gf-color-focus-ring);
  outline-offset: -2px;
}

.br-map__canvas {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

/* Sem fundo próprio: o mapa flutua sobre o branco do container. */
.br-map__svg {
  display: block;
  width: 100%;
  height: auto;
  /* pan-y: o dedo único rola a página normalmente sobre o mapa; o JS só
     assume o gesto com dois dedos (pinch/pan) ou mouse. */
  touch-action: pan-y;
  cursor: grab;
}

.br-map__svg:active {
  cursor: grabbing;
}

.br-map__uf {
  fill: #e2e8f0;
  stroke: #ffffff;
  stroke-width: 0.8;
  cursor: pointer;
  outline: none;
  transition: fill 0.12s ease;
}

.br-map__uf:hover {
  fill: #cbd5e1;
}

.br-map__uf.is-selected {
  fill: var(--gf-color-primary);
  stroke: #0b3f12;
  stroke-width: 1.1;
  /* Relevo: o estado selecionado "levanta" do mapa. */
  filter: drop-shadow(0 3px 3px rgba(11, 63, 18, 0.35));
  transform-box: fill-box;
  transform-origin: center;
  animation: br-uf-pop 0.28s ease;
}

.br-map__uf.is-selected:hover {
  fill: #0f5418;
}

@keyframes br-uf-pop {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.06);
  }

  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .br-map__uf.is-selected {
    animation: none;
  }
}

.br-map__label {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  fill: #475569;
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
}

.br-map__label.is-selected {
  fill: #ffffff;
}

.br-map__controls {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 5;
}

.br-map__control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--bs-border-color, #cbd5e1);
  border-radius: 0.55rem;
  background: #fff;
  color: var(--gf-color-neutral-900, #334155);
  cursor: pointer;
}

.br-map__control:hover {
  background: rgba(var(--gf-color-primary-rgb), 0.07);
  color: var(--gf-color-primary);
}

.br-map__control .material-icons {
  font-size: 1.2rem;
}

.br-map__hint {
  margin-top: 0.4rem;
}

@media (max-width: 575.98px) {
  .br-map__control {
    width: 42px;
    height: 42px;
  }
}
