/* Walkthrough engine: spotlight overlay, tooltip, arrow, closing card */

.wt-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}

/* Full-screen scrim, only shown when there's no target (centered tooltip).
   When a target exists, the .wt-spot's giant box-shadow does the dimming.
   pointer-events stays none unless we're in no-target mode, otherwise the
   invisible scrim swallows all clicks. */
.wt-scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 17, 24, 0.42);
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
.wt-overlay.no-target .wt-scrim { opacity: 1; pointer-events: auto; }

/* Spotlight: a transparent box around the target with a giant box-shadow
   that fills the rest of the viewport with a dark scrim. The target stays
   bright and clickable; everything else is dimmed. */
.wt-spot {
  position: absolute;
  border-radius: 8px;
  border: 2px solid var(--gold);
  background: transparent;
  pointer-events: none;
  box-shadow:
    0 0 0 9999px rgba(14, 17, 24, 0.42),
    0 0 0 6px rgba(139, 111, 78, 0.20) inset,
    0 8px 32px rgba(14, 17, 24, 0.18);
  transition: top 320ms var(--ease), left 320ms var(--ease), width 320ms var(--ease), height 320ms var(--ease), opacity 200ms var(--ease);
}

.wt-tooltip {
  position: fixed;
  width: min(360px, calc(100vw - 2rem));
  background: var(--bg);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(14, 17, 24, 0.18), 0 16px 48px rgba(14, 17, 24, 0.10);
  padding: 1.1rem 1.2rem;
  pointer-events: auto;
  transition: top 320ms var(--ease), left 320ms var(--ease), opacity 200ms var(--ease);
  z-index: 320;
}

.wt-tooltip-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.wt-step-counter {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  flex-shrink: 0;
}

.wt-tooltip h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 0.4rem;
  line-height: 1.2;
}

.wt-tooltip p {
  font-family: var(--serif);
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0 0 0.85rem;
}
.wt-tooltip p strong {
  font-weight: 600;
  color: var(--ink);
  font-style: normal;
}

.wt-input {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.5rem 0.7rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  outline: none;
  margin-bottom: 0.85rem;
  transition: border-color var(--dur) var(--ease);
}
.wt-input:focus { border-color: var(--gold); }

.wt-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.wt-skip {
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--ink-faint);
  border-bottom: 1px solid transparent;
  letter-spacing: 0.04em;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.wt-skip:hover { color: var(--ink-soft); border-color: var(--rule); }

.wt-next {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  transition: background var(--dur) var(--ease);
}
.wt-next:hover { background: var(--ink); }
.wt-next .arrow { transition: transform var(--dur) var(--ease); }
.wt-next:hover .arrow { transform: translateX(2px); }

.wt-hint {
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* Arrow */
.wt-arrow {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--bg);
  border: 1px solid var(--gold-soft);
  transform: rotate(45deg);
}
.wt-tooltip[data-pos="top"] .wt-arrow {
  bottom: -8px;
  left: 50%;
  margin-left: -7px;
  border-top: 0;
  border-left: 0;
}
.wt-tooltip[data-pos="bottom"] .wt-arrow {
  top: -8px;
  left: 50%;
  margin-left: -7px;
  border-bottom: 0;
  border-right: 0;
}
.wt-tooltip[data-pos="left"] .wt-arrow {
  right: -8px;
  top: 50%;
  margin-top: -7px;
  border-bottom: 0;
  border-left: 0;
}
.wt-tooltip[data-pos="right"] .wt-arrow {
  left: -8px;
  top: 50%;
  margin-top: -7px;
  border-top: 0;
  border-right: 0;
}
.wt-tooltip[data-pos="center"] .wt-arrow { display: none; }

/* Closing card */
.wt-closing {
  position: fixed;
  inset: 0;
  background: rgba(14, 17, 24, 0.55);
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: wtFade 260ms var(--ease);
}
@keyframes wtFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wt-closing-card {
  background: var(--bg);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: wtRise 360ms var(--ease);
}
@keyframes wtRise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.wt-closing-card .label { display: block; color: var(--gold); margin-bottom: 0.85rem; }

.wt-closing-card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}
.wt-closing-card p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 48ch;
  margin: 0 auto 1.75rem;
}
.wt-closing-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Tours modal extras */
.tour-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  cursor: pointer;
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tour-card:hover { box-shadow: var(--shadow); border-color: var(--gold-soft); transform: translateY(-1px); }
.tour-card .module {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}
.tour-card h4 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  line-height: 1.25;
}
.tour-card p {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.4;
}
