/* ── quiz.css ── */

.quiz-page {
  background: var(--canvas);
  min-height: 100svh;
}

/* Progress bar */
.quiz-progress {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  z-index: 50;
}

.quiz-progress__bar {
  height: 100%;
  background: var(--gold);
  transition: width 400ms cubic-bezier(.4,0,.2,1);
  width: 0%;
}

/* Meta row */
.quiz-meta {
  position: fixed;
  top: calc(var(--nav-height) + 3px);
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-6);
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
}

.quiz-step-label {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  font-weight: 500;
}

/* Shell */
.quiz-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--nav-height) + 52px); /* nav + meta row */
}

/* Stage -- full screen question area */
.quiz-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  position: relative;
  overflow: hidden;
}

/* Individual question */
.quiz-q {
  width: 100%;
  max-width: 640px;
  animation: qIn 350ms cubic-bezier(.4,0,.2,1);
}

.quiz-q.hidden {
  display: none;
}

.quiz-q.exiting {
  animation: qOut 250ms cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes qIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes qOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-40px);
  }
}

.quiz-q .eyebrow {
  margin-bottom: var(--space-3);
}

.quiz-q__text {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  margin-bottom: var(--space-8);
  line-height: 1.2;
}

/* Options */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.q-choice {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  text-align: left;
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--ink-soft);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  transition: all 200ms ease;
  line-height: 1.4;
  font-family: var(--font-body);
}

.q-choice:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: var(--gold-light);
  transform: translateX(4px);
}

.q-choice.selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
  transform: translateX(4px);
}

/* Loading state */
.quiz-loading {
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.quiz-loading.show-flex {
  display: flex !important;
}

.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-label {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  animation: labelCycle 3s ease infinite;
}

/* Vibe dropdown */
.vibe-dropdown-wrapper {
  position: relative;
  margin-bottom: var(--space-6);
}

.vibe-dropdown-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 200ms ease;
  font-family: var(--font-body);
}

.vibe-dropdown-trigger:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: var(--gold-light);
}

.vibe-dropdown-trigger.open {
  border-color: var(--gold);
  color: var(--ink);
}

.vibe-dropdown-arrow {
  font-size: 12px;
  transition: transform 200ms ease;
}

.vibe-dropdown-trigger.open .vibe-dropdown-arrow {
  transform: rotate(180deg);
}

.vibe-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  max-height: 0;
  overflow: hidden;
  transition: max-height 200ms ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.vibe-dropdown-menu.open {
  max-height: 360px;
  overflow-y: auto;
}

.vibe-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  cursor: pointer;
  transition: background 150ms ease;
  border-bottom: 1px solid #f5f3f0;
  font-size: var(--text-base);
  color: var(--ink-soft);
  background: var(--white);
}

.vibe-checkbox:last-child {
  border-bottom: none;
}

.vibe-checkbox:hover {
  background: #faf8f5;
  color: var(--ink);
}

.vibe-checkbox input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
  .vibe-dropdown-menu.open { max-height: 280px; }
}

/* ── Form Fields ── */
.form-field {
  position: relative;
  margin-bottom: 20px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.form-input::placeholder {
  color: var(--ink-muted);
}

.form-input--error {
  border-color: #dc2626;
  background-color: rgba(220, 38, 38, 0.05);
}

.form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input--instagram {
  padding-left: 32px;
}

.instagram-prefix {
  position: absolute;
  left: 16px;
  top: 14px;
  color: var(--ink-muted);
  font-weight: 600;
  pointer-events: none;
}

.quiz-subtext {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
