/* =============================================
   WithAChoice — questionnaire.css
   Depends on style.css being loaded first
   ============================================= */

/* LAYOUT */
.q-main {
  min-height: calc(100vh - 70px);
  background: #f7f9fc;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem 4rem;
}

.q-container {
  width: 100%;
  max-width: 600px;
}

/* SCREENS */
.q-screen {
  display: none;
}

.q-screen.active {
  display: block;
}

/* BACK BUTTON */
.back-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.back-btn:hover {
  color: #185FA5;
}

/* PROGRESS BAR */
.progress-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 1.5rem;
}

.progress-dot {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: #d1d5db;
  transition: background 0.2s;
}

.progress-dot.done {
  background: #185FA5;
}

.progress-dot.active {
  background: #185FA5;
  opacity: 0.4;
}

/* QUESTION LABELS & TITLES */
.q-label {
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.q-title {
  font-size: 1.75rem;
  font-weight: 500;
  color: #111827;
  margin: 0 0 1.375rem;
  line-height: 1.3;
}

.q-sub {
  font-size: 1rem;
  color: #6b7280;
  margin: -0.75rem 0 1.375rem;
}

/* ENTRY SCREEN */
#screen-entry {
  text-align: center;
}

.entry-badge {
  display: inline-block;
  background: #EEF5FC;
  color: #185FA5;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.entry-title {
  font-size: 1.875rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.625rem;
  line-height: 1.3;
}

.entry-sub {
  font-size: 1.0625rem;
  color: #6b7280;
  margin: 0 0 2rem;
  line-height: 1.6;
}

/* PATH CARDS */
.path-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 1.25rem;
}

.path-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.375rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.path-card:hover {
  border-color: #185FA5;
  box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.08);
}

.path-card {
  text-align: center;
}

.path-icon {
  width: 44px;
  height: 44px;
  background: #EEF5FC;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: #185FA5;
}

.path-icon svg {
  width: 22px;
  height: 22px;
}

.path-card h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 6px;
}

.path-card p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* BROWSE OR DIVIDER + PANEL */
.browse-or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.25rem 0 0.875rem;
}

.browse-or-line {
  flex: 1;
  height: 1px;
  background: #e5e7eb;
  display: block;
}

.browse-or-text {
  font-size: 0.8125rem;
  color: #9ca3af;
  font-weight: 500;
}

.browse-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.15s;
}

.browse-panel:hover {
  border-color: #b5d4f4;
}

.browse-panel-text {
  font-size: 0.875rem;
  color: #9ca3af;
  line-height: 1.5;
  text-align: left;
}

.browse-panel-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #185FA5;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.browse-panel-link:hover {
  text-decoration: underline;
}

/* FREE TEXT */
.ft-example {
  font-size: 0.9375rem;
  color: #9ca3af;
  font-style: italic;
  margin: -0.5rem 0 1rem;
  line-height: 1.5;
}

.ft-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 110px;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #111827;
  background: #ffffff;
  resize: none;
  line-height: 1.6;
  transition: border-color 0.15s;
}

.ft-textarea:focus {
  outline: none;
  border-color: #185FA5;
  box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.1);
}

.ft-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.char-count {
  font-size: 0.75rem;
  color: #9ca3af;
}

.ft-status {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.75rem;
  min-height: 1.25rem;
}

.ft-followup {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.followup-question {
  font-size: 1rem;
  font-weight: 500;
  color: #111827;
  margin: 0 0 1rem;
  line-height: 1.5;
}

/* OPTION CARDS */
.option-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.option-grid.two-col {
  grid-template-columns: 1fr 1fr;
}

.option-grid.three-col {
  grid-template-columns: 1fr 1fr 1fr;
}

.option-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s, background 0.15s;
  font-size: 1rem;
  color: #111827;
}

.option-card:hover {
  border-color: #185FA5;
  background: #EEF5FC;
}

.option-card.selected {
  border-color: #185FA5;
  background: #EEF5FC;
  color: #185FA5;
}

.option-title {
  font-weight: 500;
  font-size: 1rem;
}

.option-sub {
  font-size: 0.875rem;
  color: #6b7280;
}

.option-card.selected .option-sub {
  color: #185FA5;
  opacity: 0.8;
}

/* STEPPER */
.stepper-group {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.stepper-row:last-child {
  border-bottom: none;
}

.stepper-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stepper-name {
  font-size: 1.0625rem;
  font-weight: 500;
  color: #111827;
}

.stepper-sub {
  font-size: 0.875rem;
  color: #9ca3af;
}

.stepper-ctrl {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stepper-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.stepper-btn:hover {
  border-color: #185FA5;
  background: #EEF5FC;
  color: #185FA5;
}

.stepper-val {
  font-size: 1.125rem;
  font-weight: 500;
  color: #111827;
  min-width: 20px;
  text-align: center;
}

.drum-hint {
  background: #EEF5FC;
  color: #185FA5;
  font-size: 0.875rem;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* PRIORITY LIST */
.priority-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1.5rem;
}

.priority-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 11px 14px;
  cursor: default;
}

.priority-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #185FA5;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.priority-name {
  flex: 1;
  font-size: 1rem;
  color: #111827;
}

.priority-arrows {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.arrow-btn {
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  width: 22px;
  height: 19px;
  cursor: pointer;
  font-size: 0.625rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, border-color 0.1s;
  font-family: inherit;
}

.arrow-btn:hover {
  background: #EEF5FC;
  border-color: #185FA5;
  color: #185FA5;
}

/* FEATURE GRID */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.feature-btn {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 1rem;
  color: #374151;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.feature-btn:hover {
  border-color: #185FA5;
  background: #f8fbff;
}

.feature-btn.selected {
  border-color: #185FA5;
  background: #EEF5FC;
  color: #185FA5;
  font-weight: 500;
}

/* PRIMARY BUTTON */
.primary-btn {
  background: #185FA5;
  color: #ffffff;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1.0625rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.primary-btn:hover {
  background: #0C447C;
}

/* LOADING SCREEN */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 0;
  gap: 1.25rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #EEF5FC;
  border-top-color: #185FA5;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-size: 1.0625rem;
  color: #6b7280;
  margin: 0;
}

/* RESPONSIVE */
@media (max-width: 520px) {
  .path-grid {
    grid-template-columns: 1fr;
  }

  .option-grid.three-col {
    grid-template-columns: 1fr 1fr;
  }

  .q-title {
    font-size: 1.375rem;
  }

  .entry-title {
    font-size: 1.5rem;
  }
}
