/* ==================================================================
   Guided product tour — spotlight walkthrough (demo layer)
   Kit tokens only; values fall back to the canonical template tokens.
   Motion: fade/translate <= .25s (doc-14 calm).
   ================================================================== */

/* ---- Invite card (bottom-right, once per module) ---- */
.tour-invite {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9980;
  max-width: 320px;
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #e7eaf0);
  border-radius: 14px;
  box-shadow: var(--shadow, 0 6px 22px -10px rgba(20, 24, 40, .14));
  padding: 16px 18px 14px;
  font-family: inherit;
  color: var(--text, #333c4d);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
}
.tour-invite.show { opacity: 1; transform: translateY(0); }
.tour-invite h4 {
  margin: 0 0 5px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-strong, #1f2734);
  letter-spacing: .1px;
}
.tour-invite p {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted, #6b7280);
}
.tour-invite-btns { display: flex; gap: 8px; }

/* ---- Overlay + spotlight ---- */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  overflow: hidden;
}
.tour-spot {
  position: fixed;
  border-radius: 12px;
  box-shadow:
    0 0 0 2px var(--primary, #5e5ce6),
    0 0 0 200vmax rgba(15, 23, 42, .45);
  transition: opacity .18s ease;
  pointer-events: none;
}

/* ---- Coach card ---- */
.tour-card {
  position: fixed;
  z-index: 9992;
  width: 300px;
  max-width: calc(100vw - 24px);
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #e7eaf0);
  border-radius: 14px;
  box-shadow: var(--shadow, 0 6px 22px -10px rgba(20, 24, 40, .14));
  padding: 14px 16px 12px;
  color: var(--text, #333c4d);
  font-family: inherit;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
}
.tour-card.show { opacity: 1; transform: translateY(0); }
.tour-card.center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
}
.tour-card.center.show { transform: translate(-50%, -50%); }

.tour-step-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
  margin: 0 0 4px;
}
.tour-card h4 {
  margin: 0 0 5px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-strong, #1f2734);
}
.tour-card p {
  margin: 0 0 11px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted, #6b7280);
}

.tour-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.tour-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border, #e7eaf0);
  transition: background .2s ease;
}
.tour-dot.active { background: var(--primary, #5e5ce6); }
.tour-dot.done { background: var(--primary-tint, #eeedfd); }

.tour-btns { display: flex; gap: 8px; align-items: center; }
.tour-btns .tour-spacer { flex: 1; }
.tour-end-link {
  background: none;
  border: none;
  padding: 6px 4px;
  font-size: 12px;
  font-family: inherit;
  color: var(--muted, #6b7280);
  cursor: pointer;
  border-radius: 7px;
  transition: color .15s ease;
}
.tour-end-link:hover { color: var(--text, #333c4d); }

@media (max-width: 600px) {
  .tour-invite { left: 12px; right: 12px; max-width: none; }
}

/* One-time switcher discovery pulse (three soft rings, then done) */
.tour-switch-pulse { position: relative; }
.tour-switch-pulse::after {
  content: ""; position: absolute; inset: 2px; border-radius: 12px;
  border: 2px solid var(--primary, #5e5ce6);
  pointer-events: none; opacity: 0;
  animation: tourSwitchPulse 2s ease-out 3;
}
@keyframes tourSwitchPulse {
  0% { opacity: .55; transform: scale(.97); }
  70% { opacity: 0; transform: scale(1.04); }
  100% { opacity: 0; }
}

/* Hint chip shown alongside the switcher pulse (one-time) */
.tour-switch-chip {
  position: absolute; left: 14px; right: 14px; top: calc(100% + 2px); z-index: 31;
  background: var(--primary, #5e5ce6); color: #fff;
  font-size: 11.5px; font-weight: 600; text-align: center;
  padding: 6px 10px; border-radius: 9px;
  box-shadow: 0 6px 18px -8px rgba(94,92,230,.55);
  animation: tourChipIn .25s ease;
  pointer-events: none;
}
@keyframes tourChipIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
