/* htmx.css — swap-lifecycle visual states.
 *
 * A new file rather than an addition to style.css: style.css is already
 * close to its 2100-line budget (scripts/quality/detect_large_py.sh), and
 * these rules are a coherent, separable unit (see docs/references/
 * ideal_components/ui_components.md's CSS-reuse conventions).
 *
 * htmx.config.includeIndicatorCSS is set to false in htmx_init.js -- these
 * rules replace htmx's own auto-injected <style> tag so every visual rule
 * in this app stays in an auditable, linted .css file. Class names below
 * (htmx-indicator, htmx-request, htmx-swapping, htmx-settling) are htmx's
 * own fixed class names (indicatorClass/requestClass in htmx.config, and
 * the swap/settle lifecycle classes), verified against the vendored
 * source -- not ours to rename.
 */

/* An element carrying .htmx-indicator is hidden until the request it
   belongs to (its own closest [hx-indicator], or the triggering element by
   default) is in flight -- .htmx-request is added to that element for the
   duration of the request. */
.htmx-indicator {
  opacity: 0;
  transition: opacity 150ms ease-in;
}

.htmx-request.htmx-indicator,
.htmx-request .htmx-indicator {
  opacity: 1;
}

/* Applied to the swap target: .htmx-swapping for the brief window between
   "new content received" and "inserted into the DOM", .htmx-settling for
   htmx.config.defaultSettleDelay afterward (default 1ms in 4.0 -- these
   rules matter far more once a route opts into a longer delay for a
   deliberate transition). A plain opacity crossfade; a swap that wants a
   different transition overrides these on its own target. */
.htmx-swapping {
  opacity: 0;
  transition: opacity 150ms ease-out;
}

.htmx-settling {
  opacity: 0;
}
