/* Taxon page distribution map (public/js/taxon-map.js) — BOS taxon page and
   SpiderNet species page. Colours fall back to plain values where a site
   doesn't define BOS's tokens (SpiderNet). */

/* Own stacking context: Leaflet's panes (z-index 400–1000) stay below a
   sticky site header. */
.taxon-map {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Shown briefly over the map on a plain scroll: zooming needs Ctrl/Cmd held,
   so the page keeps scrolling instead. */
.btt-map-wheel-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}
.btt-map-wheel-hint.visible {
  opacity: 1;
}

/* Legend (bottom right): always on white, so its text colour is explicit. */
.taxon-map-legend {
  background: #fff;
  color: #1a1a1a;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.8;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .3);
}

/* Pin popup: one row per specimen at that marker (usually one). Clickable
   where the page links rows to specimen cards (BOS). */
.map-popup-specimen {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 0;
}
.taxon-map-no-link .map-popup-specimen { cursor: default; }
.map-popup-specimen + .map-popup-specimen {
  border-top: 1px solid var(--border, #e2e2e2);
  margin-top: 4px;
}
.map-popup-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.map-popup-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-dark, #f0eee9);
  color: var(--stone, #77736b);
}
.map-popup-text { min-width: 0; }
.map-popup-locality { font-size: 13px; font-weight: 600; color: var(--text-primary, #1a1a1a); }
.map-popup-catalog {
  font-size: var(--fs-xs, 12px);
  font-weight: 600;
  color: var(--stone-dark, #5c5850);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.map-popup-specimen:hover .map-popup-locality { color: var(--navy, #1f3a5f); }
.taxon-map-no-link .map-popup-specimen:hover .map-popup-locality { color: var(--text-primary, #1a1a1a); }
