* {
  box-sizing: border-box;
}

/* ── Seção do mapa ──────────────────────────────── */
.mapa-section {
  width: 100%;
  padding: 56px 16px;
  background-color: #0f172a;
}

/* ── Card principal ─────────────────────────────── */
.mapa-card {
  background: #1e293b;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 60px -12px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px 28px;
  overflow: hidden;
}

/* ── Cabeçalho ──────────────────────────────────── */
.mapa-header {
  text-align: center;
  margin-bottom: 18px;
}

.mapa-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
}

.mapa-header p {
  font-size: 13px;
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
}

/* ── Status ─────────────────────────────────────── */
#mapa-status {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 14px;
  min-height: 20px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

/* ── Canvas do mapa ─────────────────────────────── */
.mapa-canvas-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #e8edf2;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22), 0 1px 4px rgba(0,0,0,0.12);
  line-height: 0;
}

#mapa-container {
  width: 100%;
}

#mapa-container svg {
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: top center;
}

/* ── Interatividade ─────────────────────────────── */
#mapa-container .mun {
  cursor: pointer;
}

#mapa-container .mun path {
  transition: filter 0.13s ease, opacity 0.13s ease;
}

#mapa-container .mun:hover path {
  filter: brightness(1.18) saturate(1.15);
}

/* ── Loading spinner ────────────────────────────── */
.mapa-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 420px;
  font-size: 14px;
  line-height: 1.5;
  color: #64748b;
  gap: 12px;
  font-family: 'Inter', sans-serif;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: #eb850d;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* ── Legenda ────────────────────────────────────── */
.mapa-legenda {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.mapa-legenda-linha {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.legenda-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
}

.legenda-item strong {
  color: #e2e8f0;
  font-weight: 600;
}

.legenda-cor {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

/* ── Lista de cidades vizinhas ──────────────────── */
#mapa-cidades-vizinhas {
  text-align: center;
  font-size: 12px;
  color: #475569;
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.7;
  font-family: 'Inter', sans-serif;
  padding: 0 8px;
}

/* ── Tooltip ────────────────────────────────────── */
.mapa-tooltip-box {
  position: fixed;
  background: #1e293b;
  color: #f8fafc;
  font-size: 13px;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  padding: 8px 14px;
  border-radius: 8px;
  pointer-events: none;
  display: none;
  z-index: 9999;
  white-space: nowrap;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {

  .mapa-canvas-wrap {
    height: 340px; /* diminui um pouco (tava gigante) */
  }

  #mapa-container {
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  #mapa-container svg {
    transform: scale(1.7); /* 🔥 AQUI cresce o mapa de verdade */
  }

  #mapa-container text {
    font-size: 14px !important;
  }
}