/*
 * propagation-map.css — styles for the DNS propagation world map (item 41).
 *
 * Loaded only on the DNS Propagation Checker page via the tool bootstrap's
 * additional_css. Uses design-system tokens (with safe fallbacks) so the map
 * chrome inherits the dark-mode token remap automatically.
 */

/* Map canvas. Leaflet renders nothing at height:0, so an explicit height is
   mandatory. */
.propagation-map {
  flex: 1;
  min-width: 0;
  height: 420px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-gray-100, #f1f3f5);
  border: 1px solid var(--color-gray-200, #e9ecef);
}

/* Keep Leaflet's own panes/controls below the site header/nav and any overlays. */
.propagation-map .leaflet-pane,
.propagation-map .leaflet-top,
.propagation-map .leaflet-bottom {
  z-index: 400;
}

/* No-JS / load-failure message inside the map container. */
.propagation-map .map-noscript,
.map-noscript {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  color: var(--color-text-muted, #495057);
  font-size: 0.95rem;
}

/* Popup content. */
.propagation-map-popup {
  font-size: 0.9rem;
  line-height: 1.5;
  min-width: 180px;
}
.propagation-map-popup strong {
  font-size: 0.98rem;
}
.propagation-map-popup .pm-place {
  color: var(--color-text-muted, #6c757d);
  font-size: 0.82rem;
}
.propagation-map-popup .pm-answer {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.82rem;
  word-break: break-all;
  color: var(--color-text, #212529);
}
.propagation-map-popup .pm-rtt {
  color: var(--color-text-muted, #6c757d);
  font-size: 0.8rem;
}
.propagation-map-popup .pm-status {
  display: inline-block;
  font-weight: 600;
  font-size: 0.8rem;
}
.propagation-map-popup .pm-success { color: #1e7e34; }
.propagation-map-popup .pm-mismatch { color: #c79100; }
.propagation-map-popup .pm-error { color: #a71d2a; }

/* Hint + live counts under the legend. */
.map-hint {
  margin: 0.75rem 0 0.5rem;
  font-size: 0.82rem;
  color: var(--color-text-muted, #6c757d);
  line-height: 1.45;
}
.map-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.map-counts .pm-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.map-counts .pm-count::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  display: inline-block;
}
.map-counts .pm-success { color: #1e7e34; }
.map-counts .pm-success::before { background: #28a745; }
.map-counts .pm-mismatch { color: #c79100; }
.map-counts .pm-mismatch::before { background: #ffc107; }
.map-counts .pm-error { color: #a71d2a; }
.map-counts .pm-error::before { background: #dc3545; }

@media (max-width: 768px) {
  .propagation-map {
    height: 300px;
  }
}
