/* Style quiz — multi-step wizard, Waldart-native.
   Built on the brand tokens (tokens.css) and component language (pill buttons,
   brand chip selection, 12px radius, Outfit). 16px root (no 62.5% trick). */

.style-quiz {
  font-family: var(--font);
  color: var(--text-primary);
  padding: 2.5rem 1rem 3.5rem;
}

.style-quiz__shell {
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem 1.75rem;
}

/* ---- Head ---- */
.style-quiz__head { text-align: center; margin-bottom: 1.5rem; }
.style-quiz__eyebrow {
  display: inline-block; font-size: 0.75rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 0.5rem; font-weight: 600;
}
.style-quiz__title {
  font-weight: 600; font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15; color: var(--text-primary); margin: 0 0 0.5rem;
}
.style-quiz__subtitle {
  font-size: 0.95rem; line-height: 1.5; color: var(--text-muted);
  margin: 0 auto; max-width: 40ch;
}

/* ---- Progress ---- */
.style-quiz__progress { margin-bottom: 1.5rem; }
.style-quiz__progress-meta {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.5rem;
}
.style-quiz__progress-label {
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted);
}
.style-quiz__progress-pct { font-size: 0.75rem; font-weight: 700; color: var(--brand); }
.style-quiz__progress-track {
  height: 5px; border-radius: 999px; background: var(--gray-200); overflow: hidden;
}
.style-quiz__progress-bar {
  height: 100%; width: 20%; border-radius: 999px; background: var(--brand);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Steps ---- */
.style-quiz__steps { position: relative; }
.style-quiz__step { border: 0; padding: 0; margin: 0; display: none; }
.style-quiz__step.is-active { display: block; animation: quiz-step-in 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.style-quiz__step.is-leaving { display: block; animation: quiz-step-out 0.24s ease forwards; }
@keyframes quiz-step-in { from { opacity: 0; transform: translateX(1.5rem); } to { opacity: 1; transform: none; } }
@keyframes quiz-step-out { from { opacity: 1; } to { opacity: 0; transform: translateX(-1.5rem); } }

.style-quiz__question {
  font-weight: 600; font-size: 1.2rem; line-height: 1.3; color: var(--text-primary);
  text-align: center; margin: 0 0 1.25rem; padding: 0; width: 100%;
}
.style-quiz__step-hint {
  text-align: center; font-size: 0.9rem; color: var(--text-muted); margin: -0.75rem 0 1.25rem;
}

/* ---- Options ---- */
.style-quiz__options { display: flex; flex-direction: column; gap: 0.6rem; }
.style-quiz__options--grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem;
}
.style-quiz__options--swatches {
  flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 1.25rem;
}

.quiz-option { display: block; cursor: pointer; }
.quiz-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.quiz-option__inner {
  display: flex; align-items: center; gap: 0.7rem; justify-content: center;
  border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 0.85rem 1rem; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  min-height: 56px; text-align: center;
}
.quiz-option--wide .quiz-option__inner { justify-content: flex-start; text-align: left; }
.quiz-option__icon { font-size: 1.4rem; line-height: 1; display: inline-flex; }
.quiz-option__icon svg { width: 26px; height: 26px; display: block; color: var(--text-muted); }
.quiz-option input:checked + .quiz-option__inner .quiz-option__icon svg { color: var(--brand); }
.quiz-option__text { font-size: 0.95rem; font-weight: 500; color: var(--text-primary); }
.quiz-option:hover .quiz-option__inner { border-color: var(--brand-strong); }
.quiz-option input:checked + .quiz-option__inner {
  border-color: var(--brand); background: var(--green-50); box-shadow: 0 0 0 2px var(--green-200);
}
.quiz-option input:focus-visible + .quiz-option__inner { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- Swatches ---- */
.quiz-swatch { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; cursor: pointer; }
.quiz-swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.quiz-swatch__chip {
  width: 56px; height: 56px; border-radius: 50%; background: var(--swatch, var(--brand));
  border: 1px solid rgba(10, 13, 18, 0.12); transition: box-shadow 0.15s, transform 0.15s;
}
.quiz-swatch:hover .quiz-swatch__chip { transform: scale(1.05); }
.quiz-swatch input:checked + .quiz-swatch__chip { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--brand); }
.quiz-swatch input:focus-visible + .quiz-swatch__chip { outline: 2px solid var(--brand); outline-offset: 3px; }
.quiz-swatch__text { font-size: 0.85rem; color: var(--text-muted); }

/* ---- Fields ---- */
.style-quiz__field { margin-bottom: 1rem; text-align: left; }
.style-quiz__label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 0.4rem; }
.style-quiz__input {
  width: 100%; font: inherit; font-size: 1rem; padding: 0.7rem 0.9rem;
  border: 1px solid var(--gray-300); border-radius: 8px; background: var(--surface); box-sizing: border-box;
}
.style-quiz__input:focus { outline: 2px solid var(--green-300); border-color: var(--brand); }
.style-quiz__field--checkbox { display: flex; align-items: flex-start; gap: 0.5rem; }
.style-quiz__checkbox { margin-top: 0.2rem; width: 16px; height: 16px; accent-color: var(--brand); }
.style-quiz__checkbox-label { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; }

