/* Onboarding tour (onboarding-tour.js), shared by Learny AI and Learny Code.
   Dimmed page, a spotlight around the target with a soft glowing ring, and a
   card that points at it. */
.learny-tour {
  --tour-accent: #3b8cf0;
  --tour-accent-2: #8b7bff;
  --tour-card: #17181e;
  --tour-ink: #f3f4f8;
  --tour-muted: rgba(243, 244, 248, 0.68);
  --tour-line: rgba(255, 255, 255, 0.12);
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  opacity: 0;
  transition: opacity 220ms ease;
}

.learny-tour.is-visible {
  opacity: 1;
}

.learny-tour.is-leaving {
  opacity: 0;
}

.learny-tour-blocker {
  position: absolute;
  inset: 0;
}

.learny-tour-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.learny-tour-dim {
  fill: rgba(6, 8, 14, 0.66);
}

.learny-tour-hole {
  transition: x 320ms cubic-bezier(.2, .8, .2, 1), y 320ms cubic-bezier(.2, .8, .2, 1), width 320ms cubic-bezier(.2, .8, .2, 1), height 320ms cubic-bezier(.2, .8, .2, 1);
}

.learny-tour-ring {
  position: absolute;
  pointer-events: none;
  border: 2px solid var(--tour-accent);
  box-shadow:
    0 0 0 4px rgba(59, 140, 240, 0.22),
    0 0 26px 6px rgba(59, 140, 240, 0.45),
    0 0 60px 12px rgba(139, 123, 255, 0.22);
  transition: left 320ms cubic-bezier(.2, .8, .2, 1), top 320ms cubic-bezier(.2, .8, .2, 1), width 320ms cubic-bezier(.2, .8, .2, 1), height 320ms cubic-bezier(.2, .8, .2, 1);
  animation: learny-tour-glow 2.2s ease-in-out infinite;
}

.learny-tour-ring[hidden] {
  display: none;
}

@keyframes learny-tour-glow {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(59, 140, 240, 0.2), 0 0 22px 4px rgba(59, 140, 240, 0.4), 0 0 50px 10px rgba(139, 123, 255, 0.18);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(59, 140, 240, 0.12), 0 0 34px 10px rgba(59, 140, 240, 0.55), 0 0 76px 18px rgba(139, 123, 255, 0.3);
  }
}

.learny-tour-card {
  position: absolute;
  width: min(340px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 18px 18px 16px;
  border: 1px solid var(--tour-line);
  border-radius: 18px;
  background: var(--tour-card);
  color: var(--tour-ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), inset 0 1px rgba(255, 255, 255, 0.05);
  font-family: inherit;
  outline: none;
  transition: left 320ms cubic-bezier(.2, .8, .2, 1), top 320ms cubic-bezier(.2, .8, .2, 1);
}

.learny-tour-card.is-entering {
  animation: learny-tour-card-in 300ms cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes learny-tour-card-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.learny-tour-arrow {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--tour-card);
  border: 1px solid var(--tour-line);
  transform: rotate(45deg);
  display: none;
}

.learny-tour-card[data-placement="bottom"] .learny-tour-arrow {
  display: block;
  top: -8px;
  margin-left: -7px;
  border-right: 0;
  border-bottom: 0;
}

.learny-tour-card[data-placement="top"] .learny-tour-arrow {
  display: block;
  bottom: -8px;
  margin-left: -7px;
  border-left: 0;
  border-top: 0;
}

.learny-tour-card[data-placement="right"] .learny-tour-arrow {
  display: block;
  left: -8px;
  margin-top: -7px;
  border-top: 0;
  border-right: 0;
}

.learny-tour-card[data-placement="left"] .learny-tour-arrow {
  display: block;
  right: -8px;
  margin-top: -7px;
  border-bottom: 0;
  border-left: 0;
}

.learny-tour-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.learny-tour-step {
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(59, 140, 240, 0.22), rgba(139, 123, 255, 0.22));
  color: #b9d6ff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.learny-tour-skip {
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--tour-muted);
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.learny-tour-skip:hover {
  color: var(--tour-ink);
  background: rgba(255, 255, 255, 0.06);
}

