/* public/onboarding-tour.css
 * Engine styles for the onboarding tour. Loaded as an external stylesheet
 * by every app HTML page; the engine adds elements dynamically and these
 * rules style them. No inline <style> nodes ever — see spec §5.5.
 */

.canopy-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: oklch(0.05 0 0 / 0.55);
  pointer-events: auto;
  /* CSS custom properties set by the engine via element.style.setProperty */
  --spot-x: 0px;
  --spot-y: 0px;
  --spot-w: 0px;
  --spot-h: 0px;
}

.canopy-tour-spotlight {
  position: absolute;
  top: var(--spot-y);
  left: var(--spot-x);
  width: var(--spot-w);
  height: var(--spot-h);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px oklch(0.05 0 0 / 0.55);
  pointer-events: none;
  transition: top .18s ease, left .18s ease, width .18s ease, height .18s ease;
}

.canopy-tour-coachmark {
  position: fixed;
  z-index: 9999;
  max-width: 360px;
  background: oklch(0.16 0.022 163 / 0.95);
  border: 1px solid oklch(0.28 0.03 163 / 0.45);
  border-radius: 14px;
  padding: 18px 20px;
  color: oklch(0.94 0.01 160);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  box-shadow: 0 24px 64px oklch(0 0 0 / 0.45);
  --coach-x: 0px;
  --coach-y: 0px;
  top: var(--coach-y);
  left: var(--coach-x);
}

.canopy-tour-coachmark[hidden] { display: none; }

.canopy-tour-coachmark h3 {
  margin: 0 0 6px;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.canopy-tour-coachmark .progress {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(0.62 0.02 160);
  margin-bottom: 10px;
}

.canopy-tour-coachmark .actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.canopy-tour-coachmark button {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid oklch(0.28 0.03 163 / 0.5);
  background: transparent;
  color: oklch(0.85 0.015 160);
  cursor: pointer;
}

.canopy-tour-coachmark button[data-action="next"],
.canopy-tour-coachmark button[data-action="finish"] {
  background: oklch(0.72 0.19 162);
  color: oklch(0.1 0.02 160);
  border-color: oklch(0.72 0.19 162);
  font-weight: 600;
}

.canopy-tour-coachmark button:focus-visible {
  outline: 2px solid oklch(0.72 0.19 162);
  outline-offset: 2px;
}

/* Wait-card notice shown on the "finish" stop while the first scan is still running. */
.canopy-tour-coachmark .canopy-tour-wait {
  color: oklch(0.65 0.02 160);
  font-size: 13px;
  margin: 12px 0 0;
}

.canopy-tour-scan-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: oklch(0.18 0.022 163 / 0.7);
  border: 1px solid oklch(0.28 0.03 163 / 0.4);
  color: oklch(0.85 0.015 160);
}

.canopy-tour-scan-chip[data-state="error"] { border-color: oklch(0.65 0.22 27 / 0.5); color: oklch(0.78 0.18 27); }
.canopy-tour-scan-chip[data-state="done"]  { border-color: oklch(0.72 0.2 150 / 0.5); color: oklch(0.85 0.16 150); }

@media (max-width: 767px) {
  /* Mobile bottom-sheet fallback per spec §5.9 */
  .canopy-tour-spotlight { display: none; }
  .canopy-tour-coachmark {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    width: 100%;
    border-radius: 18px 18px 0 0;
    padding: 22px 22px 28px;
    transform: none;
  }
}
