/* =====================================================================
   GUIDED TOUR: first-visit walkthrough (shared across tools)
   Spotlight overlay that darkens the page except the focused area,
   with a step tooltip. Theme-aware via shared CSS variables.
   ===================================================================== */

/* Full-screen click-catcher sitting behind the spotlight. Blocks
   interaction with the page so the user follows the tour. For steps
   with no target it also provides the darkening itself. */
.pf-tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: transparent;
  cursor: default;
}
.pf-tour-backdrop.pf-tour-no-target {
  background: rgba(8, 14, 28, 0.72);
}

/* The spotlight: a transparent rectangle over the focused element whose
   massive box-shadow darkens everything around it (the "hole"). */
.pf-tour-spotlight {
  position: fixed;
  z-index: 9001;
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(8, 14, 28, 0.72);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}

/* Step tooltip / card */
.pf-tour-tooltip {
  position: fixed;
  z-index: 9002;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--panel, var(--card));
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  padding: 18px 18px 14px;
  font-family: var(--sans, sans-serif);
  pointer-events: auto;
}

.pf-tour-tooltip .pf-tour-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pf-tour-tooltip .pf-tour-body {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.pf-tour-tooltip .pf-tour-body code {
  font-family: var(--mono, monospace);
  font-size: 12px;
  background: var(--highlight, rgba(255,255,255,.06));
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 4px;
  color: var(--text);
}

.pf-tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pf-tour-progress {
  font-family: var(--mono, monospace);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .04em;
}
.pf-tour-btns { display: flex; gap: 8px; }

.pf-tour-btn {
  font-family: var(--sans, sans-serif);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter .12s ease, background .12s ease;
}
.pf-tour-btn-primary { background: var(--accent); color: #0F1728; }
.pf-tour-btn-primary:hover { filter: brightness(1.08); }
.pf-tour-btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.pf-tour-btn-ghost:hover { background: var(--highlight); }

.pf-tour-skip {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 2px;
  text-decoration: underline;
  font-family: var(--sans, sans-serif);
}
.pf-tour-skip:hover { color: var(--text); }

/* Header restart button */
.pf-tour-launch {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius, 10px);
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: var(--sans, sans-serif);
  white-space: nowrap;
}
.pf-tour-launch:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 640px) {
  .pf-tour-tooltip { width: calc(100vw - 24px); }
}