.learny-tour-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.learny-tour-body {
  margin: 0;
  color: var(--tour-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.learny-tour-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.learny-tour-dots {
  display: flex;
  gap: 5px;
}

.learny-tour-dots i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: width 240ms ease, background 240ms ease;
}

.learny-tour-dots i.is-active {
  width: 18px;
  background: linear-gradient(90deg, var(--tour-accent), var(--tour-accent-2));
}

.learny-tour-actions {
  display: flex;
  gap: 8px;
}

.learny-tour-back,
.learny-tour-next {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.learny-tour-back {
  border: 1px solid var(--tour-line);
  background: transparent;
  color: var(--tour-ink);
}

.learny-tour-back[hidden] {
  display: none;
}

.learny-tour-next {
  border: 0;
  background: linear-gradient(135deg, #3b8cf0, #2f74de);
  color: #fff;
  box-shadow: 0 6px 18px rgba(59, 140, 240, 0.35);
}

.learny-tour-back:focus-visible,
.learny-tour-next:focus-visible,
.learny-tour-skip:focus-visible {
  outline: 2px solid #8fc0ff;
  outline-offset: 2px;
}

.learny-tour.is-static,
.learny-tour.is-static * {
  animation: none !important;
  transition: none !important;
}

:root[data-theme="light"] .learny-tour,
html.desktop-glass .learny-tour {
  --tour-card: #ffffff;
  --tour-ink: #14161c;
  --tour-muted: rgba(20, 22, 28, 0.66);
  --tour-line: rgba(20, 30, 50, 0.12);
}

:root[data-theme="light"] .learny-tour-dim,
html.desktop-glass .learny-tour-dim {
  fill: rgba(16, 24, 40, 0.5);
}

:root[data-theme="light"] .learny-tour-step,
html.desktop-glass .learny-tour-step {
  color: #1f5fbf;
}

:root[data-theme="light"] .learny-tour-dots i,
html.desktop-glass .learny-tour-dots i {
  background: rgba(20, 30, 50, 0.16);
}

:root[data-theme="light"] .learny-tour-skip:hover,
html.desktop-glass .learny-tour-skip:hover {
  background: rgba(20, 30, 50, 0.06);
}

html.desktop-glass .learny-tour-card {
  box-shadow: 0 24px 70px rgba(20, 40, 70, 0.28) !important;
}

html.desktop-glass .learny-tour * {
  color: inherit;
}

html.desktop-glass .learny-tour-next {
  color: #fff !important;
}

@media (max-width: 520px) {
  .learny-tour-card {
    padding: 16px;
  }
}

/* Desktop glass forces its own backgrounds; keep the tour's. */
html.desktop-glass .learny-tour-dim {
  fill: rgba(14, 22, 38, 0.6);
}

html.desktop-glass .learny-tour-dots i {
  background: rgba(20, 30, 50, 0.16) !important;
}

html.desktop-glass .learny-tour-dots i.is-active {
  background: linear-gradient(90deg, #3b8cf0, #8b7bff) !important;
}

html.desktop-glass .learny-tour-card,
html.desktop-glass .learny-tour-arrow {
  background: #ffffff !important;
}

html.desktop-glass .learny-tour-step {
  background: linear-gradient(135deg, rgba(59, 140, 240, 0.16), rgba(139, 123, 255, 0.16)) !important;
}

html.desktop-glass .learny-tour-next {
  background: linear-gradient(135deg, #3b8cf0, #2f74de) !important;
}

/* An optional picture or animated example above a step's title. */
.learny-tour-media { margin: 2px 0 12px; }
.learny-tour-media[hidden] { display: none; }
.learny-tour-card.has-media { width: min(440px, calc(100vw - 24px)); }
