/* ybocs.css
 * Extra styling for ybocs.html; loaded after screening.css so these rules can override the shared base.
 * CSS controls appearance. JavaScript controls responses and generated notes.
 * Rules later in the file can override earlier rules with equal specificity.
 */

.version-card {
  display: grid;
  gap: 14px;
}
.symptom-group {
  margin-top: 24px;
}
.symptom-group h3 {
  color: var(--accent-primary);
}
/* Keep a symptom label beside its Current and Past checkboxes. */
.symptom-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.symptom-row label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 700;
}
/* Place obsession and compulsion target fields side by side. */
.target-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.target-grid h3 {
  color: var(--accent-secondary);
}
.target-input {
  width: 100%;
  margin: 6px 0;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}
.severity-item {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.severity-item h3 {
  margin-top: 0;
}
.severity-probe {
  color: var(--muted-text);
  line-height: 1.5;
}
/* Arrange the rating anchors for each severity or additional clinical item. */
.anchor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 8px;
}
.anchor-option {
  position: relative;
}
.anchor-option input {
  position: absolute;
  opacity: 0;
}
.anchor-option span {
  display: block;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
  cursor: pointer;
}
.anchor-option input:checked + span {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--on-accent);
}
.anchor-option:hover span {
  border-color: var(--accent-secondary);
}
/* Group obsession, compulsion, total, and severity results. */
.score-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.score-grid > div {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-2);
}
.score-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--accent-secondary);
  font-size: 22px;
}
.other-symptom-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.other-add {
  margin-top: var(--space-options);
}
.other-remove {
  padding: 6px 10px;
}
.other-symptom-row input[type="text"] {
  width: 100%;
  padding: 10px 13px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.other-symptom-row label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 700;
}
/* Smaller-screen adjustments: reduce columns and spacing to fit the available width. */
@media (max-width: 900px) {
  .score-grid {
    grid-template-columns: 1fr 1fr;
  }
}
/* Smaller-screen adjustments: reduce columns and spacing to fit the available width. */
@media (max-width: 700px) {
  .target-grid {
    grid-template-columns: 1fr;
  }
  .symptom-row {
    grid-template-columns: 1fr auto auto;
  }
  .other-symptom-row {
    grid-template-columns: auto auto 1fr;
  }
  .other-symptom-row input[type="text"] {
    grid-column: 1 / -1;
  }
  .other-remove {
    justify-self: end;
  }
  .anchor-grid {
    grid-template-columns: 1fr;
  }
}
