/* ============================================================
   FutureU — survey.css
   Styles for the multi-step survey page
   Used by: survey.html only
   ============================================================ */

/* ── Intro screen ───────────────────────────────────────────── */
.survey-intro {
  max-width: 520px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  text-align: center;
}

.intro-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-dark);
  background: var(--brand-light);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.intro-title {
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.4px;
}

.intro-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 8px;
}

.intro-note {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}



/* ── Survey wrapper ─────────────────────────────────────────── */
.survey-wrapper {
  max-width: 580px;
  margin: 0 auto;
  padding: 36px 24px 80px;
  min-height: 70vh;
}

/* ── Progress bar ───────────────────────────────────────────── */
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.progress-bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 4px;
  background: var(--brand);
  border-radius: var(--radius-pill);
  width: 0%;
  transition: width 0.35s ease;
}

.progress-label {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Step visibility ────────────────────────────────────────── */
.survey-step {
  display: none;
}

.survey-step.active {
  display: block;
  animation: fadeSlideIn 0.22s ease both;
}

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

/* ── Step header ────────────────────────────────────────────── */
.step-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-dark);
  background: var(--brand-light);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.step-question {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.step-hint {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 22px;
}

/* ── Options grids ──────────────────────────────────────────── */
.options-grid {
  margin-bottom: 28px;
}

.options-single-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.options-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ── Option card ────────────────────────────────────────────── */
.option-card {
  cursor: pointer;
  display: block;
}

.option-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 16px;
  background: var(--bg-primary);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s, background 0.15s;
  min-height: 50px;
  justify-content: center;
}

.option-card:hover .option-inner {
  border-color: var(--brand);
}

.option-card input:checked + .option-inner {
  border: 2px solid var(--brand);
  background: var(--brand-light);
}

.option-card input:checked + .option-inner .option-title {
  color: var(--brand-dark);
}

.option-card input:checked + .option-inner .option-sub {
  color: var(--brand-dark);
}

.option-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
}

.option-sub {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── Scale slider ───────────────────────────────────────────── */
.scale-step {
  margin-bottom: 28px;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.scale-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border-mid);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
}

.scale-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.scale-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.scale-value-display {
  text-align: center;
  font-size: 28px;
  font-weight: 500;
  color: var(--brand);
  margin-top: 14px;
}

/* ── Textarea ───────────────────────────────────────────────── */
.text-step {
  margin-bottom: 28px;
}

.form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  outline: none;
  resize: vertical;
  line-height: 1.6;
  transition: border-color 0.15s;
}

.form-textarea:focus {
  border-color: var(--brand);
}

.form-textarea::placeholder {
  color: var(--text-tertiary);
}

/* ── Select dropdown ────────────────────────────────────────── */
.form-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%239c9a92' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ── Email step ─────────────────────────────────────────────── */
.email-step {
  margin-bottom: 28px;
}

.email-note {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 8px;
  line-height: 1.5;
}

.field-error {
  font-size: 11px;
  color: #A32D2D;
  margin-top: 5px;
  min-height: 16px;
}

/* ── Survey nav buttons ─────────────────────────────────────── */
.survey-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 0.5px solid var(--border-subtle);
  margin-top: 4px;
}

.survey-nav #btn-back:disabled {
  opacity: 0;
  pointer-events: none;
}

/* ── Loading state ──────────────────────────────────────────── */
.survey-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  min-height: 50vh;
}

.survey-loading.active {
  display: flex;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-secondary);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

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

.loading-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.loading-sub {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .options-two-col { grid-template-columns: 1fr; }
  .step-question { font-size: 18px; }
  .survey-wrapper { padding: 24px 16px 80px; }
  .intro-title { font-size: 22px; }

  /* ── Sticky bottom nav on mobile ─── */
  .survey-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 0.5px solid var(--border-subtle);
    padding: 12px 20px;
    margin-top: 0;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  }

  .survey-nav #btn-next,
  .survey-nav #btn-back { min-height: 46px; font-size: 15px; }

  /* ── Option cards — taller tap targets ─── */
  .option-inner { padding: 13px 16px; min-height: 50px; }

  /* ── Progress bar ─── */
  .progress-bar-wrap { padding: 14px 20px 10px; }
}