/* ============================================================
 * RealMap — Leaflet container + analytics overlays
 * ============================================================ */
.rm {
  position: absolute;
  inset: 0;
  background: var(--bg-surface);
  overflow: hidden;
}
.rm__canvas {
  position: absolute;
  inset: 0;
  background: var(--bg-surface-muted);
}
/* Sticky nav has z-index: 40. Leaflet's container declares stacking
   contexts well above that (panes go 200–700, controls 800–1000), so
   when the user scrolls the map can punch through the nav. Cap the
   Leaflet container to z-index: 0 within its frame and constrain its
   internal stacking so nothing escapes. */
.wf4__frame { position: relative; z-index: 0; }
.rm, .rm__canvas { z-index: 0; }
.rm .leaflet-container { z-index: 0 !important; isolation: isolate; }
.rm .leaflet-pane,
.rm .leaflet-top,
.rm .leaflet-bottom,
.rm .leaflet-control { z-index: auto !important; }

/* ---------- Insured asset marker ---------- */
.rm-asset {
  position: relative;
}
.rm-asset__box {
  display: block;
  width: 10px; height: 10px;
  border-radius: 2px;
  border: 1.4px solid var(--accent-strong);
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6);
}
.rm-asset__code {
  position: absolute;
  left: 14px; top: -3px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
  white-space: nowrap;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.9);
}

/* ---------- Delta pin ---------- */
.rm-delta {
  position: relative;
  width: 18px; height: 18px;
}
.rm-delta__halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(8, 145, 178, 0.20);
  animation: rm-delta-pulse 2.4s ease-out infinite;
}
@keyframes rm-delta-pulse {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}
.rm-delta__dot {
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 0 2px #FFFFFF;
}
.rm-delta__label {
  position: absolute;
  left: 22px; top: 2px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
  padding: 2px 7px;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--border));
  box-shadow: 0 1px 0 rgba(11, 18, 32, 0.04);
}

/* ---------- Analytics panel (sits BELOW the Bridge, on the LEFT) ---------- */
.rm__panel {
  position: absolute;
  top: 70px;
  left: 14px;
  z-index: 500;
  width: 220px;
  background: color-mix(in oklab, #FFFFFF 92%, transparent);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-floating);
}
.rm__panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.rm__panel-title {
  font-size: 11.5px;
  font-weight: 620;
  color: var(--fg-1);
  letter-spacing: -0.005em;
}
.rm__panel-time {
  font-size: 9.5px;
  color: var(--fg-3);
}
.rm__panel-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11.5px;
}
.rm__panel-k { color: var(--fg-2); }
.rm__panel-v {
  color: var(--fg-1);
  font-weight: 590;
  font-variant-numeric: tabular-nums;
}
.rm__panel-d {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--caution-amber);
  margin-left: 4px;
  font-weight: 500;
}
.rm__panel-meter {
  display: flex;
  gap: 3px;
  margin-top: 6px;
  height: 4px;
}
.rm__panel-meter span {
  flex: 1;
  border-radius: 2px;
  background: var(--accent);
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--border));
}
.rm__panel-meter span.off {
  background: var(--bg-surface-muted);
  border-color: var(--border);
}

/* ---------- Coordinates + attribution ---------- */
.rm__coords {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 500;
  font-size: 10.5px;
  color: var(--fg-2);
  padding: 4px 10px;
  border-radius: 9999px;
  background: color-mix(in oklab, #FFFFFF 88%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  letter-spacing: 0.02em;
}
.rm__attrib {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 500;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Map Copilot peek — shorter, anchored bottom-right ---------- */
.rm__copilot {
  position: absolute;
  right: 14px;
  bottom: 50px;
  z-index: 600;
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: calc(100% - 32px);
  padding: 6px 6px 6px 12px;
  background: color-mix(in oklab, #FFFFFF 92%, transparent);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border: 1px solid var(--border);
  border-radius: 9999px;
  box-shadow: var(--shadow-floating);
}
.rm__copilot-plus {
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
}
.rm__copilot-text {
  font-size: 12px;
  color: var(--fg-1);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.rm__copilot-send {
  width: 26px; height: 26px;
  border-radius: 9999px;
  border: 0;
  background: var(--primary);
  color: var(--primary-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ============================================================
 * Bridge pill — sits at the top-center over the map.
 * Visually matches the real <Bridge> component but lives as
 * a static marketing display (no measurement / no animation).
 * ============================================================ */
.wf4__bridge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  height: 42px;
  background: color-mix(in oklab, #FFFFFF 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(11, 18, 32, 0.06);
}
.wf4__bridge-tab {
  height: 32px;
  padding: 0 14px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 590;
  color: var(--fg-2);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.wf4__bridge-tab.is-active {
  background: var(--primary);
  color: var(--primary-fg);
}
.wf4__bridge-tab svg { display: inline-block; }
