/* =====================================================================
   ACP v2 Partner Map — full-bleed US vector map.
   Branding adapted from the library-map-prototype: navy/teal palette,
   Poppins (display) + Mulish (body). Detail pane is an absolute overlay.
   ===================================================================== */
:root {
  --navy: #102a3f;
  --navy-2: #1c3a52;
  --teal: #2fa395;
  --teal-dk: #1f7d72;
  --steel: #336a8c;
  --paper: #f3f2f0;
  --paper-2: #ffffff;
  --ink: #243441;
  --muted: #5d6e7a;
  --line: #e2e0db;
  --land: #dfe6ea;
  --land-stroke: #bcccd6;
  --pane-w: 430px;
  --display: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --body: 'Mulish', 'Segoe UI', system-ui, sans-serif;
}
html, body.acp-map-body { margin: 0; height: 100%; }
body.acp-map-body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- Stage (fills the viewport below the site header) ---------- */
.stage { flex: 1; display: flex; min-height: 0; position: relative; box-sizing: border-box; }
.stage *, .stage *::before, .stage *::after { box-sizing: border-box; }
.map-wrap {
  flex: 1; min-width: 0; position: relative;
  display: flex; flex-direction: column;
  background: radial-gradient(1200px 700px at 50% 0%, #f8f7f5 0%, var(--paper) 55%);
}
.map-head { flex: none; z-index: 10; padding: 22px 30px 4px; }
.map-stage {
  flex: 1; min-height: 0; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.eyebrow {
  font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--teal-dk); margin: 0 0 6px;
}
.map-head h1 {
  font-family: var(--display); font-weight: 700; color: var(--navy);
  font-size: 30px; line-height: 1.05; margin: 0 0 8px;
}
.map-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 620px; line-height: 1.5; }

svg.usmap { width: 100%; height: 100%; display: block; }
.state { fill: var(--land); stroke: var(--land-stroke); stroke-width: .6; }
.state-border { fill: none; stroke: var(--paper); stroke-width: 1.1; }

/* ---------- Markers ---------- */
.marker { cursor: pointer; }
.marker .halo { fill: transparent; transition: opacity .2s; }
.marker .ring { fill: #fff; }
.marker .dot { transition: r .15s; }
.marker:hover .dot { r: 8.5; }
.marker:hover .halo { opacity: .18; }
.marker.active .ring { stroke: var(--navy); stroke-width: 2; }
.marker.active .pulse { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { r: 9; opacity: .5; } 100% { r: 26; opacity: 0; } }

/* Partners with new media pulse persistently in amber (overridden by .active). */
.marker.has-new-media .pulse { stroke: #f59e0b; animation: pulse 1.8s ease-out infinite; }

/* ---------- Tooltip ---------- */
.tip {
  position: absolute; pointer-events: none; z-index: 30;
  background: var(--navy); color: #fff; font-family: var(--display); font-weight: 500;
  font-size: 12.5px; padding: 6px 11px; border-radius: 8px; white-space: nowrap;
  transform: translate(-50%, -150%); opacity: 0; transition: opacity .12s;
  box-shadow: 0 8px 22px rgba(16, 42, 63, .28);
}
.tip::after {
  content: ""; position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--navy);
}
.tip .tt { font-size: 10.5px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; opacity: .7; }

/* ---------- Loading ---------- */
.loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-family: var(--display); font-weight: 500; gap: 12px; font-size: 14px;
}
.spinner {
  width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--teal);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Detail pane ----------
   A flex sibling that opens by taking width, so the map shrinks (and re-scales
   to stay fully visible) rather than being covered. */
.pane {
  flex: none; width: 0; overflow: hidden;
  background: var(--paper-2); border-left: 1px solid transparent;
  box-shadow: -14px 0 38px rgba(16, 42, 63, .10);
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}
.pane.open { width: var(--pane-w); border-left-color: var(--line); }
.pane-scroll { width: var(--pane-w); height: 100%; overflow-y: auto; padding: 0 0 30px; }
.pane-hero {
  padding: 24px 26px 22px; color: #fff; position: relative;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 70%, var(--steel) 140%);
}
.pane-close {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); border: 0; color: #fff; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center; transition: background .15s; line-height: 1;
}
.pane-close:hover { background: rgba(255, 255, 255, .28); }
.chip {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); font-weight: 600;
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
  margin-bottom: 14px; color: #fff;
}
.chip .cdot { width: 8px; height: 8px; border-radius: 50%; }
.pane-hero h2 { font-family: var(--display); font-weight: 700; font-size: 23px; line-height: 1.12; margin: 0 0 4px; }
.pane-hero .loc { font-size: 13.5px; color: rgba(255, 255, 255, .72); margin-bottom: 14px; }
.web {
  display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none;
  font-weight: 600; font-size: 13.5px; background: rgba(255, 255, 255, .12);
  padding: 8px 14px; border-radius: 9px; transition: background .15s;
}
.web:hover { background: rgba(255, 255, 255, .24); }
.web svg { width: 14px; height: 14px; }

.section { padding: 22px 26px 0; }
.section h3 {
  font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--teal-dk); margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.section h3::before { content: ""; width: 18px; height: 2.5px; border-radius: 2px; background: var(--teal); }
.purpose {
  font-size: 14.5px; line-height: 1.62; color: var(--ink); margin: 0;
  border-left: 3px solid var(--line); padding-left: 15px; font-style: italic;
}
.sched { list-style: none; margin: 0; padding: 0; }
.sched li { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.sched li:last-child { border-bottom: 0; }
.sched .when {
  flex: none; width: 104px; font-family: var(--display); font-weight: 600;
  font-size: 12.5px; color: var(--steel); line-height: 1.35;
}
.sched .topic { font-size: 13.5px; color: var(--ink); line-height: 1.4; }
.sched .loc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.muted-empty { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0; }

/* ---------- Empty hint ---------- */
.empty-hint {
  position: absolute; right: 24px; bottom: 24px; z-index: 10; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 16px; font-size: 13px; color: var(--muted);
  box-shadow: 0 6px 20px rgba(16, 42, 63, .07); display: none; align-items: center; gap: 9px;
}
.empty-hint.show { display: flex; }
.empty-hint b { color: var(--navy); font-weight: 600; }

@media (max-width: 860px) {
  .map-head h1 { font-size: 23px; }
  /* Not enough room to shrink the map — overlay the pane instead. */
  .pane { position: absolute; top: 0; right: 0; height: 100%; z-index: 50; }
  .pane.open { width: min(92vw, var(--pane-w)); }
  .pane-scroll { width: min(92vw, var(--pane-w)); }
}
