/* ============================================================
   Guided Tour — ghost cursor + spotlight + tooltip
   ============================================================ */

.tour-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  font-family: var(--font-body);
}
.tour-root[data-active="true"] {
  pointer-events: auto;
}

/* Dimming scrim — clipped via SVG mask in JS to spotlight the target */
.tour-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.55);
  -webkit-backdrop-filter: blur(2px) saturate(80%);
  backdrop-filter: blur(2px) saturate(80%);
  transition: opacity 320ms var(--ease, ease);
}

/* Spotlight halo around the target element */
.tour-spotlight {
  position: absolute;
  border-radius: 14px;
  pointer-events: none;
  box-shadow:
    0 0 0 9999px rgba(4, 8, 18, 0.62),
    0 0 0 1.5px rgba(94, 224, 210, 0.55),
    0 0 22px 4px rgba(94, 224, 210, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: top 480ms var(--ease, ease), left 480ms var(--ease, ease),
              width 480ms var(--ease, ease), height 480ms var(--ease, ease);
}

/* Ghost cursor */
.tour-cursor {
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
  z-index: 9100;
  transition: transform 720ms cubic-bezier(0.32, 0.72, 0, 1);
  transform-origin: 4px 4px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.45));
  will-change: transform;
}
.tour-cursor svg { width: 100%; height: 100%; display: block; }
.tour-cursor[data-clicking="true"]::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright, #5EE0D2);
  animation: tour-click-ring 520ms ease-out;
  transform: translate(-50%, -50%);
}
@keyframes tour-click-ring {
  0%   { width: 6px;  height: 6px;  opacity: 0.8; }
  100% { width: 56px; height: 56px; opacity: 0;   }
}

/* Tooltip card — floats next to the spotlight */
.tour-tip {
  position: absolute;
  width: min(320px, 90vw);
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(22,38,68,0.96), rgba(12,22,42,0.96));
  border: 1px solid rgba(94, 224, 210, 0.32);
  border-radius: 14px;
  box-shadow:
    0 18px 48px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.08);
  color: var(--text-1, #e2e8f0);
  pointer-events: auto;
  transition: top 480ms var(--ease, ease), left 480ms var(--ease, ease),
              opacity 240ms ease;
}
.tour-tip-step {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright, #5EE0D2);
  margin: 0 0 6px;
}
.tour-tip-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.tour-tip-body {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2, rgba(226,232,240,0.72));
  margin: 0 0 12px;
}
.tour-tip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tour-tip-progress {
  flex: 1;
  display: flex;
  gap: 4px;
  align-items: center;
}
.tour-tip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: background 200ms;
}
.tour-tip-dot[data-current="true"] {
  background: var(--accent-bright, #5EE0D2);
  box-shadow: 0 0 8px rgba(94,224,210,0.7);
}
.tour-tip-dot[data-done="true"] {
  background: rgba(94, 224, 210, 0.45);
}
.tour-tip-btn {
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  border: 1px solid rgba(255,255,255,0.16);
  cursor: pointer;
  transition: all 160ms;
}
.tour-tip-btn:hover { color: var(--text-1); border-color: rgba(255,255,255,0.32); }
.tour-tip-btn[data-primary="true"] {
  background: linear-gradient(180deg, #5EE0D2, #2c8a82);
  color: #0b1626;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(94,224,210,0.32);
}
.tour-tip-btn[data-primary="true"]:hover {
  filter: brightness(1.06);
}

/* Floating "Take the tour" launcher (when tour is dormant) */
.tour-launcher {
  position: fixed;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  background: linear-gradient(180deg, rgba(22,38,68,0.92), rgba(12,22,42,0.92));
  border: 1px solid rgba(94,224,210,0.36);
  border-radius: 999px;
  color: var(--text-1);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.4),
    0 0 18px rgba(94,224,210,0.22),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 200ms, box-shadow 200ms;
}
.tour-launcher:hover {
  transform: translateX(-50%) translateY(-1px);
  box-shadow:
    0 10px 28px rgba(0,0,0,0.45),
    0 0 22px rgba(94,224,210,0.32),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.tour-launcher-pulse {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #5EE0D2 0%, rgba(94,224,210,0.4) 60%, transparent 70%);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
.tour-launcher-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid #5EE0D2;
  animation: tour-launcher-ping 2.4s ease-out infinite;
}
@keyframes tour-launcher-ping {
  0%   { transform: scale(1);   opacity: 0.7; }
  80%  { transform: scale(1.8); opacity: 0;   }
  100% { transform: scale(1.8); opacity: 0;   }
}
.tour-launcher-pulse svg { width: 12px; height: 12px; position: relative; z-index: 1; color: #0b1626; }
