/* govbr-mapa.css — aparência comum de todos os mapas do livro (gov.br DS) */
.govbr-mapa {
  text-align: left;
  font-family: Rawline, Raleway, sans-serif;
  color: #333333;
  margin: 8px 0 16px;
}
.govbr-mapa-barra-controles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: flex-end;
  margin-bottom: 8px;
}
.govbr-mapa-barra-controles:empty { display: none; }
.govbr-mapa-controle { display: flex; flex-direction: column; gap: 4px; }
.govbr-mapa-rotulo {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  padding: 0;
  margin: 0;
}
.govbr-mapa-select {
  font-family: inherit;
  font-size: 14px;
  color: #333333;
  height: 40px;
  min-width: 160px;
  padding: 0 32px 0 12px;
  border: 1px solid #888888;
  border-radius: 6px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231351b4' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
}
.govbr-mapa-select:hover { background-color: #dbe8fb; }
.govbr-mapa-select:focus-visible,
.govbr-mapa-opcao input:focus-visible {
  outline: 4px dashed #c2850c;
  outline-offset: 2px;
}
.govbr-mapa-grupo {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
  min-height: 40px;
}
.govbr-mapa-grupo > legend { width: 100%; margin-bottom: 4px; }
.govbr-mapa-opcao { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.govbr-mapa-opcao input { accent-color: #1351b4; width: 18px; height: 18px; margin: 0; }

/* Moldura única: largura da coluna, 4:3 (≈560 px no computador), até 75% da altura da tela */
.govbr-mapa-area {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  max-height: 75vh;
  min-height: 320px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  background: #f8f8f8;
  box-shadow: 0 1px 6px rgba(51, 51, 51, 0.16);
}
.govbr-mapa-status { font-size: 13px; color: #555555; margin-top: 6px; min-height: 18px; }
.govbr-mapa-status--erro { color: #e52207; }
.govbr-mapa-status--alerta { color: #c2850c; }
.govbr-mapa-status--sucesso { color: #168821; }

html body .govbr-mapa .leaflet-container, html body .govbr-mapa-base.leaflet-container { font-family: Rawline, Raleway, sans-serif; }
.govbr-mapa .leaflet-bar a { color: #1351b4; }
.govbr-mapa .leaflet-control-attribution { font-size: 11px; }

.govbr-mapa-legenda {
  background: #ffffff;
  color: #333333;
  padding: 8px 12px;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(51, 51, 51, 0.16);
  font-size: 13px;
  line-height: 1.35;
  max-width: 240px;
  max-height: 60vh;
  overflow-y: auto;
}
.govbr-mapa-legenda__titulo { font-weight: 600; color: #071d41; margin-bottom: 6px; }
.govbr-mapa-legenda__subtitulo { font-weight: 600; color: #555555; margin: 8px 0 4px; font-size: 12px; }
.govbr-mapa-legenda__item { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.govbr-mapa-legenda__ponto {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  border: 1.5px solid #ffffff; box-shadow: 0 0 0 1px #cccccc;
}
.govbr-mapa-legenda__gradiente { height: 12px; border-radius: 2px; border: 1px solid #cccccc; margin: 4px 0 2px; }
.govbr-mapa-legenda__rotulos { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #555555; margin-bottom: 4px; }

.govbr-mapa-popup { font-size: 13px; color: #333333; }
.govbr-mapa-popup__titulo { font-weight: 600; color: #071d41; font-size: 14px; margin-bottom: 4px; }
.govbr-mapa-popup table { border-collapse: collapse; }
.govbr-mapa-popup th { text-align: left; font-weight: 600; color: #555555; padding: 2px 12px 2px 0; vertical-align: top; white-space: nowrap; }
.govbr-mapa-popup td { padding: 2px 0; }
.govbr-mapa-popup__extra { margin-top: 6px; padding-top: 6px; border-top: 1px solid #e6e6e6; }
.govbr-mapa-barra { display: inline-block; width: 120px; height: 10px; border: 1px solid #cccccc; vertical-align: middle; background: #ffffff; }
.govbr-mapa-barra > span { display: block; height: 100%; }
.govbr-mapa-icone { background: none; border: 0; }

@media (max-width: 576px) {
  .govbr-mapa-area { aspect-ratio: 1 / 1; }
  .govbr-mapa-barra-controles { gap: 8px 16px; }
  .govbr-mapa-select { min-width: 0; width: 100%; }
  .govbr-mapa-controle { flex: 1 1 140px; }
}
