/* ITK Dev Design System — Leaflet theme (v1)
   Include AFTER the Leaflet base CSS. Themes controls, popups, and
   attribution with ITK tokens. Load leaflet-overlays.js for pin/heatmap
   helpers. */

.leaflet-container {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

/* Zoom + controls */
.leaflet-bar {
  border: 0;
  border-radius: var(--ds-radius-md, 6px);
  box-shadow: var(--ds-shadow-md, 0 2px 6px rgb(0 0 0 / 8%));
  overflow: hidden;
}

.leaflet-bar a,
.leaflet-bar a:hover {
  background: #fff;
  color: var(--ds-color-primary, #007ba6);
  border-bottom-color: var(--ds-border-subtle, #e9ecef);
}

.leaflet-bar a:hover {
  background: var(--ds-color-primary-soft, #e6f2f6);
}

/* Popups */
.leaflet-popup-content-wrapper {
  border-radius: var(--ds-radius-lg, 10px);
  box-shadow: var(--ds-shadow-lg, 0 8px 24px rgb(0 0 0 / 10%));
  padding: 0;
}

.leaflet-popup-content {
  margin: 12px 16px;
  line-height: 1.5;
  color: var(--ds-text-primary, #202423);
}

.leaflet-popup-content h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.leaflet-popup-tip { box-shadow: none; }

/* Attribution */
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ds-text-muted, #868e96);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: var(--ds-radius-sm, 3px);
}

.leaflet-control-attribution a { color: var(--ds-color-primary, #007ba6); }

/* DS pins — created by dsMakePin() in leaflet-overlays.js */
.ds-pin {
  width: 28px;
  height: 36px;
  position: relative;
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 25%));
}

.ds-pin-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  background: var(--ds-color-primary, #007ba6);
  transform: rotate(-45deg);
  border: 2px solid #fff;
}

.ds-pin-label {
  position: absolute;
  inset: 0 0 auto 0;
  margin-top: 4px;
  text-align: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 24px;
  pointer-events: none;
}

.ds-pin.ds-pin-accent .ds-pin-bubble { background: var(--ds-color-accent, #ee0043); }
.ds-pin.ds-pin-success .ds-pin-bubble { background: var(--ds-color-success, #008d3d); }
.ds-pin.ds-pin-warning .ds-pin-bubble { background: var(--ds-color-warning, #f5b800); }
.ds-pin.ds-pin-danger  .ds-pin-bubble { background: var(--ds-color-danger,  #e44930); }

/* Marker cluster theming — used when leaflet.markercluster is loaded */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(0, 123, 166, 0.25);
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: var(--ds-color-primary, #007ba6);
  color: #fff;
  font-weight: 600;
}
