/* The product tour: a spotlight cut out of a dimmed page plus a popover that
   walks a new account (or a signed-out visitor trying the chat) through the
   surfaces that matter. Geometry is set by static/tour.js; everything else
   lives here. Sovereign: no url(), no import, tokens from base.html. */

/* Swallows every click while a step is up, so the tour cannot be half-driven
   by clicking the app underneath it. */
.tour-block { position: fixed; inset: 0; z-index: 9996; }

/* The dim. A step with an anchor gets it from the spotlight's huge ring
   (so the anchor stays lit); an anchorless step gets this flat veil. */
.tour-veil { position: fixed; inset: 0; z-index: 9997;
             background: rgba(16,22,30,.55); }

.tour-spot { position: fixed; z-index: 9998; pointer-events: none;
             border-radius: 12px; box-sizing: border-box;
             border: 2px solid rgba(255,255,255,.9);
             box-shadow: 0 0 0 9999px rgba(16,22,30,.55),
                         0 6px 22px rgba(16,22,30,.25);
             transition: top .35s cubic-bezier(.22,1,.36,1),
                         left .35s cubic-bezier(.22,1,.36,1),
                         width .35s cubic-bezier(.22,1,.36,1),
                         height .35s cubic-bezier(.22,1,.36,1); }

.tour-pop { position: fixed; z-index: 9999; width: 300px; box-sizing: border-box;
            background: var(--surface); border: 1px solid var(--border);
            border-radius: 14px; box-shadow: 0 24px 54px -18px rgba(16,22,30,.5);
            padding: 15px 16px 13px; color: var(--ink);
            font-family: var(--font-sans); font-size: 13px;
            animation: tour-pop-in .22s cubic-bezier(.22,1,.36,1); }
@keyframes tour-pop-in { from { opacity: 0; transform: translateY(6px) scale(.98); }
                         to { opacity: 1; transform: none; } }

/* Anchorless step: a plain card in the middle of the veil. */
.tour-pop.center { width: 340px; max-width: calc(100vw - 32px);
                   top: 50%; left: 50%; transform: translate(-50%, -50%);
                   animation: tour-card-in .22s cubic-bezier(.22,1,.36,1); }
@keyframes tour-card-in { from { opacity: 0; }
                          to { opacity: 1; } }

.tour-arrow { position: absolute; width: 12px; height: 12px;
              background: var(--surface); transform: rotate(45deg); }
.tour-arrow.t { top: -7px; border-left: 1px solid var(--border);
                border-top: 1px solid var(--border); }
.tour-arrow.b { bottom: -7px; border-right: 1px solid var(--border);
                border-bottom: 1px solid var(--border); }
.tour-arrow.l { left: -7px; border-left: 1px solid var(--border);
                border-bottom: 1px solid var(--border); }
.tour-arrow.r { right: -7px; border-right: 1px solid var(--border);
                border-top: 1px solid var(--border); }

.tour-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tour-kicker { font-family: var(--font-mono); font-size: 10px;
               letter-spacing: .09em; text-transform: uppercase;
               color: var(--ok-ink); font-weight: 600; }
.tour-count { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }
.tour-x { display: grid; place-items: center; width: 22px; height: 22px;
          margin: -2px -4px -2px 0; border: 0; background: none;
          border-radius: 6px; color: var(--faint); cursor: pointer; }
.tour-x:hover { background: rgba(28,30,34,.06); color: var(--ink); }

.tour-title { font-family: var(--font-display); font-weight: 650; font-size: 17px;
              color: var(--ink); margin-bottom: 5px; letter-spacing: .005em; }
.tour-body { font-size: 13px; line-height: 1.5; color: var(--ink-2); }

.tour-dots { display: flex; align-items: center; gap: 5px; margin: 14px 0 12px; }
.tour-dots span { width: 6px; height: 6px; border-radius: 999px;
                  background: var(--border-2);
                  transition: width .2s ease, background .2s ease; }
.tour-dots span.done { background: #9aa4b2; }
.tour-dots span.now { width: 18px; background: var(--accent); }

.tour-foot { display: flex; align-items: center; gap: 8px; }
.tour-foot .spacer { flex: 1; }
.tour-skip { border: 0; background: none; padding: 4px 2px;
             font-family: var(--font-sans); font-size: 12px; color: var(--faint);
             cursor: pointer; }
.tour-skip:hover { color: var(--ink-2); }
.tour-back { border: 1px solid var(--border-2); background: var(--surface);
             color: var(--ink); border-radius: 9px; padding: 7px 14px;
             font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
             cursor: pointer; }
.tour-back:hover { border-color: var(--graphite); }
.tour-next { border: 0; background: var(--accent); color: #fff; border-radius: 9px;
             padding: 7px 16px; font-family: var(--font-sans); font-size: 12.5px;
             font-weight: 600; cursor: pointer; }
.tour-next:hover { background: var(--accent-strong); }

/* The replay button in the chat header, next to the vault pill. */
.tour-pill { display: inline-flex; align-items: center; gap: 6px;
             flex: 0 0 auto; padding: 5px 11px; border: 1px solid var(--border-2);
             border-radius: 999px; background: var(--surface);
             color: var(--ink-2); font-family: var(--font-sans);
             font-size: 11.5px; font-weight: 600; cursor: pointer;
             white-space: nowrap; }
.tour-pill:hover { border-color: var(--graphite); color: var(--ink); }

/* Too narrow to point at anything usefully (tour.js sets this below 600px):
   the popover docks to the edge furthest from the target, which stays lit. */
.tour-pop.dock { left: 12px; right: 12px; bottom: 12px;
                 top: auto; width: auto; max-width: none; transform: none; }
.tour-pop.dock.up { top: 12px; bottom: auto; }
.tour-pop.dock .tour-arrow { display: none; }

@media (max-width: 899px) {
  /* The header has no room for a word next to the vault pill. */
  .tour-pill-label { display: none; }
  .tour-pill { padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .tour-spot { transition: none; }
  .tour-pop { animation: none; }
  .tour-dots span { transition: none; }
}
