/* Spotlight Tour — Bloomberg-style overlay
   ─────────────────────────────────────────────
   Renders nothing until #ix-tour-root.ix-tour-active is set. */

#ix-tour-root { position: fixed; inset: 0; z-index: 999999; pointer-events: none;
  display: none; }
#ix-tour-root.ix-tour-active { display: block; }

body.ix-tour-no-scroll { overflow: hidden; }

/* The spotlight's giant box-shadow is the actual dim — backdrop element is just
   a click-catcher behind it. Set transparent and pointer-events:auto. */
.ix-tour-backdrop {
  position: fixed; inset: 0; background: transparent !important;
  pointer-events: auto;
  animation: ix-tour-fade 0.25s ease;
}

.ix-tour-spotlight {
  position: fixed; pointer-events: none;
  border-radius: 10px;
  box-shadow:
    0 0 0 9999px rgba(7, 9, 15, 0.85),
    0 0 0 2px #d97757,
    0 0 32px rgba(217, 119, 87, 0.4),
    inset 0 0 0 1px rgba(217, 119, 87, 0.3);
  transition: top 0.3s cubic-bezier(0.16,1,0.3,1),
              left 0.3s cubic-bezier(0.16,1,0.3,1),
              width 0.3s cubic-bezier(0.16,1,0.3,1),
              height 0.3s cubic-bezier(0.16,1,0.3,1),
              border-radius 0.3s cubic-bezier(0.16,1,0.3,1);
}

/* When a tour is active, the spotlight overlay's enormous box-shadow already
   dims everything UNDER it. But fixed-position FABs / clocks / pickers with
   higher z-index would punch through. Push them all behind the tour layer. */
body.ix-tour-no-scroll .ai-fab,
body.ix-tour-no-scroll .ix-term-fab,
body.ix-tour-no-scroll .live-ticker-wrapper,
body.ix-tour-no-scroll .ai-chat-panel,
body.ix-tour-no-scroll [class*="-fab"]:not(.ix-tour-no-dim),
body.ix-tour-no-scroll .floating-clock,
body.ix-tour-no-scroll .market-status-pill,
body.ix-tour-no-scroll #ix-bottom-nav {
  z-index: 1 !important;
}

.ix-tour-tip {
  position: fixed; width: 360px; max-width: calc(100vw - 32px);
  background: #12141c;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 18px 20px 16px;
  pointer-events: auto;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #ecead2;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: ix-tour-pop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  transition: top 0.3s cubic-bezier(0.16,1,0.3,1),
              left 0.3s cubic-bezier(0.16,1,0.3,1);
}
.ix-tour-tip-step {
  font-family: 'JetBrains Mono','SF Mono', monospace;
  font-size: 10px; font-weight: 600;
  color: #d97757; text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 8px; font-variant-numeric: tabular-nums;
}
.ix-tour-tip-title {
  font-family: 'Source Serif Pro','Source Serif 4', Georgia, serif;
  font-size: 18px; font-weight: 600; color: #ecead2;
  margin: 0 0 8px; letter-spacing: -0.012em; line-height: 1.3;
}
.ix-tour-tip-body {
  font-size: 13px; color: #b8b2a4; line-height: 1.6; margin: 0 0 16px;
}
.ix-tour-tip-body strong { color: #ecead2; font-weight: 600; }
.ix-tour-tip-body code {
  background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 4px;
  font-size: 12px; font-family: 'JetBrains Mono','SF Mono', monospace; color: #ecead2;
}

.ix-tour-tip-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.ix-tour-tip-actions { display: inline-flex; gap: 8px; }

.ix-tour-btn {
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 7px 14px; border-radius: 7px; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.ix-tour-skip {
  background: transparent; border: 0; color: #76716a;
  padding: 7px 0;
}
.ix-tour-skip:hover { color: #ecead2; }
.ix-tour-back {
  background: transparent; border: 1px solid rgba(255,255,255,0.10);
  color: #b8b2a4;
}
.ix-tour-back:hover:not(:disabled) { color: #ecead2; border-color: rgba(255,255,255,0.18); }
.ix-tour-back:disabled { opacity: 0.4; cursor: not-allowed; }
.ix-tour-next {
  background: #d97757; border: 1px solid #d97757;
  color: #0a0a09; padding: 7px 16px;
}
.ix-tour-next:hover { background: #f0875e; border-color: #f0875e; }

@keyframes ix-tour-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ix-tour-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .ix-tour-tip { width: calc(100vw - 32px); }
}

/* === Just-in-time tooltip — single-step pop on first feature visit === */
.ix-jit {
  position: fixed; z-index: 99997;
  width: 320px; max-width: calc(100vw - 32px);
  background: #12141c;
  border: 1px solid rgba(217,119,87,0.3);
  border-radius: 10px;
  padding: 14px 16px 12px;
  font-family: 'Inter', sans-serif; color: #ecead2;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  animation: ix-tour-pop 0.32s cubic-bezier(0.16,1,0.3,1);
}
.ix-jit-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 600;
  color: #d97757; text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 6px;
}
.ix-jit-title {
  font-family: 'Source Serif Pro','Source Serif 4', Georgia, serif;
  font-size: 15px; font-weight: 600; color: #ecead2;
  margin: 0 0 4px; letter-spacing: -0.01em;
}
.ix-jit-body {
  font-size: 12px; color: #b8b2a4; line-height: 1.55; margin: 0 0 10px;
}
.ix-jit-foot { display: flex; justify-content: flex-end; gap: 6px; }
.ix-jit-btn {
  font: inherit; font-size: 11px; font-weight: 600;
  padding: 5px 11px; border-radius: 5px; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ix-jit-dismiss {
  background: transparent; border: 1px solid rgba(255,255,255,0.10);
  color: #b8b2a4;
}
.ix-jit-dismiss:hover { color: #ecead2; }
.ix-jit-cta {
  background: #d97757; border: 1px solid #d97757; color: #0a0a09;
}
.ix-jit-cta:hover { background: #f0875e; border-color: #f0875e; }
