/* wa-lint: skip */
/* ==== Scene navigation framework ==========================================
   Each .scene fills 100dvh. Scenes sit in a horizontal track that translates
   on prev/next. Body class .scenes-active disables global scrolling so the
   stage feels like a single continuous canvas.

   Tokens come from cd-app.css (--bg, --primary, --accent, --line, …).
=========================================================================== */

/* While we are in scene mode the document doesn't scroll vertically; we
   manage scene transitions ourselves. Reduced motion users get an instant
   step instead of a slide. */
body.scenes-active {
  overflow: hidden;
  overscroll-behavior: none;
}

.scenes {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

.scenes__track {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* Vertical axis variant — opt-in via [data-scene-axis="y"] on .scenes */
.scenes[data-scene-axis="y"] .scenes__track {
  flex-direction: column;
}

.scene {
  flex: 0 0 100%;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scroll-snap-align: start;
}

.scene__inner {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Allow individual scenes to be vertically scrollable if their content
   genuinely overflows. Default is no scroll. */
.scene--scrollable .scene__inner {
  overflow-y: auto;
}

/* ─── Navigation chrome ─── */
.scene-nav {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.scene-nav.is-visible { opacity: 1; }
.scene-nav.is-visible > * { pointer-events: auto; }

/* Hide scene-nav on hero — the 3 vejvalg-buttons own that affordance.
   Scene-nav reappears on manifest + nyheder where there are no exits. */
body[data-active-scene="hero"] .scene-nav {
  display: none;
}

/* Progress label "01 / 03 · Hovedindgang" */
.scene-nav__progress {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, rgb(100, 116, 139));
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border, rgb(226, 232, 240));
  padding: 10px 16px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
  line-height: 1;
}
.scene-nav__progress strong {
  color: var(--primary, rgb(49, 79, 89));
  font-weight: 700;
}

/* Next + prev buttons */
.scene-nav__btn {
  /* wa-button appearance=plain override - se .topbar__iconbtn for kontekst. */
  --wa-color-on-quiet: rgb(255, 255, 255);
  --wa-color-neutral-on-quiet: rgb(255, 255, 255);
  --wa-color-fill-quiet: transparent;
  --wa-color-neutral-fill-quiet: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent, rgb(184, 90, 58));
  color: rgb(255, 255, 255);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 22px -8px rgba(184, 90, 58, 0.45);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s ease;
}
.scene-nav__btn:hover {
  background: var(--accent-hover, rgb(154, 72, 48));
  transform: translateY(-1px);
}
.scene-nav__btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}
.scene-nav__btn[hidden] {
  display: none !important;
}
.scene-nav__btn--ghost {
  --wa-color-on-quiet: var(--primary, rgb(49, 79, 89));
  --wa-color-neutral-on-quiet: var(--primary, rgb(49, 79, 89));
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary, rgb(49, 79, 89));
  border-color: var(--line, rgb(226, 232, 240));
  box-shadow: 0 4px 14px -6px rgba(49, 79, 89, 0.18);
}
.scene-nav__btn--ghost:hover {
  background: rgb(255, 255, 255);
  color: var(--accent, rgb(184, 90, 58));
  border-color: var(--accent, rgb(184, 90, 58));
}
.scene-nav__btn svg { width: 14px; height: 14px; }

[data-theme="dark"] .scene-nav__progress {
  background: rgba(15, 27, 31, 0.78);
  color: var(--ink, rgb(232, 238, 240));
  border-color: var(--line, rgb(38, 56, 64));
}
[data-theme="dark"] .scene-nav__progress strong {
  color: rgb(255, 255, 255);
}
[data-theme="dark"] .scene-nav__btn--ghost {
  background: rgba(15, 27, 31, 0.85);
  color: var(--ink, rgb(232, 238, 240));
  border-color: var(--line, rgb(38, 56, 64));
}

/* ─── Reduced motion: instant transitions ─── */
@media (prefers-reduced-motion: reduce) {
  .scenes__track { transition: none; }
  .scene-nav { transition: none !important; }
  .scene-nav__btn,
  .scene-nav__btn:hover { transition: none !important; transform: none !important; }
}

/* ─── Mobile tweaks ─── */
@media (max-width: 600px) {
  .scene-nav { gap: 10px; bottom: max(14px, env(safe-area-inset-bottom)); }
  .scene-nav__progress { padding: 6px 12px; font-size: 11px; }
  .scene-nav__btn { padding: 9px 14px; font-size: 13px; }

  /* Topbar gets crowded under 600px — shrink the CTA. */
  .topbar__inner { padding: 12px 14px; gap: 12px; }
  .topbar__cta { padding: 8px 14px; font-size: 13px; white-space: nowrap; }
  .topbar__logo-pill { padding: 0 12px; font-size: 15px; }
}

/* ─── Placeholder overlay card ─────────────────────────────────────────────
   Reuses .palette / .palette__backdrop / .palette__rings from cd-app.css so
   the placeholders look like the playful Claude Design overlays.
=========================================================================== */
.palette.is-open .standkort-placeholder__card {
  transform: scale(1);
  opacity: 1;
}
