/* ── Checkbox / radio item row ──────────────────────────── */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* horizontal layout for short option sets */
.check-list.horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
}

/* ── Pill style for checkboxes & radios ─────────────────── */
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-2);
  font-family: var(--mono);
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  user-select: none;
  width: 100%;
}
.check-list.horizontal .check-pill { width: auto; }

.check-pill:hover {
  border-color: var(--accent-lt);
  background: var(--accent-bg);
  color: var(--text);
}

/* hide the native input */
.check-pill input[type="checkbox"],
.check-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* custom indicator box */
.check-indicator {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, border-color 0.1s;
}
/* circle for radio */
.check-pill input[type="radio"] ~ .check-indicator {
  border-radius: 50%;
}

/* checked state — driven by JS class on the label */
.check-pill.checked {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}
.check-pill.checked .check-indicator {
  background: var(--accent);
  border-color: var(--accent);
}
/* checkmark svg */
.check-pill.checked .check-indicator::after {
  content: '';
  display: block;
  width: 8px;
  height: 5px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
/* dot for radio */
.check-pill input[type="radio"] ~ .check-indicator::after { display: none; }
.check-pill input[type="radio"].checked-radio ~ .check-indicator::after,
.check-pill.checked input[type="radio"] ~ .check-indicator::after {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  border: none;
  transform: none;
  margin: auto;
}

.check-pill.disabled {
opacity: 0.4;
cursor: not-allowed;
pointer-events: none;
}

/* invalid group pills get a red border hint */
.form-group.invalid .check-pill:not(.checked) {
  border-color: var(--error-bd);
}

/* ── Data sub-group ─────────────────────────────────────── */
.sub-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-lt);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sub-group-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2px;
}

/* ── Submit button ──────────────────────────────────────── */
.form-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-lt);
}
.btn-run {
  width: 100%;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0;
  border-radius: var(--radius);
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.1s;
  letter-spacing: 0.01em;
}
.btn-run:hover { background: #235075; }
.btn-run:disabled {
  background: var(--surface-2);
  color: var(--text-3);
  cursor: not-allowed;
}

.check-pill--microbiome {
gap: 10px;
}
.pill-select {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 2px 4px;
}
.pill-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}