/* styles/survey.css — Survey page styles only */

/* ── Main content area ── */
.survey-main {
  max-width: 860px; margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
}

/* ── Sticky progress bar ── */
.progress-rail {
  position: sticky; top: 0; z-index: 100;
  background: var(--dark2);
  display: flex; align-items: center; gap: 1rem;
  padding: 0.65rem 2rem;
}
.progress-bar {
  flex: 1; height: 3px; border-radius: 3px;
  background: var(--gradient);
  width: 0%; transition: width 0.35s ease;
}
.progress-label {
  font-size: 11px; color: rgba(255,255,255,0.35); white-space: nowrap;
}

/* ── Demographics card ── */
.demo-card { padding: 2.5rem; }
.demo-eyebrow {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--pink); margin-bottom: 0.75rem;
}
.demo-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600; line-height: 1.2;
  color: var(--dark); margin-bottom: 2rem;
}

/* ── Form fields ── */
.field { margin-bottom: 1.5rem; }
.field label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 8px;
}
.req { color: var(--pink); }
.optional { font-size: 10px; color: var(--muted); font-weight: 400;
             text-transform: none; letter-spacing: 0; }
.field input,
.field select {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: var(--font-body);
  color: var(--dark); background: var(--bg);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none; -webkit-appearance: none;
}
.field input:focus,
.field select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(230,0,126,0.1);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: #c62828;
}
.field-error {
  display: block; font-size: 12px; color: #c62828;
  margin-top: 5px; min-height: 18px;
}

/* Select wrapper with chevron */
.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: '▾';
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); pointer-events: none; font-size: 12px;
}
.select-wrap select { padding-right: 36px; }

/* ── Age pill buttons ── */
.pill-group {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.pill-btn {
  padding: 8px 16px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent; font-family: var(--font-body);
  font-size: 13px; color: var(--mid);
  cursor: pointer; transition: all 0.15s;
  min-height: 44px;
}
.pill-btn:hover { border-color: var(--dark); color: var(--dark); }
.pill-btn.pill-active {
  background: linear-gradient(var(--card), var(--card)) padding-box,
              var(--gradient) border-box;
  border: 2px solid transparent;
  color: var(--dark); font-weight: 600;
}

/* ── Demo actions ── */
.demo-actions { margin-top: 2rem; }
.demo-note { font-size: 12px; color: var(--muted); margin-top: 1rem; }

/* ── Page header (category chips + counter) ── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.5rem;
}
.page-cat-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.page-counter { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ── Question card ── */
.qcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.qcard:focus-within { box-shadow: var(--shadow); }
.qcard--done { border-left: 3px solid var(--pink); }
.qcard-head {
  display: flex; gap: 16px; margin-bottom: 1.25rem; align-items: flex-start;
}
.qcard-num {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700; color: var(--muted);
  min-width: 26px; padding-top: 1px; flex-shrink: 0;
}
.qcard-text {
  font-size: 15px; line-height: 1.6; color: var(--dark);
}

/* ── Controls grid ── */
.qcard-controls {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 1.5rem;
  padding-left: 42px;
  margin-top: 1.25rem;
}
.ctrl-group {}
.ctrl-label {
  display: block; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 8px;
}
.ctrl-hint { font-weight: 300; text-transform: none; letter-spacing: 0; font-size: 9px; }

/* ── Yes/No buttons ── */
.yn-group { display: flex; gap: 6px; }
.yn-btn {
  flex: 1; padding: 8px 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: transparent;
  font-size: 13px; font-weight: 500; font-family: var(--font-body);
  color: var(--muted); cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  gap: 5px; white-space: nowrap;
  min-height: 44px; min-width: 44px;
}
.yn-btn:hover { border-color: var(--dark); color: var(--dark); }
.yn-icon { font-size: 11px; }
.yn-yes.yn-active { background: var(--yes-bg); border-color: var(--yes-bd); color: var(--yes-tx); }
.yn-no.yn-active  { background: var(--no-bg);  border-color: var(--no-bd);  color: var(--no-tx); }

/* ── Scale buttons ── */
.scale-group { display: flex; gap: 5px; }
.scale-btn {
  flex: 1; padding: 8px 4px; border-radius: 7px; text-align: center;
  border: 1.5px solid var(--border); background: transparent;
  font-size: 13px; font-weight: 500; font-family: var(--font-body);
  color: var(--muted); cursor: pointer; transition: all 0.15s;
  min-height: 44px; min-width: 44px;
}
.scale-btn:hover { border-color: var(--dark); color: var(--dark); }

/* Urgency active — gradient border */
.scale-btn.scale-u.scale-active {
  background: linear-gradient(var(--card), var(--card)) padding-box,
              var(--gradient) border-box;
  border: 2px solid transparent;
  color: var(--dark); font-weight: 600;
}

/* Importance active */
.scale-btn.scale-i.scale-active {
  background: var(--no-bg); border-color: var(--pink);
  color: var(--no-tx); font-weight: 600;
}

/* ── Quadrant label ── */
.qcard-quadrant {
  margin-top: 10px; padding-left: 42px;
  font-size: 11px; color: var(--pink); font-weight: 500;
  opacity: 0; transition: opacity 0.2s ease;
}
.qcard-quadrant.visible { opacity: 1; }

/* ── Survey navigation bar ── */
.survey-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  gap: 1rem;
}
.nav-info { font-size: 13px; color: var(--muted); text-align: center; }

