/* JerryTrades v4 — Welcome Tour (first-run getting-started walkthrough)
   Paired with welcome_tour_v4.js. Spotlight overlay + anchored callout that
   mirrors the Playbook/HelpPopover visual language (navy #211b4e card, purple
   #6d28d9 accents, pill buttons). Sits above other overlays while active;
   closes before deep-linking into the Playbook so there's no stacking. */

.jt-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 100065;
  pointer-events: auto;               /* capture clicks — tour drives via its own buttons */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Spotlight: a transparent, rounded hole with a giant dim shadow filling the
   rest of the screen. box-shadow spread is the cheapest cutout (no SVG mask). */
.jt-tour-spot {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(10, 6, 30, .72);
  outline: 2px solid rgba(140, 110, 240, .95);
  outline-offset: 2px;
  pointer-events: none;
  transition: top .3s cubic-bezier(.4, .9, .3, 1), left .3s cubic-bezier(.4, .9, .3, 1),
              width .3s cubic-bezier(.4, .9, .3, 1), height .3s cubic-bezier(.4, .9, .3, 1);
  animation: jt-tour-pulse 1.9s ease-out infinite;
}
@keyframes jt-tour-pulse {
  0%   { outline-color: rgba(140, 110, 240, .95); }
  50%  { outline-color: rgba(140, 110, 240, .35); }
  100% { outline-color: rgba(140, 110, 240, .95); }
}

/* Full dim used by the centered (welcome / finish / no-target) steps. */
.jt-tour-dim {
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 30, .72);
}

/* Callout card */
.jt-tour-pop {
  position: absolute;
  width: min(360px, calc(100vw - 28px));
  background: #211b4e;
  color: #e9e6ff;
  border-radius: 16px;
  padding: 18px 18px 15px;
  box-shadow: 0 22px 60px rgba(10, 6, 40, .6);
  line-height: 1.5;
  transition: top .3s cubic-bezier(.4, .9, .3, 1), left .3s cubic-bezier(.4, .9, .3, 1);
}
.jt-tour-pop.jt-tour-center {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 28px));
  text-align: center;
  padding: 26px 24px 20px;
}
.jt-tour-arrow {
  position: absolute;
  width: 15px;
  height: 15px;
  background: #211b4e;
  transform: rotate(45deg);
  border-radius: 3px;
}

.jt-tour-mascot { font-size: 38px; line-height: 1; margin-bottom: 6px; }
/* Brand-mark logo: Utils.jerryIcon forces a square width/height, but the source
   art is 553×423 — pin the height and let the width follow the native ratio
   (aspect-ratio:auto defeats the img's width/height attributes). */
.jt-tour-mascot img { height: 52px; width: auto; aspect-ratio: auto; }
.jt-tour-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: #a99bf0;
  margin: 0 0 6px;
}
.jt-tour-h { font-size: 18px; font-weight: 800; color: #fff; margin: 0 0 7px; }
.jt-tour-center .jt-tour-h { font-size: 22px; }
.jt-tour-body { font-size: 13.5px; line-height: 1.55; color: #d9d5f5; margin: 0 0 15px; }
.jt-tour-body b { color: #fff; }

/* Pro/Elite upsell chip on the Trading step */
.jt-tour-tier {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #1b1340;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 9px;
}

.jt-tour-foot { display: flex; align-items: center; gap: 10px; }
.jt-tour-dots { display: flex; gap: 6px; flex: 1; }
.jt-tour-center .jt-tour-dots { justify-content: center; }
.jt-tour-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .22); transition: background .2s; }
.jt-tour-dot.on { background: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .25); }

.jt-tour-btn {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}
.jt-tour-btn--primary { background: #6d28d9; color: #fff; }
.jt-tour-btn--primary:hover { background: #7c3aed; }
.jt-tour-btn--ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .28); color: #d9d5f5; }
.jt-tour-btn--ghost:hover { border-color: rgba(255, 255, 255, .55); color: #fff; }
.jt-tour-back {
  background: transparent;
  border: 0;
  color: #b7b0e6;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 9px 6px;
}
.jt-tour-back:hover { color: #fff; }
.jt-tour-skip {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: 0;
  color: #9d95d6;
  font-size: 12px;
  cursor: pointer;
}
.jt-tour-skip:hover { color: #fff; }

/* Finish-step CTA row */
.jt-tour-cta-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .jt-tour-pop { width: calc(100vw - 20px); }
  .jt-tour-cta-row { flex-direction: column; }
}

/* Respect reduced-motion: kill the pulse + slide transitions. */
@media (prefers-reduced-motion: reduce) {
  .jt-tour-spot { animation: none; transition: none; }
  .jt-tour-pop { transition: none; }
}
