/* ===========================================
   AlivioMind - Needs Check Questionnaire Styles
   =========================================== */

/* Base overrides for this specific page */
.needs-check-body {
  background-color: var(--bg-secondary); /* A calming, soft background */
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Simplified Header */
.simplified-header {
  position: relative !important;
  background: white !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 1rem 0 !important;
}

.btn-close {
  padding: 0.5rem 1rem !important;
  font-size: 0.9rem !important;
  border-radius: var(--radius-full) !important;
}

/* Main Container */
.needs-check-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.needs-check-container {
  max-width: 700px;
  width: 100%;
  position: relative;
  min-height: 500px; /* Base height to prevent jumping */
}

/* Step Container */
.needs-check-step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.5s ease-in-out;
  pointer-events: none;
}

.needs-check-step.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Typography Overrides */
.serif-title {
  font-family: "Merriweather", serif; /* Warm, therapeutic serif */
  color: #1a2a35;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.step-content {
  background: white;
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  text-align: center;
}

/* Welcome Screen */
.intro-content .serif-title {
  font-size: 2.2rem;
  color: var(--primary-dark);
}

.intro-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.start-btn {
  padding: 1rem 3rem !important;
  font-size: 1.1rem !important;
}

/* Questions */
.question-number {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

.question-title {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  color: #1a2a35; /* explicit dark — never inherits a faint brand colour */
  font-weight: 700; /* up from 300 — much easier to read */
}


.question-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: -1.5rem;
  margin-bottom: 2rem;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* For 1-5 Scale */
.scale-grid {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.option-btn {
  background: var(--bg-secondary);
  border: 2px solid transparent;
  color: var(--text-secondary);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 500;
  text-align: left;
  transition: all 0.2s ease;
  cursor: pointer;
  width: 100%;
}

.option-btn:hover {
  background: white;
  border-color: var(--primary-light);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.option-btn.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: white;
}

.scale-btn {
  flex: 1;
  aspect-ratio: 1;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scale-btn:hover {
  background: white;
  border-color: var(--primary-light);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.scale-btn.selected {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: white;
}

/* Controls */
.step-controls {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn-back {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
}

.btn-back:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Finish Screen */
.success-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}

.success-icon svg {
  width: 40px;
  height: 40px;
}

.finish-btn {
  margin-top: 1rem;
}

/* Email Capture Form */
.email-capture {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: opacity 0.5s ease;
}
.email-capture.hidden {
  display: none;
  opacity: 0;
}
.email-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  font-size: 1rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.email-input:focus {
  border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .step-content {
    padding: 2rem 1.5rem;
  }

  .intro-content .serif-title {
    font-size: 1.8rem;
  }

  .question-title {
    font-size: 1.4rem;
    font-weight: 700;
  }

  .option-btn {
    padding: 1rem;
    font-size: 0.95rem;
  }
}
