/*
 * .seq-actions — the actions of the issue page (docs/plans/seq-redesign.md § 5).
 *
 * The five resolution actions of docs/plans/seq.md §7.4, one row each: a sentence saying
 * what the action does (.seq-actions__hint), the authorization field, the field a
 * science-changing action needs, and the gem's .button--outline that submits. The two that
 * change the science (Issue#science_changing?, ApplicationHelper#issue_science_changing?)
 * open a confirmation containing a .seq-diff before anything runs; the button is the same
 * outline button as the others and the meaning is a small line under it, .seq-actions__science
 * ("Changes the science"), in the secondary text colour, and the button's title. Until
 * 2026-09-24 the button had a dashed border, a mono Δ and an ellipsis (commit 116fe17), a
 * fourth button style the review retired (docs/plans/findings/redesign-deviations-from-the-plan.md).
 * One .button--filled per page at most, and none here. Never gold.
 *
 * Markup:
 *   <div class="seq-actions">
 *     <form class="seq-actions__row">
 *       <p class="seq-actions__hint body-sm">Run the step again as it is.</p>
 *       <input class="form-input form-input--sm" placeholder="authorization">
 *       <button class="seq-actions__action button button--outline button--sm">…</button>
 *     </form>
 *     <form class="seq-actions__row">… <button class="seq-actions__action …" title="Changes the science">…</button>
 *       <p class="seq-actions__science body-sm">Changes the science</p></form>
 *   </div>
 */

.seq-actions {
  display: flex;
  flex-direction: column;
}
/* One action per row, rows divided by a hairline; the sentence takes the whole first line,
   the fields and the button share the second and wrap under each other on a phone. */
.seq-actions__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-8) var(--spacing-12);
  padding-block: var(--spacing-16);
  border-block-start: var(--stroke-weight-1) solid var(--border-subtle);
}
.seq-actions__row:last-child {
  border-block-end: var(--stroke-weight-1) solid var(--border-subtle);
}
.seq-actions__row > .seq-actions__hint {
  flex-basis: 100%;
}
.seq-actions__row > .form-input {
  flex: 1 1 12rem;
  max-width: 20rem;
  width: auto;
}
/* Touch: an action is a .button--sm, whose hit area reaches 6px past each edge on a coarse
   pointer (_button-seq.css); at the --spacing-8 pitch the next row's action covered the lower
   edge of the one above. The gaps are --spacing-16 there. */
@media (pointer: coarse) {
  .seq-actions,
  .seq-actions__row {
    gap: var(--spacing-16);
  }
}

.seq-actions__action {
  border: var(--stroke-weight-1) solid var(--border-strong);
  background: var(--background-surface-1);
  color: var(--text-primary);
}
.seq-actions__action:hover {
  background: var(--background-hover);
}
.seq-actions__action:disabled,
.seq-actions__action[aria-disabled="true"] {
  color: var(--text-disabled);
  border-color: var(--border-subtle);
  cursor: not-allowed;
}

/* The line under a science-changing action's button; it takes the row's whole width. */
.seq-actions__science {
  flex-basis: 100%;
  margin: 0;
  color: var(--text-secondary);
}

.seq-actions__hint {
  flex-basis: 100%;
}
.seq-actions__row > .form-input {
  flex: 1 1 12rem;
  max-width: 20rem;
  width: auto;
}
/* Touch: an action is a .button--sm, whose hit area reaches 6px past each edge on a coarse
   pointer (_button-seq.css); at the --spacing-8 pitch the next row's action covered the lower
   edge of the one above. The gaps are --spacing-16 there. */
@media (pointer: coarse) {
  .seq-actions,
  .seq-actions__row {
    gap: var(--spacing-16);
  }
}

.seq-actions__action {
  border: var(--stroke-weight-1) solid var(--border-strong);
  background: var(--background-surface-1);
  color: var(--text-primary);
}
.seq-actions__action:hover {
  background: var(--background-hover);
}
.seq-actions__action:disabled,
.seq-actions__action[aria-disabled="true"] {
  color: var(--text-disabled);
  border-color: var(--border-subtle);
  cursor: not-allowed;
}

/* ---------- --science-changing: opens a confirmation with a diff ---------- */
.seq-actions__action--science-changing {
  border-style: dashed;
  background: transparent;
}
.seq-actions__action--science-changing::before {
  content: "Δ" / "changes the science: ";   /* the glyph is drawn; the phrase is what a reader hears */
  font-family: var(--font-family-mono);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-400);
  color: var(--text-secondary);
}
.seq-actions__action--science-changing::after {
  content: "…" / "";
}

/* The sentence under the row saying what Δ means. */
/* Touch. On a coarse pointer _button-seq.css draws a .button--sm's 44px hit area as a
   transparent ::before, which outranks the rule above and replaced the Δ, and with it the
   spoken "changes the science:", by an empty box. Both pseudo-elements of a science-changing
   action are drawn, so the Δ is restored here and the action is 44px tall instead; the other
   actions of the row take the same height so the row stays one height. */
@media (pointer: coarse) {
  .seq-actions__action.button.button--sm {
    min-block-size: 44px;
  }
  .seq-actions__action--science-changing.button.button--sm::before {
    content: "Δ" / "changes the science: ";
    position: static;
    inset: auto;
  }
}

.seq-actions__hint {
  margin: 0;
  max-width: var(--width-740);
  color: var(--text-secondary);
}
.seq-actions__hint code {
  font-size: var(--font-size-12);
}
