/* SFMIX backbone weathermap — schematic dark chart, kin to network-map.css.
   The map IS the page: it fills the viewport under the sticky site header,
   and the legend/info float as bubbles over the dark field. */

.wm-page { width: 100%; }

#weathermap {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-height, 64px));
  min-height: 480px;
  background: #12324e; /* --nm-water: same night ground as the geographic map */
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
#weathermap.wm-error::after {
  content: attr(data-error-text);
  display: block;
  padding: 3rem 1rem;
  text-align: center;
  color: #dfe9ef;
}

/* The SVG letterboxes inside the viewport (preserveAspectRatio: meet) — the
   container background is the same field colour, so the box edge is
   invisible and the chart simply fills whatever space it gets. */
.wm-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none; /* the map owns drag/pinch (slippy pan/zoom) */
  cursor: grab;
}
.wm-svg:active { cursor: grabbing; }

.wm-metro {
  fill: rgba(223, 233, 239, 0.045);
  stroke: rgba(223, 233, 239, 0.14);
  stroke-dasharray: 3 4;
}
.wm-metro-label {
  fill: #8fb4c4;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 28px;
  letter-spacing: 0.5px;
}

.wm-strand { stroke-linecap: round; }
.wm-strand-down { stroke-dasharray: 5 5; }
.wm-strand-planned { stroke-dasharray: 3 5; }
.wm-chevron { pointer-events: none; opacity: 0; transition: opacity 0.6s, fill 0.6s; }
.wm-strand, .wm-chip rect { transition: stroke 0.6s, fill 0.6s; }

.wm-hit { stroke: transparent; cursor: pointer; }

.wm-node rect {
  fill: rgba(18, 30, 40, 0.92);
  stroke: rgba(204, 204, 220, 0.35);
  stroke-width: 1;
}
.wm-node circle {
  fill: rgba(18, 30, 40, 0.92);
  stroke: rgba(204, 204, 220, 0.5);
  stroke-width: 1.4;
}
.wm-node-label {
  fill: #dfe9ef;
  font-size: 15px;
  font-weight: 600;
  pointer-events: none;
}
.wm-node-junction .wm-node-label { font-size: 13px; opacity: 0.8; }

.wm-chip rect { stroke: rgba(8, 17, 24, 0.65); stroke-width: 1; }
.wm-chip text {
  fill: #0b1218;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.wm-tt-note { opacity: 0.8; font-style: italic; margin-top: 2px; }

/* --- floating bubbles, same visual language as the network map's ---------- */
#wm-info {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  max-width: 340px;
  background: rgba(16, 27, 36, 0.92);
  border: 1px solid rgba(204, 204, 220, 0.18);
  border-radius: 12px;
  color: #dfe9ef;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.wm-info-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: 0;
  color: inherit;
  font: 600 13px system-ui, sans-serif;
  cursor: pointer;
  text-align: left;
}
.wm-info-icon {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.4px solid #8fb4c4;
  color: #8fb4c4;
  font: italic 700 12px/16px Georgia, serif;
  text-align: center;
}
.wm-info-chevron {
  margin-left: auto;
  border: solid #8fb4c4;
  border-width: 0 2px 2px 0;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.2s;
}
#wm-info:not(.collapsed) .wm-info-chevron { transform: rotate(-135deg); }
.wm-info-body {
  padding: 0 14px 12px;
  font-size: 12.5px;
  line-height: 1.5;
}
.wm-info-body p { margin: 0 0 8px; }
#wm-info.collapsed .wm-info-body { display: none; }

.wm-info-back {
  display: block;
  margin: 0 0 8px;
  padding: 3px 10px;
  background: rgba(204, 204, 220, 0.1);
  border: 1px solid rgba(204, 204, 220, 0.2);
  border-radius: 7px;
  color: #8fb4c4;
  font: 600 11.5px system-ui, sans-serif;
  cursor: pointer;
}
.wm-info-back:hover { background: rgba(204, 204, 220, 0.18); }
.wm-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 3px 7px;
  border-radius: 5px;
}
/* zebra stripes so the eye can track a label to its far-side value */
.wm-info-detail-body .wm-row:nth-child(odd) { background: rgba(204, 204, 220, 0.07); }
.wm-row .k { opacity: 0.75; }
.wm-row .v { font-variant-numeric: tabular-nums; }

/* utilization as a filled bar: colour + length lead to the number */
.wm-util {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 7px 2px;
}
.wm-util-track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(8, 17, 24, 0.6);
  overflow: hidden;
}
.wm-util-fill { height: 100%; border-radius: 4px; transition: width 0.6s, background 0.6s; }
.wm-util span { font-variant-numeric: tabular-nums; font-weight: 600; }
.wm-members-h { margin: 8px 0 2px; font-weight: 600; opacity: 0.85; }
.wm-spark { margin: 8px 0 2px; }
.wm-spark svg {
  display: block;
  width: 100%;
  height: 54px;
  background: rgba(8, 17, 24, 0.55);
  border-radius: 6px;
}
.wm-spark-caption { margin-top: 3px; font-size: 11px; opacity: 0.8; }

#wm-zoom {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: rgba(16, 27, 36, 0.92);
  border: 1px solid rgba(204, 204, 220, 0.18);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
#wm-zoom button {
  width: 34px;
  height: 32px;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(204, 204, 220, 0.12);
  color: #dfe9ef;
  font: 600 17px/1 system-ui, sans-serif;
  cursor: pointer;
}
#wm-zoom button:last-child { border-bottom: 0; }
#wm-zoom button:hover { background: rgba(204, 204, 220, 0.12); }

#wm-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  background: rgba(16, 27, 36, 0.92);
  border: 1px solid rgba(204, 204, 220, 0.18);
  border-radius: 12px;
  color: #dfe9ef;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  padding: 10px 14px;
  font-size: 12px;
}
#wm-legend h4 { margin: 0 0 6px; font-size: 12px; }
.wm-ramp {
  width: 150px;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #5794F2, #73BF69 25%, #FADE2A 50%, #FF9830 75%, #F2495C);
}
.wm-ramp-labels {
  display: flex;
  justify-content: space-between;
  opacity: 0.75;
  margin: 2px 0 6px;
}
.wm-legend-key { margin: 3px 0; }
.wm-legend-key .swatch {
  display: inline-block;
  width: 22px;
  border-top: 3px dashed;
  vertical-align: middle;
  margin-right: 6px;
}
.wm-ts { margin-top: 6px; opacity: 0.75; font-variant-numeric: tabular-nums; }
