/* =====================================================================
   The first-visit tour.
   Loaded on every dashboard page; nothing here applies until tour.js
   builds its elements, so the cost to everyone else is one HTTP request
   that caches.
   ===================================================================== */

/* The dim. A single transparent box with a very large spread shadow cuts
   the hole: four panels around a rectangle never line up at the corners
   once anything animates, and this cannot come apart. */
.tour-scrim {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.tour-spot {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(1, 27, 58, .72);
  /* Clicks land on the scrim, which closes the tour. The highlighted
     element is shown, not armed -- somebody pressing "Start an open play"
     through the hole would leave the page mid-tour with the bubble still
     describing where they just were. */
  pointer-events: none;
  transition: top .18s ease, left .18s ease, width .18s ease, height .18s ease;
}

.tour-bubble {
  position: fixed;
  z-index: 121;
  width: min(320px, calc(100vw - 32px));
  background: var(--surface, #fff);
  color: var(--text, #16243D);
  border-radius: var(--r-md, 14px);
  padding: 18px;
  box-shadow: 0 18px 44px rgba(1, 27, 58, .28);
  transition: top .18s ease, left .18s ease;
}

.tour-count {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint, #6B7C93);
}

.tour-title {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.tour-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted, #445A76);
}

.tour-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.tour-grow { flex: 1; }

.tour-acts button {
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  border-radius: var(--r-full, 999px);
  padding: 8px 15px;
  cursor: pointer;
  border: 1px solid transparent;
}

.tour-next {
  background: var(--action, #BED31E);
  color: var(--on-action, #013E83);
}

.tour-back {
  background: transparent;
  border-color: var(--border, #D8E0EC);
  color: var(--text, #16243D);
}

.tour-skip {
  background: transparent;
  color: var(--text-faint, #6B7C93);
  padding-left: 2px;
  padding-right: 2px;
}

.tour-skip:hover { color: var(--text, #16243D); }

.tour-acts button:focus-visible {
  outline: 2px solid var(--accent, #0B4C95);
  outline-offset: 2px;
}

/* Somebody who has asked for less movement gets the tour, without the
   thing sliding around the screen between steps. */
@media (prefers-reduced-motion: reduce) {
  .tour-spot,
  .tour-bubble { transition: none; }
}
