/* Assessment Form Styles */

.assessment-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* Step Progress Bar */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1.5rem 0 0.5rem;
  margin-bottom: 1.5rem;
}
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  background: var(--hf-light); color: var(--hf-muted);
  border: 2px solid #d0d9e6;
  transition: all var(--transition);
  flex-shrink: 0;
  position: relative;
}
.step-dot.active {
  background: var(--hf-blue); color: var(--hf-white);
  border-color: var(--hf-blue);
}
.step-dot.completed {
  background: #166534; color: var(--hf-white);
  border-color: #166534;
}
.step-connector {
  flex: 1; height: 2px;
  background: #d0d9e6;
  margin: 0 4px;
  max-width: 48px;
  transition: background var(--transition);
}
.step-connector.completed {
  background: #166534;
}

/* Step Label */
.step-label {
  text-align: center;
  font-size: 0.75rem;
  color: var(--hf-muted);
  margin-bottom: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Form Card */
.form-card {
  background: var(--hf-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1.5px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}
.form-card h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--hf-text);
  margin-bottom: 0.25rem;
}
.form-card .form-subtitle {
  font-size: 0.82rem;
  color: var(--hf-muted);
  margin-bottom: 1.25rem;
}

/* Form Fields */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group:last-child {
  margin-bottom: 0;
}
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--hf-text);
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--hf-text);
  background: var(--hf-white);
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--hf-blue);
  box-shadow: 0 0 0 3px rgba(0,87,179,0.1);
}
.form-input::placeholder {
  color: #a0b3cc;
}
.form-helper {
  display: block;
  font-size: 0.75rem;
  color: var(--hf-muted);
  margin-top: 0.25rem;
}
.form-input-wrap {
  position: relative;
}
.form-input-wrap .form-input {
  padding-right: 3.2rem;
}
.form-input-right {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  color: var(--hf-muted);
  font-weight: 600;
  pointer-events: none;
}

/* Two-column layout */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 420px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Toggle Buttons */
.toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.toggle-btn {
  padding: 0.7rem 0.5rem;
  border: 2px solid #d0d9e6;
  border-radius: var(--radius-sm);
  background: var(--hf-white);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--hf-muted);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toggle-btn:active {
  transform: scale(0.97);
}
.toggle-btn.selected {
  border-color: var(--hf-blue);
  background: #eef4ff;
  color: var(--hf-blue);
}

/* Selection Cards */
.selection-card {
  padding: 1rem 1.25rem;
  border: 2px solid #d0d9e6;
  border-radius: var(--radius-sm);
  background: var(--hf-white);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.selection-card:active {
  transform: scale(0.98);
}
.selection-card.selected {
  border-color: var(--hf-blue);
  background: #eef4ff;
}
.selection-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--hf-text);
}
.selection-card-desc {
  font-size: 0.78rem;
  color: var(--hf-muted);
  margin-top: 0.15rem;
}

/* Segmented Control (Unit toggle) */
.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--hf-light);
  border-radius: 99px;
  padding: 4px;
  width: 100%;
}
.segmented-btn {
  padding: 0.6rem 0.5rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hf-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  min-height: 40px;
}
.segmented-btn.active {
  background: var(--hf-white);
  color: var(--hf-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* BMI Result Tile */
.bmi-tile {
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  margin-top: 0.5rem;
}
.bmi-tile-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--hf-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.bmi-tile-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0.25rem 0;
}
.bmi-tile-badge {
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
}
.bmi-placeholder {
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  background: var(--hf-light);
  color: var(--hf-muted);
  font-size: 0.82rem;
}
.bmi-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 0.75rem 0;
}

/* Info Tip Box */
.tip-box {
  background: #eef4ff;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  color: #4338ca;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Reference Ranges */
.ref-box {
  background: var(--hf-light);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  color: var(--hf-text);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.ref-box strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}
.ref-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ref-box ul li {
  padding: 0.15rem 0;
}

/* Footer Navigation */
.assessment-footer {
  background: var(--hf-white);
  border-top: 1px solid #f1f5f9;
  padding: 1.25rem 1.5rem;
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.assessment-footer .btn-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.assessment-footer .btn-row .btn {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  min-height: 48px;
}

/* Steps (show/hide) */
.assessment-step {
  display: none;
}
.assessment-step.active {
  display: block;
}

/* Result Page */
.result-header {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}
.result-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--hf-text);
  margin-bottom: 0.5rem;
}
.result-header .result-date {
  font-size: 0.82rem;
  color: var(--hf-muted);
}

/* Risk Level Badge */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: 99px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 1rem 0;
}
.risk-badge.low {
  background: #f0fdf4;
  color: #15803d;
  border: 2px solid #bbf7d0;
}
.risk-badge.moderate {
  background: #fffbeb;
  color: #b45309;
  border: 2px solid #fde68a;
}
.risk-badge.high {
  background: #fef2f2;
  color: #b91c1c;
  border: 2px solid #fecaca;
}

/* Status Grid */
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
@media (max-width: 480px) {
  .status-grid {
    grid-template-columns: 1fr;
  }
}
.status-item {
  background: var(--hf-white);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  border: 1.5px solid rgba(0,0,0,0.06);
}
.status-item-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hf-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}
.status-item-value {
  font-size: 0.95rem;
  font-weight: 700;
}
.status-item-value.normal { color: #15803d; }
.status-item-value.elevated { color: #b45309; }
.status-item-value.high { color: #b91c1c; }
.status-item-value.borderline { color: #b45309; }
.status-item-value.low { color: #b91c1c; }
.status-item-value.overweight { color: #b45309; }
.status-item-value.obese { color: #b91c1c; }
.status-item-value.prediabetes { color: #b45309; }
.status-item-value.diabetes { color: #b91c1c; }
.status-item-value.trace { color: #b45309; }
.status-item-value.present { color: #b91c1c; }

.result-actions {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.result-actions .btn {
  min-height: 48px;
  padding: 0.75rem 2rem;
}