.style-quiz__error { color: var(--red-700); font-size: 0.85rem; margin-top: 0.5rem; min-height: 1em; }
.style-quiz__form-error { color: var(--red-700); font-size: 0.9rem; text-align: center; margin-top: 0.75rem; }
.style-quiz__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---- Nav (brand pill buttons) ---- */
.style-quiz__nav { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.style-quiz__btn {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border-radius: var(--radius-pill); padding: 0.7rem 1.6rem; border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.style-quiz__btn--primary { background: var(--brand); color: #fff; margin-left: auto; }
.style-quiz__btn--primary:hover { background: var(--green-600); }
.style-quiz__btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text-primary); }
.style-quiz__btn--ghost:hover { border-color: var(--brand); }
.style-quiz__btn[disabled] { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; }

/* ---- Results ---- */
.style-quiz__results:empty { display: none; }
.style-quiz__results-head { text-align: center; margin-bottom: 1.5rem; }
.style-quiz__results-eyebrow {
  display: inline-block; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-bottom: 0.4rem;
}
.style-quiz__results-title { font-weight: 600; font-size: 1.4rem; color: var(--text-primary); margin: 0; }
.style-quiz__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.style-quiz-card {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface);
  display: flex; flex-direction: column;
}
.style-quiz-card__media { aspect-ratio: 4 / 5; overflow: hidden; }
.style-quiz-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.style-quiz-card__body { padding: 0.85rem; text-align: center; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.style-quiz-card__name { font-weight: 600; font-size: 1rem; color: var(--text-primary); margin: 0; }
.style-quiz-card__collection { font-size: 0.8rem; color: var(--text-muted); margin: -0.25rem 0 0; }
.style-quiz-card__cta {
  margin-top: auto; display: inline-block; font-size: 0.8rem; font-weight: 600; text-decoration: none;
  background: var(--brand); color: #fff; border-radius: var(--radius-pill); padding: 0.55rem 1rem;
}
.style-quiz-card__cta:hover { background: var(--green-600); }

.style-quiz-voucher {
  margin-top: 1.5rem; text-align: center; border: 2px dashed var(--brand);
  border-radius: var(--radius); background: var(--green-50); padding: 1.25rem;
}
.style-quiz-voucher__label {
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 0.5rem;
}
.style-quiz-voucher__code { font-size: 1.6rem; font-weight: 700; letter-spacing: 0.15em; color: var(--brand); }
.style-quiz-voucher__expires { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ---- Thank you ---- */
.style-quiz-thanks { max-width: 600px; margin: 3rem auto; text-align: center; font-family: var(--font); }
.style-quiz-thanks h2 { font-weight: 600; color: var(--text-primary); }
.style-quiz-thanks p { color: var(--text-muted); }

/* ---- Mobile ---- */
@media (max-width: 560px) {
  .style-quiz__shell { padding: 1.5rem 1.1rem; }
  .style-quiz__cards { grid-template-columns: 1fr; gap: 0.75rem; }
  .style-quiz-card { flex-direction: row; }
  .style-quiz-card__media { width: 40%; aspect-ratio: 1; flex-shrink: 0; }
  .style-quiz-card__body { text-align: left; align-items: flex-start; }
}
