/* Mapa geral e trilha (#30) — estética 4b (sage), tokens --sig-*.
 * Arquivo próprio da feature (incluído pelo stylesheet_link_tag :app).
 * Cores de status (AD-018/AD-037): vermelho/verde/amarelo/cinza. */

:root {
  --map-red: #e6531f;
  --map-green: #8bc34a;
  --map-yellow: #d9a520;
  --map-gray: #9aa39a;
}

/* Container do mapa — altura própria; o Leaflet exige tamanho explícito. */
.map-canvas,
.trail-canvas {
  height: 60vh;
  min-height: 360px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--sig-surface);
}

.map-count {
  margin-left: auto;
  align-self: center;
}

.map-empty {
  text-align: center;
  padding: 32px 16px;
}

.map-empty .sig-settings-hint {
  max-width: 52ch;
  margin: 8px auto 0;
}

.map-attribution {
  margin: 6px 2px 0;
  font-size: 12px;
  color: var(--sig-text-soft, #6b746b);
}

.map-attribution a {
  color: inherit;
  text-decoration: underline;
}

/* Aviso de tiles indisponíveis (degradação graciosa — MAP edge). */
.map-tile-warning {
  margin: 6px 2px 0;
  font-size: 12px;
  color: var(--map-yellow);
}

/* Marcadores por status via L.divIcon (sem PNG externo — AD-022).
   FIX-02: o <span> do divIcon é inline por padrão — sem display o tamanho é
   ignorado e o marker vira um filete invisível ao desfazer o cluster. */
.map-marker {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--sig-card, #fff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.map-marker--red { background: var(--map-red); }
.map-marker--green { background: var(--map-green); }
.map-marker--yellow { background: var(--map-yellow); }
.map-marker--gray { background: var(--map-gray); }

/* Clusters coloridos pela pior cor do conjunto (MAP-03). */
.map-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--sig-card, #fff);
  font-weight: 700;
  font-size: 13px;
  border: 2px solid var(--sig-card, #fff);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.map-cluster--red { background: var(--map-red); }
.map-cluster--green { background: var(--map-green); }
.map-cluster--yellow { background: var(--map-yellow); }
.map-cluster--gray { background: var(--map-gray); }

/* Popup do marcador (MAP-04). */
.map-popup-name { font-weight: 700; }
.map-popup-meta { margin: 2px 0 0; font-size: 12px; color: var(--sig-text-soft, #6b746b); }
.map-popup-link { display: inline-block; margin-top: 6px; }

/* Player da trilha (T9/T10). */
.trail-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.trail-slider { flex: 1 1 200px; }
