/*
 * .seq-params — the parameter table and form (docs/design-system/component-inventory.md).
 *
 * One row per parameter: name verbatim, current value, provisional default, the locked flag,
 * and the prose from docs/registry/parameters.md beside the field. Read-only on the workflow
 * version page (in .seq-page__wide) and the job page; the --form variant (the workflow editor, inside .seq-node-form)
 * puts a gem .form-input in the value cell. A locked parameter shows the word `locked` and, in
 * the form, a read-only input. Changed values carry .is-changed on the row.
 *
 * Markup:
 *   <table class="admin-table seq-params seq-params--form o-rows">
 *     <thead><tr><th>parameter</th><th>value</th><th>default</th><th>locked</th><th>documentation</th></tr></thead>
 *     <tbody>
 *       <tr class="seq-params__row">
 *         <th scope="row" class="seq-params__name">min_mapq</th>
 *         <td class="seq-params__value" data-label="value"><input class="form-input form-input--sm" value="20"></td>
 *         <td class="seq-params__default" data-label="default">20</td>
 *         <td class="seq-params__locked" data-label="locked"><span class="seq-params__flag">locked</span></td>
 *         <td class="seq-params__doc">...</td>
 *       </tr>
 *     </tbody>
 *   </table>
 *
 * Below 768px the table becomes labelled rows through .o-rows (05-objects/_rows.css), the
 * object every table with a state or a result carries since 2026-09-24: the header leaves the
 * layout, each row is a block with the name on its own line, then value, default and locked
 * each as a key–value pair whose key is the cell's data-label (written by the view from the
 * header text), then the documentation. The name is the row's heading and the documentation
 * is prose, so neither carries a label.
 */

.seq-params {
  --_value-width: 8rem;   /* the --form value input; the gem's narrowest width token, --width-320, is too wide for a cell */
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-14);
}
.seq-params caption {
  text-align: start;
  padding-block-end: var(--spacing-8);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-400);
  color: var(--text-secondary);
}
.seq-params thead th {
  text-align: start;
  padding: var(--spacing-8) var(--spacing-12);
  font-family: var(--font-family-body);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-400);
  color: var(--text-secondary);
  border-block-end: var(--stroke-weight-1) solid var(--border-default);
}
.seq-params__row > th,
.seq-params__row > td {
  padding: var(--spacing-8) var(--spacing-12);
  vertical-align: top;
  text-align: start;
  border-block-end: var(--stroke-weight-1) solid var(--border-subtle);
}

.seq-params__name,
.seq-params__value,
.seq-params__default,
.seq-params__flag {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-400);
  font-variant-numeric: var(--numerals);
}
.seq-params__name {
  color: var(--text-primary);
  white-space: nowrap;
}
/* A value and a default wrap: a path or a list ("/opt/conda/…", "0:1:5:10:20:…") is longer
   than the column (the review of 2026-09-24), and a default on one line took the width the
   value needed; each column keeps a readable width, the table scrolling in its .o-scroll
   below it. The name stays on one line. */
.seq-params__value {
  color: var(--text-primary);
  overflow-wrap: anywhere;
  min-width: 10rem;
}
.seq-params__default {
  color: var(--text-secondary);
  overflow-wrap: anywhere;
  min-width: 10rem;
}
/* A value that differs from its provisional default says so with a mark after it. */
.seq-params__value.is-off-default::after {
  content: " ≠";
  color: var(--text-secondary);
}

/* The locked flag: the word in a hairline box; an unlocked parameter shows an em dash. */
.seq-params__flag {
  display: inline-block;
  padding: 0 var(--spacing-4);
  border: var(--stroke-weight-1) solid var(--border-default);
  border-radius: var(--corner-radius-xxs);
  font-size: var(--font-size-12);
  color: var(--text-secondary);
}
/* ::after, so ::before is free for the data-label key below 768px. */
.seq-params__locked:empty::after {
  content: "—";
  color: var(--text-tertiary);
}

/* The prose documentation beside the field. */
.seq-params__doc {
  width: 100%;
  font-family: var(--font-family-body);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-400);
  color: var(--text-secondary);
  line-height: 1.4;
}
.seq-params__doc code {
  font-size: var(--font-size-12);
}

/* ---------- --form: editable in the workflow editor ---------- */
.seq-params--form .seq-params__value .form-input {
  width: var(--_value-width);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-400);
  font-variant-numeric: var(--numerals);
}
/* The value cell's form: the input and its Set button on one line, and when the line wraps
   (below 768px, in the labelled rows of .o-rows) the row gap keeps the button's 44px hit area
   off the input; in inline flow the button wrapped flush under the input and its area covered
   the input's last 4px (TouchTargetTest at 390px on the showcase's editor, 2026-09-24). */
.seq-params--form .seq-params__value form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-8) var(--spacing-12);
}
/* Focus: the page ring and the box-shadow reset are 03-generic/_base.css's .form-input rules. */
/* A locked parameter: the surface-2 fill is the locked cue; the value is content and stays readable. */
.seq-params--form .seq-params__value .form-input:read-only {
  color: var(--text-secondary);
  background: var(--background-surface-2);
  cursor: not-allowed;
}
/* A row a Turbo Stream just changed carries .is-changed; the wash is 09-utilities/_changed.css. */

/* Below 768px the table is labelled rows through .o-rows (05-objects/_rows.css), which the view
   puts on every .seq-params table; the name cell wraps there. */
@media (max-width: 767px) {
  .seq-params__name {
    padding-block-end: var(--spacing-4);
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .seq-params__doc { padding-block-start: var(--spacing-8); }
}
