/*
 * Tutorial (js/tour.js): spotlight on the explained element, card with the
 * explanation, and the "Tutorial" menu of the site header. Doc: doc/ui/tour.md
 */

.lk-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
}
/* Steps without element (the first one, "Welcome"): the same veil as around a
   highlighted element, and a slight blur */
.lk-tour-overlay.is-veiled {
  background: var(--lk-tour-veil);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* The highlighted element: a hole in a dark veil (huge box-shadow) */
.lk-tour-spotlight {
  position: fixed;
  z-index: 1094;
  border-radius: var(--lk-radius-md);
  box-shadow: 0 0 0 3px var(--lk-color-accent), 0 0 0 9999px var(--lk-tour-veil);
  pointer-events: none;
  transition: left var(--lk-transition-fast), top var(--lk-transition-fast),
              width var(--lk-transition-fast), height var(--lk-transition-fast);
}
.lk-tour-spotlight[hidden] { display: none; }

.lk-tour-card {
  position: fixed;
  z-index: 1095;
  width: min(24rem, calc(100vw - 32px));
  padding: var(--lk-space-4);
  border: 1px solid var(--lk-color-rule);
  border-radius: var(--lk-radius-lg);
  background: var(--lk-color-surface);
  color: var(--lk-color-ink);
  box-shadow: var(--lk-shadow-md);
  animation: lk-tour-in 160ms ease-out;
}
@keyframes lk-tour-in { from { opacity: 0; transform: translateY(4px); } }
.lk-tour-progress {
  margin: 0 0 var(--lk-space-1);
  color: var(--lk-color-accent);
  font-size: var(--lk-font-size-xs);
  font-weight: var(--lk-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lk-tour-card h2 { margin: 0 0 var(--lk-space-2); font-size: 1.05rem; }
.lk-tour-text { margin: 0; color: var(--lk-color-muted); font-size: var(--lk-font-size-sm); line-height: 1.5; }
.lk-tour-actions { display: flex; gap: var(--lk-space-2); margin-top: var(--lk-space-4); }
.lk-tour-skip { margin-right: auto; padding-inline: 0; }

/* Menus opened by a step: above the veil, entries readable. The sticky block
   that holds the menu is a stacking context: it is raised too (lk-tour-raised). */
body.lk-tour-running .dropdown-menu.show { z-index: 1093; }
.lk-tour-raised { z-index: 1093 !important; }
.lk-tour-spotlight.is-under { z-index: 1092; }
.lk-tour-target { outline: 3px solid var(--lk-color-accent); outline-offset: -3px; background: var(--lk-color-accent-soft) !important; }

/* Header: Tutorial menu */
.lk-tour-menu { min-width: 17rem; }

@media (prefers-reduced-motion: reduce) {
  .lk-tour-card { animation: none; }
  .lk-tour-spotlight { transition: none; }
}
