/* ============================================================
   WhizInvite guided tour — launcher + custom overlay
   ============================================================ */

/* ---- Floating “Guided tour” button ---- */
.tour-fab {
  position: fixed;
  bottom: 24px;
  left: 20px;
  z-index: 10050;
  appearance: none;
  border: 1px solid rgba(176, 141, 79, 0.55);
  border-radius: 999px;
  background: rgba(26, 26, 46, 0.94);
  color: var(--ivory, #FAF7F0);
  font-family: var(--font-sans, 'Figtree', sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 22px;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(26, 26, 46, 0.28);
  transition: border-color 0.25s, color 0.25s, background 0.25s, transform 0.25s;
}

.tour-fab:hover {
  border-color: var(--gold, #B08D4F);
  color: var(--gold-bright, #D4AF6A);
  transform: translateY(-1px);
}

.tour-fab:focus-visible {
  outline: 2px solid var(--gold, #B08D4F);
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .tour-fab {
    bottom: 20px;
    left: 12px;
    padding: 12px 16px;
    font-size: 10px;
  }
}

/* ---- Custom overlay engine ---- */
.whiz-tour-root {
  position: fixed;
  inset: 0;
  z-index: 10000;
  /* Let the page (and editor panel) keep scrolling under the dimming layer */
  pointer-events: none;
}

.whiz-tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.62);
  transition: clip-path 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.whiz-tour-spotlight {
  position: absolute;
  border: 1.5px solid var(--gold, #B08D4F);
  box-shadow: 0 0 0 1px rgba(176, 141, 79, 0.25), 0 16px 48px rgba(26, 26, 46, 0.2);
  background: transparent;
  pointer-events: none;
  transition: top 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              left 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 4px;
}

.whiz-tour-tooltip {
  position: absolute;
  width: min(340px, calc(100vw - 32px));
  background: var(--ivory, #FAF7F0);
  color: var(--ink, #1A1A2E);
  border: 1px solid rgba(176, 141, 79, 0.45);
  box-shadow: 0 18px 50px rgba(26, 26, 46, 0.22);
  padding: 22px 22px 18px;
  font-family: var(--font-sans, 'Figtree', sans-serif);
  transition: top 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              left 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.25s;
  z-index: 1;
  pointer-events: auto;
}

.whiz-tour-tooltip::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(176, 141, 79, 0.28);
  pointer-events: none;
}

.whiz-tour-progress {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold, #B08D4F);
  font-weight: 700;
  margin-bottom: 10px;
}

.whiz-tour-title {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 24px;
  font-weight: 560;
  line-height: 1.2;
  margin: 0 0 8px;
}

.whiz-tour-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft, #5A5A6E);
  margin: 0 0 18px;
}

.whiz-tour-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.whiz-tour-actions .spacer { flex: 1; min-width: 8px; }

.whiz-tour-btn {
  appearance: none;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  border: 1px solid rgba(26, 26, 46, 0.3);
  background: transparent;
  color: var(--ink, #1A1A2E);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}

.whiz-tour-btn:hover { border-color: var(--gold, #B08D4F); color: var(--gold, #B08D4F); }

.whiz-tour-btn--primary {
  background: var(--ink, #1A1A2E);
  border-color: var(--ink, #1A1A2E);
  color: var(--ivory, #FAF7F0);
}

.whiz-tour-btn--primary:hover {
  background: var(--gold, #B08D4F);
  border-color: var(--gold, #B08D4F);
  color: var(--ink, #1A1A2E);
}

.whiz-tour-btn--ghost {
  border: none;
  padding-left: 4px;
  padding-right: 4px;
  color: var(--ink-soft, #5A5A6E);
  font-weight: 500;
}

.whiz-tour-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* Highlight ring is drawn by .whiz-tour-spotlight — do not raise target z-index
   (that breaks scrollable panels like the editor sidebar). */
.whiz-tour-target {
  outline: none;
}

/* Driver.js light theming to sit closer to the brand */
.driver-popover {
  background: var(--ivory, #FAF7F0) !important;
  color: var(--ink, #1A1A2E) !important;
  border: 1px solid rgba(176, 141, 79, 0.4);
  box-shadow: 0 18px 50px rgba(26, 26, 46, 0.2);
  font-family: var(--font-sans, 'Figtree', sans-serif) !important;
}

.driver-popover-title {
  font-family: var(--font-display, 'Cormorant Garamond', serif) !important;
  font-size: 22px !important;
  font-weight: 560 !important;
}

.driver-popover-description {
  color: var(--ink-soft, #5A5A6E) !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

.driver-popover-progress-text {
  color: var(--gold, #B08D4F) !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 10px !important;
}

.driver-popover-next-btn,
.driver-popover-prev-btn,
.driver-popover-close-btn {
  font-family: var(--font-sans, 'Figtree', sans-serif) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-size: 11px !important;
}

.driver-popover-next-btn {
  background: var(--ink, #1A1A2E) !important;
  color: var(--ivory, #FAF7F0) !important;
  text-shadow: none !important;
  border: 1px solid var(--ink, #1A1A2E) !important;
}
