/* =========================================================
   RCMA Valet - /service-area/ (2026-09-25)
   The map is inline SVG made once from public-domain Census county boundaries
   (scripts/serviceAreaMap). No tiles, no third-party requests. Pins are HTML links
   laid over the SVG so their labels stay a real 12.5px at every size.
   Phones first: below 920px of card width the map keeps its size and scrolls
   sideways inside the card (with "Greater Cleveland" / "Lakeshore" jump chips);
   wider cards show the whole map.
   ========================================================= */

.sa-card h2 { margin-bottom: 10px; }
.glass-card .sa-lede { color: #d9e6f5; margin-bottom: 0; }

/* ---------- Map frame ---------- */
.sa-map { position: relative; margin-top: 14px; }

.sa-map__viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border: 1px solid rgba(102, 179, 255, 0.28);
  border-radius: 12px;
  background: radial-gradient(120% 95% at 60% 0%, #103362 0%, #0a2246 45%, #061530 100%);
  box-shadow: inset 0 0 60px rgba(102, 179, 255, 0.08);
}
.sa-map__viewport::-webkit-scrollbar { display: none; }

.sa-map__stage {
  position: relative;
  width: max(100%, var(--sa-min-stage, 920px));
  aspect-ratio: var(--sa-aspect, 1000 / 566.5);
}

.sa-map__svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.sa-land { fill: #070e1a; }

.sa-county {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 0.8px;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

/* The glow is two stacked strokes, not an SVG blur filter (cheaper on iPhones, where
   the page already blurs glass cards over a fixed photo). */
.sa-shore-glow,
.sa-shore {
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.sa-shore-glow { stroke: rgba(102, 179, 255, 0.2); stroke-width: 7px; }
.sa-shore { stroke: #66b3ff; stroke-width: 1.3px; }

.sa-lake {
  fill: rgba(176, 215, 255, 0.34);
  font: 600 16px/1 var(--font-heading), system-ui, sans-serif;
  letter-spacing: 0.35em;
}

.sa-county-name {
  fill: rgba(255, 255, 255, 0.2);
  font: 600 12px/1 var(--font-body), system-ui, sans-serif;
  letter-spacing: 0.2em;
}

/* ---------- Pins ---------- */
.sa-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: 0;
  height: 0;
  color: #eaf4ff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.sa-pin--venue {
  left: calc(var(--x) + var(--dx, 0px));
  top: calc(var(--y) + var(--dy, 0px));
  z-index: 3;
}
.sa-pin.is-selected,
.sa-pin.is-lit { z-index: 4; }

/* A bigger invisible target around the dot for mouse and trackpad. */
.sa-pin::before {
  content: "";
  position: absolute;
  left: -12px;
  top: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.sa-pin__dot {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #66b3ff;
  box-shadow: 0 0 0 3px rgba(102, 179, 255, 0.25), 0 0 14px 4px rgba(102, 179, 255, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sa-pin__label {
  position: absolute;
  white-space: nowrap;
  font: 600 12.5px/16px var(--font-body), system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #eaf4ff;
  text-shadow: 0 0 6px rgba(3, 8, 18, 0.9), 0 1px 2px #000;
}

/* Label sides are chosen by the build (no label covers another label or pin). */
.sa-pin[data-label="e"] .sa-pin__label { left: 10px; top: 0; transform: translateY(-50%); }
.sa-pin[data-label="w"] .sa-pin__label { right: 10px; top: 0; transform: translateY(-50%); }
.sa-pin[data-label="n"] .sa-pin__label { left: 0; bottom: 9px; transform: translateX(-50%); }
.sa-pin[data-label="s"] .sa-pin__label { left: 0; top: 9px; transform: translateX(-50%); }
.sa-pin[data-label="ne"] .sa-pin__label { left: 6px; bottom: 6px; }
.sa-pin[data-label="se"] .sa-pin__label { left: 6px; top: 6px; }
.sa-pin[data-label="nw"] .sa-pin__label { right: 6px; bottom: 6px; }
.sa-pin[data-label="sw"] .sa-pin__label { right: 6px; top: 6px; }

/* Also served: a hollow ring, no page of its own. */
.sa-pin--also .sa-pin__dot {
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  background: rgba(3, 8, 18, 0.6);
  border: 1.5px solid rgba(176, 215, 255, 0.85);
  box-shadow: none;
}
.sa-pin--also .sa-pin__label {
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  color: rgba(234, 244, 255, 0.8);
}

/* Our base: the only pin that pulses. */
.sa-pin--base .sa-pin__dot {
  left: -7px;
  top: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 3px solid #66b3ff;
  box-shadow: 0 0 16px 4px rgba(102, 179, 255, 0.6);
}
.sa-pin--base .sa-pin__label { font-size: 11.5px; line-height: 15px; color: #fff; }
.sa-pin--base::after {
  content: "";
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(102, 179, 255, 0.8);
  pointer-events: none;
  animation: saPulse 2.8s ease-out infinite;
}
@keyframes saPulse {
  from { transform: scale(0.6); opacity: 0.9; }
  to { transform: scale(2.3); opacity: 0; }
}
/* 2026-09-25 (review fix): Reduce Motion stops the pulse; the ring stays as a still outline.
   The site-wide rule in landing.css (*{animation:none!important}) does not reach ::after. */
@media (prefers-reduced-motion: reduce) {
  .sa-pin--base::after { animation: none; }
}

/* Venues: small diamonds next to their town; the name shows on hover or when picked. */
.sa-pin--venue::before { left: -9px; top: -9px; width: 18px; height: 18px; }
.sa-pin--venue .sa-pin__dot {
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 1.5px;
  background: #b0d7ff;
  box-shadow: 0 0 10px 2px rgba(176, 215, 255, 0.45);
  transform: rotate(45deg);
}
.sa-pin--venue .sa-pin__label {
  left: 10px;
  top: 0;
  transform: translateY(-50%);
  padding: 3px 9px;
  border-radius: 8px;
  border: 1px solid rgba(176, 215, 255, 0.3);
  background: rgba(3, 8, 18, 0.85);
  font-size: 12px;
  line-height: 16px;
  text-shadow: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s;
}

.sa-pin.is-lit .sa-pin__dot,
.sa-pin.is-selected .sa-pin__dot {
  transform: scale(1.35);
  box-shadow: 0 0 0 4px rgba(102, 179, 255, 0.35), 0 0 20px 6px rgba(102, 179, 255, 0.75);
}
.sa-pin--venue.is-lit .sa-pin__dot,
.sa-pin--venue.is-selected .sa-pin__dot { transform: rotate(45deg) scale(1.35); }
.sa-pin--venue.is-lit .sa-pin__label,
.sa-pin--venue.is-selected .sa-pin__label { opacity: 1; visibility: visible; }
.sa-pin.is-selected .sa-pin__label { color: #fff; }

@media (hover: hover) {
  .sa-pin:hover { z-index: 4; }
  .sa-pin:hover .sa-pin__dot { transform: scale(1.35); }
  .sa-pin--venue:hover .sa-pin__dot { transform: rotate(45deg) scale(1.35); }
  .sa-pin--venue:hover .sa-pin__label { opacity: 1; visibility: visible; }
}

/* Touch screens: pins do not take taps themselves; the map picks the nearest pin and
   shows its links in the callout (service-area.js adds .is-ready). Without JavaScript the
   pins stay ordinary links. */
@media (pointer: coarse) {
  .sa-map.is-ready .sa-pin { pointer-events: none; }
}

/* ---------- View chips (only when the map scrolls) ---------- */
.sa-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.sa-chips[hidden] { display: none; }
.sa-chip {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(102, 179, 255, 0.08);
  color: var(--gold);
  font: 700 0.92rem/1 var(--font-body), system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.sa-chip[aria-pressed="true"] {
  background: var(--gold);
  border-color: transparent;
  color: #03111e;
}

/* ---------- Callout (the picked place, pinned to the bottom of the map) ---------- */
.sa-callout {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  max-width: 440px;
  margin-inline: auto;
  padding: 14px 52px 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(3, 8, 18, 0.8);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.sa-callout[hidden] { display: none; }
.sa-card .sa-callout p { margin: 0; }
.sa-card .sa-callout .sa-callout__kind {
  color: var(--gold-2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sa-card .sa-callout .sa-callout__name {
  color: #fff;
  font: 700 1.05rem/1.3 var(--font-heading), system-ui, sans-serif;
}
.sa-card .sa-callout .sa-callout__blurb {
  margin-top: 4px;
  color: #d9e6f5;
  font-size: 0.9rem;
  line-height: 1.45;
}
.sa-callout__links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin-top: 8px;
}
.sa-card .sa-callout__links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.93rem;
  text-decoration: none;
}
.sa-callout__close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Key and note ---------- */
.glass-card ul.sa-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 14px 0 0;
}
.glass-card ul.sa-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: #d9e6f5;
  font-size: 0.9rem;
}
.glass-card ul.sa-legend li::before { content: none; }
.sa-key { position: relative; display: inline-block; width: 14px; height: 14px; }
.sa-key::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.sa-key--city::after { width: 10px; height: 10px; border-radius: 50%; background: #66b3ff; box-shadow: 0 0 8px rgba(102, 179, 255, 0.7); }
.sa-key--venue::after { width: 8px; height: 8px; border-radius: 1.5px; background: #b0d7ff; transform: translate(-50%, -50%) rotate(45deg); }
.sa-key--base::after { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid #66b3ff; box-sizing: border-box; }
.sa-key--also::after { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid rgba(176, 215, 255, 0.85); box-sizing: border-box; }
.glass-card .sa-note { margin-top: 10px; color: #9fb3c8; font-size: 0.84rem; line-height: 1.5; }

/* ---------- The list (same places as the map) ---------- */
.sa-regions { display: grid; gap: 24px; margin-top: 4px; }
@media (min-width: 1100px) {
  .sa-regions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 44px; }
}
.sa-region h3 {
  margin: 0 0 4px;
  color: var(--gold-2);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.glass-card ul.sa-list,
.glass-card ul.sa-venues { margin: 0; }
.glass-card ul.sa-list li { padding: 10px 0 10px 24px; line-height: 1.5; }
.glass-card ul.sa-list > li { min-height: 44px; border-top: 1px solid rgba(102, 179, 255, 0.14); }
.glass-card ul.sa-venues { margin-top: 2px; }
.glass-card ul.sa-venues li { padding: 6px 0 6px 22px; }
.glass-card ul.sa-list li::before {
  content: "";
  left: 5px;
  top: 17px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #66b3ff;
  box-shadow: 0 0 10px rgba(102, 179, 255, 0.6);
}
.glass-card ul.sa-venues li::before { top: 13px; }
.glass-card ul.sa-list .sa-item--venue::before {
  left: 6px;
  width: 8px;
  height: 8px;
  border-radius: 1.5px;
  background: #b0d7ff;
  box-shadow: none;
  transform: rotate(45deg);
}
.glass-card ul.sa-list .sa-item--also::before {
  width: 9px;
  height: 9px;
  background: transparent;
  border: 1.5px solid rgba(176, 215, 255, 0.85);
  box-shadow: none;
}
.glass-card ul.sa-list .sa-item--base::before {
  width: 12px;
  height: 12px;
  left: 4px;
  top: 16px;
  background: #fff;
  border: 3px solid #66b3ff;
  box-sizing: border-box;
}
.sa-item > a,
.sa-item > .sa-item__name { font-weight: 700; }
.sa-item > .sa-item__name { color: #fff; }
.sa-item__tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border: 1px solid rgba(176, 215, 255, 0.28);
  border-radius: 999px;
  color: var(--gold-2);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  line-height: 1.6;
  vertical-align: 1px;
}
.sa-item__blurb { display: block; color: #cfdced; font-size: 0.92rem; line-height: 1.5; }
.sa-item.is-lit > a,
.sa-item.is-lit > .sa-item__name { color: #fff; }

/* ---------- Phones ---------- */
@media (max-width: 768px) {
  /* The map runs to the card's edges, like a photo. */
  .sa-map,
  .sa-chips { margin-left: -20px; margin-right: -20px; }
  .sa-chips { padding-inline: 20px; }
  .sa-map__viewport { border-radius: 0; border-left: 0; border-right: 0; }
  /* 2026-09-25 (review fix): service-area.js scrolls an opened callout into view; these
     margins keep it clear of the 68px navbar and of the bottom bar (56px, or 50px plus the
     iPhone's safe area; landing.css .sticky-cta), with a few px to spare. */
  .sa-callout {
    scroll-margin-top: 76px;
    scroll-margin-bottom: max(66px, calc(60px + env(safe-area-inset-bottom, 0px)));
  }
}

/* ---------- Windows high contrast ---------- */
@media (forced-colors: active) {
  .sa-land { fill: Canvas; }
  .sa-shore { stroke: CanvasText; }
  .sa-shore-glow { display: none; }
  .sa-county { stroke: GrayText; }
  .sa-pin__dot { forced-color-adjust: none; background: LinkText; border-color: LinkText; }
}
