/* Maps shared by the dashboard (pages/playground.php) and the state health profiles (pages/health-profile.php):
   the key under a map (js/map-key.js) and the county outlines (js/county-map.js). Colours of data come from the
   page's palette (CHART_RAMP, CHART_INK); the county map gets the theme's through --cm-* (CountyMap.draw 'ink'). */

/* The key: the unit, then a swatch and the range of each colour step, then "No data" */
.map-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 10px; font-size: .8rem; color: var(--text-muted); }
.map-key span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.map-key i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.map-key .map-key-none { background: var(--cm-none, #E3E8EF); }
.map-key .map-key-unit { margin-right: 2px; font-weight: 600; color: var(--text); }
html[data-theme="dark"] .map-key .map-key-none { background: var(--cm-none, #26385A); }

/* County outlines: counties filled by the page, state lines on top */
.cm-svg { display: block; width: 100%; height: 100%; }
.cm-counties path { stroke: var(--cm-edge, #FFFFFF); stroke-width: .35; vector-effect: non-scaling-stroke; cursor: pointer; }
.cm-counties path.cm-none { fill: var(--cm-none, #E3E8EF); cursor: default; }
.cm-counties path:hover { stroke: var(--text); stroke-width: 1.2; }
.cm-counties path.cm-on { stroke: var(--text); stroke-width: 1.8; }
.cm-states path { fill: none; stroke: var(--cm-edge, #FFFFFF); stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
html[data-theme="dark"] .cm-counties path.cm-none { fill: var(--cm-none, #26385A); }
.cm-tip { position: absolute; z-index: 5; max-width: 280px; padding: 6px 10px; border-radius: 8px; pointer-events: none;
  background: var(--cm-tip, #0B1F3A); color: #FFFFFF; font-size: .82rem; line-height: 1.35; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.cm-tip[hidden] { display: none; }
