/*
 * .o-scroll — the one layout object Seq adds (docs/design-system/concept.md § The gem is the
 * base: Seq adds an object of its own only where the gem has none). The gem ships no scroll
 * container, and every table-shaped module (.admin-table, .seq-jobs, .seq-artifacts,
 * .seq-results, .seq-params, .seq-figures, .seq-timings) is wider than a phone. A table may
 * scroll sideways inside this object; the page never does.
 *
 * Structure only: no color, no type. Markup:
 *   <div class="o-scroll"><table class="admin-table seq-jobs">…</table></div>
 *
 * Keyboard access: a scroll container is reachable by keyboard only if it is focusable, so a
 * wrapper whose content can actually overflow should carry tabindex="0" (and, where the table
 * has a caption, aria-labelledby pointing at it). The focus ring below is the page ring from
 * 03-generic/_base.css restated on the object because outlines on overflow containers are
 * otherwise clipped by some engines. Chrome makes such containers focusable on its own
 * (keyboard-focusable scrollers); the tabindex is for the others.
 */

.o-scroll {
  /* Positioned so that absolutely positioned descendants (sr-only cell labels, copy status) are contained by the wrapper instead of extending the document. */
  position: relative;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.o-scroll:focus-visible {
  outline: var(--stroke-weight-2) solid var(--focus-ring);         /* the page ring, 03-generic/_base.css */
  outline-offset: calc(-1 * var(--stroke-weight-2));                /* drawn inside, so the container cannot clip it */
}
