/* ============================================================
   TOUR.CSS — guided product tour (coach-marks / spotlight)
   Dependency-free; uses existing design tokens with fallbacks.
   ============================================================ */

.tour-root {
  position: fixed; inset: 0; z-index: 100000;
  pointer-events: none;            /* children opt back in */
}

/* Full-screen click-blocker so the tour stays guided (Next/Back/Skip).
   Transparent while a spotlight is shown (the spotlight provides the dim);
   gets its own dim when there is no target to highlight. */
.tour-backdrop {
  position: fixed; inset: 0; pointer-events: auto;
  background: transparent;
  transition: background .2s ease;
}
.tour-backdrop.dim { background: rgba(20, 28, 44, 0.55); }

/* The spotlight: a transparent rect whose huge box-shadow dims everything
   else, leaving the highlighted element visible. */
.tour-spot {
  position: fixed; pointer-events: none;
  border-radius: 10px;
  border: 2px solid var(--accent, #3B6FE0);
  box-shadow: 0 0 0 9999px rgba(20, 28, 44, 0.55),
              0 0 0 2px rgba(59, 111, 224, 0.35);
  transition: top .25s var(--ease-ios, ease), left .25s var(--ease-ios, ease),
              width .25s var(--ease-ios, ease), height .25s var(--ease-ios, ease);
}

/* The callout bubble */
.tour-callout {
  position: fixed; pointer-events: auto;
  width: 330px; max-width: 88vw;
  background: var(--bg-surface, #ffffff);
  color: var(--text-primary, #16202E);
  border: 1px solid var(--border-subtle, #E6E7E2);
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(20, 28, 44, 0.30);
  padding: 16px 16px 12px;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  animation: tour-pop .22s var(--ease-spring, cubic-bezier(.2,.8,.2,1));
}
@keyframes tour-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; } }

.tour-chapter {
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent, #3B6FE0); margin-bottom: 6px;
}
.tour-title {
  font-size: 16px; font-weight: 700; line-height: 1.25;
  color: var(--text-primary, #16202E); margin-bottom: 6px;
}
.tour-body {
  font-size: 12.5px; line-height: 1.55;
  color: var(--text-muted, #5B6675); margin-bottom: 14px;
}
.tour-body b { color: var(--text-primary, #16202E); font-weight: 600; }

.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-nav { display: flex; align-items: center; gap: 8px; }
.tour-count { font-size: 11px; color: var(--text-faint, #8A94A3); margin-right: 2px; font-variant-numeric: tabular-nums; }

.tour-btn {
  font: inherit; font-size: 12.5px; font-weight: 600;
  border-radius: 8px; padding: 7px 14px; cursor: pointer;
  border: 1px solid transparent; transition: filter .15s ease, background .15s ease;
}
.tour-next { background: var(--accent, #3B6FE0); color: #fff; }
.tour-next:hover { filter: brightness(1.06); }
.tour-back {
  background: transparent; color: var(--text-muted, #5B6675);
  border-color: var(--border-subtle, #E6E7E2);
}
.tour-back:hover { background: rgba(20,28,44,0.04); }
.tour-skip {
  font: inherit; font-size: 11.5px; color: var(--text-faint, #8A94A3);
  background: none; border: none; cursor: pointer; padding: 6px 2px;
}
.tour-skip:hover { color: var(--text-muted, #5B6675); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-callout { transition: none; animation: none; }
}
