/* ═══════════════════════════════════════════════════════════
   LOGICBENCH GUIDED TOUR
   Spotlight + tooltip walkthrough. Self-contained, no deps.
   Uses the app's existing theme variables (see app.css :root).
   ═══════════════════════════════════════════════════════════ */

#lbtour-root {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* four backdrop slabs surrounding the highlighted rect — avoids
   clip-path/box-shadow-hole rendering quirks across browsers */
.lbtour-mask {
  position: fixed;
  background: rgba(6, 9, 14, 0.72);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  pointer-events: auto;
  transition: all 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* glowing ring around the highlighted element */
.lbtour-ring {
  position: fixed;
  border-radius: 10px;
  pointer-events: none;
  box-shadow:
    0 0 0 3px rgba(79, 209, 197, 0.9),
    0 0 0 6px rgba(79, 209, 197, 0.25),
    0 0 24px 4px rgba(79, 209, 197, 0.35);
  transition: all 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.lbtour-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1px solid rgba(79, 209, 197, 0.5);
  animation: lbtour-pulse 1.8s ease-out infinite;
}

@keyframes lbtour-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(79, 209, 197, 0.5); opacity: 1; }
  100% { box-shadow: 0 0 0 8px rgba(79, 209, 197, 0); opacity: 0; }
}

/* tooltip card */
.lbtour-card {
  position: fixed;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: var(--bg-panel, #131b27);
  border: 1px solid var(--border-mid, #263348);
  border-radius: 12px;
  box-shadow: var(--shadow-lg, 0 8px 32px rgba(0,0,0,0.6)), 0 0 0 1px rgba(79,209,197,0.08);
  padding: 16px 18px 14px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease, top 320ms cubic-bezier(0.4,0,0.2,1), left 320ms cubic-bezier(0.4,0,0.2,1);
}

.lbtour-card.lbtour-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.lbtour-card::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--bg-panel, #131b27);
  border: 1px solid var(--border-mid, #263348);
  transform: rotate(45deg);
}

.lbtour-card[data-arrow="top"]::after {
  top: -7px; left: 24px;
  border-right: none; border-bottom: none;
}
.lbtour-card[data-arrow="bottom"]::after {
  bottom: -7px; left: 24px;
  border-left: none; border-top: none;
}
.lbtour-card[data-arrow="left"]::after {
  left: -7px; top: 20px;
  border-right: none; border-top: none;
}
.lbtour-card[data-arrow="right"]::after {
  right: -7px; top: 20px;
  border-left: none; border-bottom: none;
}
.lbtour-card[data-arrow="none"]::after { display: none; }

.lbtour-card-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-accent, #4fd1c5);
  margin: 0 0 6px;
}

.lbtour-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #e2e8f0);
  margin: 0 0 6px;
  line-height: 1.3;
}

.lbtour-card-body {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary, #94a3b8);
  margin: 0;
}

.lbtour-card-body kbd {
  background: var(--bg-input, #0f1520);
  border: 1px solid var(--border-mid, #263348);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-accent, #4fd1c5);
}

.lbtour-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted, #475569);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms, color 150ms;
}
.lbtour-card-close:hover {
  background: var(--bg-hover, #1e2a3e);
  color: var(--text-primary, #e2e8f0);
}

/* bottom-center control bar: prev arrow / dots / next arrow */
.lbtour-nav {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-panel, #131b27);
  border: 1px solid var(--border-mid, #263348);
  border-radius: 999px;
  padding: 8px 10px;
  box-shadow: var(--shadow-lg, 0 8px 32px rgba(0,0,0,0.6));
  pointer-events: auto;
  z-index: 100001;
}

.lbtour-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-mid, #263348);
  background: var(--bg-raised, #1a2336);
  color: var(--text-primary, #e2e8f0);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, transform 100ms;
}
.lbtour-nav-btn:hover:not(:disabled) {
  background: var(--bg-hover, #1e2a3e);
  border-color: var(--teal-500, #2c9e98);
}
.lbtour-nav-btn:active:not(:disabled) { transform: scale(0.92); }
.lbtour-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.lbtour-nav-btn.lbtour-next-primary {
  background: var(--teal-500, #2c9e98);
  border-color: var(--teal-400, #38b2ac);
  color: #06171a;
}
.lbtour-nav-btn.lbtour-next-primary:hover { background: var(--teal-400, #38b2ac); }

.lbtour-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lbtour-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-mid, #263348);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 220ms cubic-bezier(0.4,0,0.2,1);
}
.lbtour-dot:hover { background: var(--text-muted, #475569); }
.lbtour-dot.lbtour-dot-active {
  width: 18px;
  border-radius: 4px;
  background: var(--text-accent, #4fd1c5);
}
.lbtour-dot.lbtour-dot-done {
  background: var(--teal-600, #20736e);
}

.lbtour-skip {
  position: fixed;
  bottom: 30px;
  right: 24px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary, #e2e8f0);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  pointer-events: auto;
  z-index: 100001;
  transition: color 150ms, opacity 150ms;
  opacity: 0.85;
}
.lbtour-skip:hover { color: var(--text-primary, #e2e8f0); opacity: 1; text-decoration: underline; }

.lbtour-stepcount {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #475569);
  font-family: 'JetBrains Mono', monospace;
  min-width: 34px;
  text-align: center;
}

/* small persistent "?" launcher button, sits in the header */
#tour-relaunch-btn {
  display: inline-flex;
}

@media (max-width: 720px) {
  .lbtour-card { width: calc(100vw - 32px); }
  .lbtour-skip { bottom: 84px; right: 16px; }
  .lbtour-nav { bottom: 80px; }
}
