/* Shared results map (Leaflet, self-hosted). With a configured key the basemap
 * arrives through the same-origin tile proxy (MAPS_AND_GEOSPATIAL_STRATEGY §7);
 * without one it falls back to the original schematic grid + state boundaries
 * (Option A), so nothing here assumes tiles exist. */
.map-canvas {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(15, 42, 74, 0.04) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(15, 42, 74, 0.04) 0 1px, transparent 1px 40px),
    #e9eef4;
  z-index: 0;
}
.leaflet-container { background: transparent; font: inherit; }
.map-boundary { fill: rgba(31, 111, 235, 0.05); stroke: rgba(31, 111, 235, 0.35); stroke-width: 1; }

/* Numbered badge markers: a circle centred on the true point (no teardrop tip
 * to misplace) -- white/blue for organic, orange star for sponsored. */
.map-pin-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #1e88e5;
  color: #0b2a4a;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(11, 42, 74, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.map-pin-icon span { font-size: 0.78rem; line-height: 1; }
.map-pin-icon:hover,
.map-pin-icon.is-active { transform: scale(1.18); background: #1e88e5; color: #fff; }
.map-pin-icon.is-sponsored { background: #f97316; border-color: #fff; color: #fff; }
.map-pin-icon.is-sponsored:hover,
.map-pin-icon.is-sponsored.is-active { background: #ea580c; }

.map-result-mini.is-active { background: rgba(31, 111, 235, 0.08); }

/* AC5 marker preview popup -- real data only, styled like the site's cards. */
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: 0 14px 38px rgba(11, 42, 74, 0.22); }
.leaflet-popup-content { margin: 12px 14px; font: inherit; }
.map-marker-preview { display: flex; flex-direction: column; gap: 4px; min-width: 190px; }
.map-marker-preview strong { font-size: 0.94rem; color: #0b2a4a; }
.map-marker-meta { font-size: 0.8rem; color: var(--slate, #5b6b7c); }
.map-marker-preview .btn { margin-top: 6px; align-self: flex-start; }
.leaflet-container a.leaflet-popup-close-button { top: 6px; right: 8px; }

/* Basemap attribution (legally required with tiles): small and out of the way. */
.leaflet-control-attribution {
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 8px 0 0 0;
  color: #5b6b7c;
}

/* Leaflet's own zoom control (only shown on maps without the panel buttons). */
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow-sm, 0 2px 8px rgba(11, 42, 74, 0.12)) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-control-zoom a { color: #0b2a4a !important; }
