/* ==========================================================================
   htmx-boost: shared, layout-agnostic styling for the boosted-navigation
   experience (top progress bar). Included identically by every layout
   (_Layout, _AdminLayout, _PortalLayout, Account/Login) so the htmx
   head-support extension recognizes it as unchanged across cross-layout
   navigations and never has to reload it.
   ========================================================================== */

#htmx-progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--a-accent, var(--accent, #f5b400));
  z-index: 99999; opacity: 0; pointer-events: none;
  transition: width .3s ease, opacity .25s ease;
  box-shadow: 0 0 8px rgba(245, 180, 0, .6);
}
#htmx-progress-bar.htmx-progress-active { opacity: 1; }

/* Avoid a flash of unstyled/duplicate preloader on boosted (non-first) navigations */
#preloader.htmx-skip { transition: none !important; opacity: 0 !important; visibility: hidden !important; }

/* Submit-button loading lock (see htmx-boost.js): the button's own content is hidden via
   visibility (not removed), so the button keeps its original width/height, and a spinner is
   centered on top of it. Using visibility instead of color:transparent means the spinner can sit
   in normal flow with correct contrast without having to know the button's own color variant
   (btn-brand, btn-outline-danger, btn-link, ...). */
.btn-is-loading { position: relative; pointer-events: none; }
.btn-is-loading .btn-loading-content { visibility: hidden; }
.btn-is-loading .btn-loading-spinner {
  position: absolute; top: 50%; left: 50%;
  width: 1rem; height: 1rem; margin: -0.5rem 0 0 -0.5rem;
}
