/* Per-table layout tweaks. */

/* Widen the first (Keyword) column of the SCF > Overview > Convergence table.
 * Scoped to that section's heading so other tables are unaffected. The table
 * is targeted both bare and inside the wrapper <div> that Material's JS adds. */
.md-typeset h2#convergence + p + table th:first-child,
.md-typeset h2#convergence + p + table td:first-child,
.md-typeset h2#convergence + p + div table th:first-child,
.md-typeset h2#convergence + p + div table td:first-child {
  min-width: 8rem;
}

/* Full Parameter List page (parameters/full-list.md): the Parameter/Description/
 * Default tables. Widen columns 1 (Parameter) and 3 (Default) by ~4 characters
 * each and let column 2 (Description) take the remaining, narrower space.
 * Scoped via the page's unique <h1> so no other page's tables are affected.
 * Fixed layout makes the explicit ch widths authoritative; 1ch ≈ one character.
 * Material renders these tables as display:inline-block, which silently ignores
 * table-layout/width — so we must restore display:table for the fixed layout to
 * take effect. The :has() id selector gives us the specificity to override it. */
.md-typeset:has(h1#full-parameter-list) table:not([class]) {
  display: table;
  table-layout: fixed;
  width: 100%;
}
.md-typeset:has(h1#full-parameter-list) table th:first-child,
.md-typeset:has(h1#full-parameter-list) table td:first-child {
  width: 20ch;
}
.md-typeset:has(h1#full-parameter-list) table th:last-child,
.md-typeset:has(h1#full-parameter-list) table td:last-child {
  width: 16ch;
}
/* Let long keywords / default values wrap within the narrower fixed columns. */
.md-typeset:has(h1#full-parameter-list) table td:first-child,
.md-typeset:has(h1#full-parameter-list) table td:last-child {
  word-break: break-word;
}
