/* Feedback while Turbo is working, on every page.
 *
 * The progress bar appears after 100 ms (Turbo.config.drive.progressBarDelay
 * in app/javascript/application.js). Turbo draws it 3px high in its own blue;
 * this keeps the height and uses the brand gradient.
 *
 * While a form submits, Turbo sets aria-busy on the <form> (button_to renders
 * one per button) and disables the button that submitted it; while a visit
 * loads it sets aria-busy on <html>. Both show a progress cursor, and the
 * form's buttons dim, so the click reads as taken. A button with
 * data-turbo-submits-with also changes its text. */

.turbo-progress-bar {
  height: calc(var(--stroke-weight-1) + var(--stroke-weight-2));
  background: var(--brand-gradient);
}

html[aria-busy="true"],
html[aria-busy="true"] a,
html[aria-busy="true"] button { cursor: progress; }

form[aria-busy="true"] :is(button, .button) {
  cursor: progress;
  opacity: 0.6;
}
