/* SGA Walkthrough — self-hosted guided-tour + demo engine.
   Light/white only. SGA navy/gold. Zero external deps.
   Palette mirrors sga-scorecard: navy #0f2742, gold #c8a45c, ink #16202c. */

.sgt-root {
  --sgt-navy: #0f2742;
  --sgt-sga: #1b365d;
  --sgt-gold: #c8a45c;
  --sgt-ink: #16202c;
  --sgt-card: #ffffff;
  --sgt-line: #e6eaef;
  --sgt-muted: #6b7280;
  --sgt-scrim: rgba(15, 39, 66, 0.58);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---- Backdrop + spotlight cutout ---- */
.sgt-spotlight {
  position: fixed;
  z-index: 2147483600;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px var(--sgt-scrim);
  pointer-events: none;
  transition: all 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  outline: 2px solid var(--sgt-gold);
  outline-offset: 2px;
}
.sgt-spotlight.sgt-centered {
  /* no element to highlight: dim whole screen, popover centered */
  box-shadow: 0 0 0 9999px var(--sgt-scrim);
  outline: none;
  width: 0;
  height: 0;
}
/* Click-blocking backdrop that sits under the spotlight so outside clicks
   are swallowed (the spotlight itself has pointer-events:none so the
   highlighted element stays clickable in interactive tours). */
.sgt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483590;
  background: transparent;
  pointer-events: auto;
  cursor: default;
}

/* ---- Popover card ---- */
.sgt-pop {
  position: fixed;
  z-index: 2147483610;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--sgt-card);
  color: var(--sgt-ink);
  border: 1px solid var(--sgt-line);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 39, 66, 0.22), 0 2px 8px rgba(15, 39, 66, 0.08);
  padding: 18px 18px 14px;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease, left 0.3s ease, top 0.3s ease;
}
.sgt-pop.sgt-show { opacity: 1; transform: translateY(0) scale(1); }

.sgt-pop__badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sgt-gold);
  background: #fbf4e3;
  border: 1px solid #efe1bf;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.sgt-pop__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 6px;
  color: var(--sgt-navy);
  padding-right: 22px;
}
.sgt-pop__body {
  font-size: 13.5px;
  line-height: 1.55;
  color: #334155;
  margin: 0 0 14px;
}
.sgt-pop__body strong { color: var(--sgt-ink); }

.sgt-pop__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sgt-dots { display: flex; gap: 6px; align-items: center; }
.sgt-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sgt-line);
  transition: background 0.2s, transform 0.2s;
}
.sgt-dot.sgt-dot--on { background: var(--sgt-gold); transform: scale(1.25); }
.sgt-count { font-size: 11.5px; color: var(--sgt-muted); font-variant-numeric: tabular-nums; }

.sgt-btns { display: flex; gap: 8px; }
.sgt-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid var(--sgt-line);
  background: #fff;
  color: var(--sgt-navy);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.sgt-btn:hover { background: #f4f6f8; }
.sgt-btn:active { transform: translateY(1px); }
.sgt-btn--primary {
  background: var(--sgt-navy);
  border-color: var(--sgt-navy);
  color: #fff;
}
.sgt-btn--primary:hover { background: var(--sgt-sga); }

.sgt-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 24px; height: 24px;
  border: none; background: transparent;
  color: var(--sgt-muted);
  font-size: 18px; line-height: 1;
  cursor: pointer; border-radius: 6px;
}
.sgt-close:hover { background: #f0f2f5; color: var(--sgt-ink); }

/* arrow pointing from popover toward the spotlight */
.sgt-arrow {
  position: absolute;
  width: 12px; height: 12px;
  background: var(--sgt-card);
  border: 1px solid var(--sgt-line);
  transform: rotate(45deg);
}

/* ---- Floating launcher + What's New pill ---- */
.sgt-launcher {
  position: fixed;
  z-index: 2147483500;
  bottom: 22px; right: 22px;
  display: flex; align-items: center; gap: 8px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13.5px; font-weight: 600;
  color: #fff;
  background: var(--sgt-navy);
  border: 1px solid var(--sgt-sga);
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(15, 39, 66, 0.28);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}
.sgt-launcher:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(15, 39, 66, 0.34); background: var(--sgt-sga); }
.sgt-launcher__icon { font-size: 15px; }
.sgt-launcher__new {
  display: none;
  background: var(--sgt-gold);
  color: var(--sgt-navy);
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 999px;
}
.sgt-launcher.sgt-has-new .sgt-launcher__new { display: inline-block; }

/* ---- Demo-mode synthetic cursor ---- */
.sgt-cursor {
  position: fixed;
  z-index: 2147483620;
  width: 26px; height: 26px;
  margin: -2px 0 0 -2px;
  pointer-events: none;
  transition: transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.sgt-cursor svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.sgt-cursor.sgt-click::after {
  content: "";
  position: absolute;
  left: 2px; top: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--sgt-gold);
  animation: sgt-ping 0.5s ease-out;
}
@keyframes sgt-ping {
  0% { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* demo control chip (replay / pause) */
.sgt-demobar {
  position: fixed;
  z-index: 2147483520;
  bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 1px solid var(--sgt-line);
  border-radius: 999px;
  padding: 7px 8px 7px 16px;
  box-shadow: 0 8px 22px rgba(15, 39, 66, 0.18);
  font-family: Inter, system-ui, sans-serif; font-size: 12.5px; color: var(--sgt-muted);
}
.sgt-demobar__label { font-weight: 600; color: var(--sgt-navy); }
.sgt-demobar__btn {
  border: none; background: var(--sgt-navy); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 6px 14px; border-radius: 999px;
}
.sgt-demobar__btn:hover { background: var(--sgt-sga); }

@media (max-width: 520px) {
  .sgt-pop { width: calc(100vw - 24px); }
  .sgt-launcher { bottom: 16px; right: 16px; padding: 9px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .sgt-spotlight, .sgt-pop, .sgt-cursor { transition: none; }
}
