/* walkthrough.css — shared interactive step-player used across the docs and
   the landing page. Self-hosted "Supademo-style" walkthrough: a real captured
   screenshot per step, a highlighted hotspot pointing at the exact control,
   and a caption — with both auto-advance (feels alive, like a video) and full
   manual control (click/keyboard, feels interactive, unlike a video). */

.wt {
  --wt-accent: #2563eb;
  --wt-accent-light: #eff6ff;
  --wt-ink: #1a1a1a;
  --wt-ink-2: #57534e;
  --wt-border: #e7e2d8;
  --wt-surface: #ffffff;
  --wt-radius: 14px;
  font-family: "IBM Plex Sans", -apple-system, system-ui, sans-serif;
  max-width: 900px;
  margin: 0 auto;
}

.wt-frame {
  position: relative;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  overflow: hidden;
  box-shadow: 0 12px 32px -12px rgba(26,26,26,0.16);
}

/* Browser-chrome bar, like a real product screenshot frame */
.wt-chrome {
  height: 38px;
  background: #f7f4ee;
  border-bottom: 1px solid var(--wt-border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  flex-shrink: 0;
}
.wt-chrome-dot { width: 10px; height: 10px; border-radius: 50%; }
.wt-chrome-url {
  margin: 0 auto;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--wt-ink-2);
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: 6px;
  padding: 3px 12px;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Progress bars — one segment per step, Instagram-Stories style */
.wt-progress {
  display: flex;
  gap: 4px;
  padding: 10px 14px 0;
}
.wt-progress-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(26,26,26,0.1);
  overflow: hidden;
  cursor: pointer;
}
.wt-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--wt-accent);
  border-radius: 2px;
}
.wt-progress-seg.done .wt-progress-fill { width: 100%; }
.wt-progress-seg.active .wt-progress-fill { transition: width linear; }

/* Stage: the screenshot + hotspot */
.wt-stage {
  position: relative;
  background: #f4f2ec;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.wt-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.wt-stage img.wt-visible { opacity: 1; }

.wt-hotspot {
  position: absolute;
  border: 2px solid var(--wt-accent);
  border-radius: 8px;
  box-shadow: 0 0 0 4000px rgba(20,18,14,0.38), 0 0 0 4px rgba(37,99,235,0.18);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.wt-hotspot.wt-visible { opacity: 1; animation: wt-pulse 1.8s ease-in-out infinite; }
@keyframes wt-pulse {
  0%, 100% { box-shadow: 0 0 0 4000px rgba(20,18,14,0.38), 0 0 0 4px rgba(37,99,235,0.22); }
  50%      { box-shadow: 0 0 0 4000px rgba(20,18,14,0.38), 0 0 0 9px rgba(37,99,235,0.10); }
}
@media (prefers-reduced-motion: reduce) { .wt-hotspot.wt-visible { animation: none; } }

/* Click-anywhere-to-advance affordance */
.wt-nav-zone {
  position: absolute; top: 0; bottom: 0; width: 40%; z-index: 2;
  display: flex; align-items: center; opacity: 0; transition: opacity 0.15s ease;
}
.wt-nav-zone:hover { opacity: 1; }
.wt-nav-prev { left: 0; justify-content: flex-start; padding-left: 10px; }
.wt-nav-next { right: 0; justify-content: flex-end; padding-right: 10px; }
.wt-nav-arrow {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: var(--wt-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* Caption bar below the stage */
.wt-caption {
  padding: 18px 22px 20px;
  border-top: 1px solid var(--wt-border);
}
.wt-caption-step {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--wt-accent); margin-bottom: 6px;
}
.wt-caption-title { font-size: 16px; font-weight: 700; color: var(--wt-ink); margin-bottom: 5px; letter-spacing: -0.01em; }
.wt-caption-text { font-size: 14px; color: var(--wt-ink-2); line-height: 1.6; }

/* Controls row */
.wt-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px 18px;
}
.wt-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; min-height: 40px;
  border-radius: 8px; border: 1px solid var(--wt-border);
  background: var(--wt-surface); color: var(--wt-ink);
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all 0.15s ease;
}
.wt-btn:hover:not(:disabled) { border-color: var(--wt-accent); color: var(--wt-accent); }
.wt-btn:disabled { opacity: 0.35; cursor: default; }
.wt-btn-primary { background: var(--wt-ink); color: #fff; border-color: var(--wt-ink); }
.wt-btn-primary:hover:not(:disabled) { background: var(--wt-accent); border-color: var(--wt-accent); color: #fff; }
.wt-dots { display: flex; gap: 6px; align-items: center; }
.wt-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--wt-border);
  cursor: pointer; transition: all 0.15s ease; border: none; padding: 0;
}
.wt-dot.active { background: var(--wt-accent); width: 20px; border-radius: 4px; }

@media (max-width: 640px) {
  .wt-nav-zone { display: none; } /* rely on buttons/dots on touch devices */
  .wt-caption-title { font-size: 15px; }
  .wt-controls { flex-wrap: wrap; gap: 10px; }
}