/* ── Post-submission done screen ── */
.done-card { padding: 2.5rem; text-align: center; margin-bottom: 2rem; }
.done-check {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--yes-bg); color: var(--yes-tx);
  font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.done-title {
  font-family: var(--font-display);
  font-size: 2rem; color: var(--dark); margin-bottom: 0.5rem;
}
.done-sub { font-size: 15px; color: var(--muted); }

/* ── Personal Eisenhower matrix ── */
.matrix-section { margin-bottom: 2.5rem; }
.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem; color: var(--dark); margin-bottom: 0.25rem;
}
.section-title::after {
  content: ''; display: block; margin-top: 6px;
  height: 2px; width: 48px; border-radius: 2px;
  background: var(--gradient);
}
.section-sub { font-size: 13px; color: var(--muted); }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.5rem;
}

.matrix-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 1.25rem;
}
.quad { border-radius: var(--radius); padding: 1.25rem; min-height: 160px; }
.quad-q1 { background: #fff5f5; border: 1px solid #ffcdd2; }
.quad-q2 { background: #f0f4ff; border: 1px solid #bbcfea; }
.quad-q3 { background: #fffde7; border: 1px solid #ffe082; }
.quad-q4 { background: #f1f8e9; border: 1px solid #c5e1a5; }

.quad-header { display: flex; align-items: center; gap: 8px; margin-bottom: 0.75rem; flex-wrap: wrap; }
.quad-tag { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; letter-spacing: 0.06em; }
.quad-q1 .quad-tag { background: #ffcdd2; color: #c62828; }
.quad-q2 .quad-tag { background: #bbdefb; color: #1565c0; }
.quad-q3 .quad-tag { background: #fff176; color: #f57f17; }
.quad-q4 .quad-tag { background: #c5e1a5; color: #2e7d32; }
.quad-header strong { font-size: 13px; font-weight: 600; }
.quad-q1 strong { color: #c62828; }
.quad-q2 strong { color: #1565c0; }
.quad-q3 strong { color: #f57f17; }
.quad-q4 strong { color: #2e7d32; }
.quad-sub { font-size: 10px; color: var(--muted); }
.quad-item {
  font-size: 12px; color: var(--mid); line-height: 1.5;
  padding: 5px 0; border-bottom: 0.5px solid rgba(0,0,0,0.06);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.quad-item:last-child { border-bottom: none; }
.quad-empty { font-size: 12px; color: var(--muted); font-style: italic; }

/* CTA card after matrix */
.cta-card {
  background: var(--gradient);
  border-radius: var(--radius); padding: 2rem;
  text-align: center; margin-top: 1.5rem;
}
.cta-card p { color: rgba(255,255,255,0.85); font-size: 14px; margin-bottom: 1rem; }
.btn-cta-white {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  background: #fff; color: var(--dark); border: none;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: opacity 0.2s; min-height: 44px;
}
.btn-cta-white:hover { opacity: 0.9; }

/* ── Responsive ── */
@media (max-width: 639px) {
  .survey-main { padding: 1.5rem 1rem 4rem; }
  .qcard-controls { grid-template-columns: 1fr; gap: 1rem; padding-left: 0; }
  .qcard-quadrant { padding-left: 0; }
  .matrix-grid { grid-template-columns: 1fr; }
  .survey-nav { flex-direction: column; align-items: stretch; }
  .survey-nav .btn-primary,
  .survey-nav .btn-secondary { justify-content: center; }
  .pill-group { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
}
@media (max-width: 360px) {
  .pill-group { grid-template-columns: 1fr 1fr; }
}
