/* ==================== DEMO GUIDED TOUR ==================== */
/* Presentation-only onboarding: spotlight + step cards + relaunch button.
   Accent matches the dashboard's blue/violet (same family as the Capture
   FAB gradient #5b7fff -> #8c5bff). */

#demoTourRoot {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
}

/* Full-screen dim used for centered (no-target) steps */
.demo-tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 14, 0.66);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.demo-tour-backdrop.visible { opacity: 1; }

/* Spotlight: transparent box whose huge shadow dims everything around it */
.demo-tour-spot {
  position: fixed;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(8, 9, 14, 0.66);
  outline: 2px solid rgba(124, 111, 255, 0.85);
  outline-offset: 2px;
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
  pointer-events: none;
  display: none;
}
.demo-tour-spot.visible { display: block; }

/* Step card */
.demo-tour-card {
  position: fixed;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: rgba(26, 29, 38, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  padding: 16px 18px 14px;
  color: #e4e6eb;
  pointer-events: auto;
  transition: top 0.25s ease, left 0.25s ease;
}
.demo-tour-card.centered {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  width: 420px;
}

.demo-tour-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fa0ff;
  margin-bottom: 8px;
}
.demo-tour-eyebrow .demo-tour-dots {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.demo-tour-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.demo-tour-dot.on { background: #7c8dff; }

.demo-tour-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #fff;
}
.demo-tour-text {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(228, 230, 235, 0.82);
  margin: 0 0 14px;
}

.demo-tour-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}
.demo-tour-skip {
  background: none;
  border: none;
  color: rgba(228, 230, 235, 0.5);
  font-size: 12px;
  cursor: pointer;
  padding: 6px 4px;
}
.demo-tour-skip:hover { color: rgba(228, 230, 235, 0.85); }

.demo-tour-spacer { flex: 1; }

.demo-tour-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e4e6eb;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.demo-tour-btn:hover { background: rgba(255, 255, 255, 0.1); }
.demo-tour-btn.primary {
  background: linear-gradient(135deg, #5b7fff, #8c5bff);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(91, 127, 255, 0.35);
}
.demo-tour-btn.primary:hover {
  background: linear-gradient(135deg, #6b8cff, #9a6dff);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(91, 127, 255, 0.45);
}

.demo-tour-disable {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  color: rgba(228, 230, 235, 0.35);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.demo-tour-disable:hover { color: rgba(228, 230, 235, 0.6); }

/* Floating relaunch button: sits just LEFT of the Capture FAB (which is
   pinned at right: 18px), same gradient family, circular "?" */
#demoTourLauncher {
  position: fixed;
  right: 126px;
  bottom: 18px;
  z-index: 990;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #5b7fff, #8c5bff);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(91, 127, 255, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#demoTourLauncher:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(91, 127, 255, 0.55);
}
/* When the Capture FAB is hidden (reporting page, capture mode), slide the
   tutorial button into its spot. */
body.capture-mode #demoTourLauncher,
body:has(.reporting-page) #demoTourLauncher { right: 18px; }
