/* ============================================================
   PayClear — Survey page styles
   Branded multi-question form for HR leaders / Heads of People.
   ============================================================ */

.survey-page {
  padding: 130px 24px 80px;
  max-width: 760px;
  margin: 0 auto;
}

.survey-intro {
  text-align: center;
  margin-bottom: 48px;
}
.survey-intro .live-badge { margin-bottom: 22px; }
.survey-intro h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}
.survey-intro h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-light), #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.survey-intro p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 580px;
  margin: 0 auto;
}
.survey-intro .meta-row {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.survey-intro .meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.survey-intro .meta-row strong {
  color: var(--text-primary);
  font-weight: 700;
}
.survey-intro .meta-divider {
  width: 1px;
  height: 14px;
  background: var(--border);
}

/* Progress bar */
.survey-progress {
  position: sticky;
  top: 84px;
  z-index: 50;
  background: rgba(250, 251, 253, 0.85);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}
.survey-progress-text {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.survey-progress-text strong {
  color: var(--accent);
  font-weight: 700;
}
.survey-progress-track {
  flex: 1;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 100px;
  overflow: hidden;
}
.survey-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 100px;
  width: 0%;
  transition: width 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Survey form */
.survey-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.q-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.q-card.is-answered {
  border-color: var(--border-accent);
}
.q-card.is-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}
.q-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.q-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.q-required {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.q-required.is-required { color: var(--accent); }
.q-title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}
.q-hint {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* Single-select / multi-select option list */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.option-list.is-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s;
  font-size: 0.92rem;
  color: var(--text-primary);
  user-select: none;
}
.option:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}
.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.option-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-secondary);
  flex-shrink: 0;
  position: relative;
  transition: all 0.18s;
}
.option[data-type="multi"] .option-marker {
  border-radius: 5px;
}
.option-marker::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}
.option[data-type="multi"] .option-marker::after {
  width: 5px;
  height: 9px;
  border-radius: 0;
  background: transparent;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-1px, -1px);
}
.option.is-selected {
  border-color: var(--accent);
  background: var(--accent-surface);
  color: var(--text-primary);
}
.option.is-selected .option-marker {
  background: var(--accent);
  border-color: var(--accent);
}
.option.is-selected .option-marker::after {
  opacity: 1;
}
.option-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}
.option.is-selected .option-meta {
  color: var(--accent);
  font-weight: 700;
}

/* Pricing options */
.option.option-pricing {
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 18px;
  gap: 8px;
}
.option.option-pricing .option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.option.option-pricing .option-price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.option.option-pricing .option-tier {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.option.option-pricing.is-selected .option-tier {
  color: var(--accent);
}

/* Free-text textarea */
.q-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 110px;
  resize: vertical;
  transition: all 0.18s;
}
.q-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.q-textarea::placeholder { color: var(--text-muted); }
.q-counter {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Email row */
.q-email {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.q-email input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all 0.18s;
}
.q-email input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Submit row */
.survey-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 22px 28px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}
.survey-submit-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.survey-submit-info strong {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.survey-submit-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.survey-submit .btn-primary {
  font-size: 0.95rem;
  padding: 14px 32px;
}

/* Error message under invalid q */
.q-error-msg {
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--red-surface);
  border: 1px solid var(--red-border);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--red);
  display: none;
}
.q-card.is-error .q-error-msg { display: block; }

@media (max-width: 720px) {
  .survey-page { padding: 110px 18px 60px; }
  .q-card { padding: 22px 20px 20px; }
  .survey-submit { flex-direction: column; align-items: stretch; }
  .survey-submit .btn-primary { width: 100%; }
  .survey-progress { top: 78px; }
  .survey-intro .meta-row { gap: 10px; padding: 8px 14px; }
  .survey-intro .meta-divider { display: none; }
}
