/* wizard.css — multi-step form in the WXG language: flat square card, square
 * stepper tiles on a hairline track, amber progress, and the skyline "paint"
 * background kept as a faint graphite line drawing.
 * Loaded LAST so it can override main.css / layout.css where needed. */

:root {
  --accent: var(--wxg-amber, #FCAF17);
  --accent-dark: var(--wxg-amber-dark, #F5AE00);
  --ink: var(--text, #202020);
  --skyline-fill: 0.12;       /* 0..1 — how much of the skyline is "painted in" */
  --stepper-progress: 0%;     /* set by wizard.js */
}

/* ─────────────────────────────────────────────────────────────
   Skyline background — ghost + progressive "paint" reveal (subtle)
   ───────────────────────────────────────────────────────────── */
.bg-skyline {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
}
.skyline-layer {
  position: absolute; inset: 0;
  background-image: url('/assets/chatbot-background.png');
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: cover;
  mix-blend-mode: multiply;   /* white in the PNG drops out; lines stay */
}
.skyline-ghost { opacity: 0.08; filter: grayscale(1); }
.skyline-fill {
  opacity: 0.35;
  filter: grayscale(1) contrast(1.4);
  clip-path: inset(0 0 0 calc((1 - var(--skyline-fill)) * 100%));
  transition: clip-path 1.1s cubic-bezier(.22,1,.36,1);
}
/* amber "paint edge" that rides the reveal boundary */
.bg-skyline::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 2px;
  left: calc((1 - var(--skyline-fill)) * 100%);
  background: linear-gradient(180deg, transparent, rgba(252,175,23,0.7), transparent);
  transition: left 1.1s cubic-bezier(.22,1,.36,1), opacity .4s;
  opacity: var(--edge-opacity, .85);
}

/* ─────────────────────────────────────────────────────────────
   Card (overrides main.css .container) — flat, square, no tilt
   ───────────────────────────────────────────────────────────── */
.container {
  position: relative;
  max-width: 780px; width: 100%;
  margin: auto;            /* centered both axes inside the flex #mainContent */
  padding: 36px 40px 30px;
  background: var(--paper, #fff);
  border: 0;
  border-radius: 0;
  box-shadow: var(--shadow-2, 0 2px 10px rgba(0,0,0,0.08));
  transform: none;
}

/* ─────────────────────────────────────────────────────────────
   Stepper — square tiles
   ───────────────────────────────────────────────────────────── */
.wizard-stepper {
  position: relative;
  display: flex; justify-content: space-between; align-items: flex-start;
  margin: 4px 0 34px; padding: 0 6px;
}
/* the connecting track + progress fill (RTL: fills from the right) */
.wizard-stepper::before,
.wizard-stepper::after {
  content: ""; position: absolute; top: 17px; height: 2px; border-radius: 0;
  left: 28px; right: 28px;
}
.wizard-stepper::before { background: var(--border, #D9D9D9); }
.wizard-stepper::after {
  left: auto; right: 28px; width: var(--stepper-progress);
  background: var(--accent);
  transition: width .6s cubic-bezier(.22,1,.36,1);
}
.wz-node {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex: 1; min-width: 0; cursor: default;
}
.wz-dot {
  width: 36px; height: 36px; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 400; font-size: 0.95rem;
  background: var(--paper, #fff); color: var(--text-secondary, #606060);
  border: 2px solid var(--border, #D9D9D9);
  transition: background .25s, color .25s, border-color .25s;
}
.wz-label {
  font-size: 0.8rem; font-weight: 400; color: var(--text-muted, #808080);
  white-space: nowrap; transition: color .25s;
}
/* done */
.wz-node.is-done .wz-dot {
  background: var(--wxg-graphite, #4D4D4D); color: #fff; border-color: var(--wxg-graphite, #4D4D4D);
}
.wz-node.is-done .wz-dot::after { content: "✓"; font-size: 1rem; }
.wz-node.is-done .wz-dot .wz-num { display: none; }
.wz-node.is-done .wz-label { color: var(--text, #202020); }
/* active */
.wz-node.is-active .wz-dot {
  background: var(--accent); color: var(--text, #202020); border-color: var(--accent);
}
.wz-node.is-active .wz-label { color: var(--ink); font-weight: 600; }

/* ─────────────────────────────────────────────────────────────
   Steps + transitions
   ───────────────────────────────────────────────────────────── */
.wizard-viewport { position: relative; min-height: 300px; }
.wizard-step { display: none; }
.wizard-step.is-active { display: block; animation: stepIn .35s ease-out both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.step-head { margin-bottom: 26px; }
.step-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 400; color: var(--text-secondary, #606060);
  background: none; padding: 0; border-radius: 0;
}
.step-kicker::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.step-title { margin: 8px 0 4px; font-size: 1.55rem; font-weight: 300; color: var(--ink); }
.step-sub { margin: 0; color: var(--text-secondary, #606060); font-size: 0.95rem; }

/* ─────────────────────────────────────────────────────────────
   Navigation buttons — square (primary amber / secondary framed)
   ───────────────────────────────────────────────────────────── */
.wizard-nav {
  display: flex; align-items: center; gap: 14px;
  margin-top: 30px; padding-top: 22px;
  border-top: 1px solid var(--divider, #E9E9E9);
}
.wz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 150px; min-height: 48px; padding: 10px 28px; border-radius: 0;
  font-size: 1rem; font-weight: 400; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, border-color .15s;
}
.wz-arrow { font-size: 1.1em; line-height: 1; }

/* previous — secondary */
.wz-prev { background: var(--paper, #fff); color: var(--ink); border-color: var(--border-strong, #CDCDCD); }
.wz-prev:hover { border-color: var(--wxg-graphite, #4D4D4D); }

/* next / submit — primary amber; pushed to the forward (left) edge in RTL */
.wz-next, .wz-submit { margin-inline-start: auto; }
.wz-next, .wizard-nav .submit-btn {
  background: var(--accent); border-color: var(--accent); color: var(--ink);
  box-shadow: none; width: auto; min-width: 150px; padding: 10px 32px;
}
.wz-next:hover, .wizard-nav .submit-btn:hover {
  background: var(--accent-dark); border-color: var(--accent-dark);
}

/* ─────────────────────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { margin: 0; padding: 24px 18px; }
  .wz-label { display: none; }
  .wz-dot { width: 30px; height: 30px; font-size: 0.85rem; }
  .wizard-stepper::before, .wizard-stepper::after { top: 14px; }
  .step-title { font-size: 1.3rem; }
  .wizard-nav { flex-wrap: wrap; }
  .wz-btn { min-width: 0; flex: 1; }
}

/* ─────────────────────────────────────────────────────────────
   Reduced motion
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .skyline-fill, .bg-skyline::after, .wizard-stepper::after,
  .wizard-step.is-active, .wz-dot, .container { transition: none; animation: none; }
  .spinner { animation: none; }
}
