/* Shared loading state (admin + site). One component: .bd-spinner, [aria-busy] buttons,
   .bd-loading block ("Checking names…") and a thin top bar while fetches run. */
.bd-spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: bd-spin .7s linear infinite; vertical-align: -0.15em; flex: none; opacity: .85; }
.bd-spinner.is-lg { width: 1.6em; height: 1.6em; border-width: 3px; }
@keyframes bd-spin { to { transform: rotate(360deg); } }
button[aria-busy="true"], .button[aria-busy="true"], input[type=submit][aria-busy="true"] { position: relative; cursor: progress !important; opacity: .8; }
button[aria-busy="true"] > .bd-spinner { margin-right: .45em; }
.bd-loading { display: flex; align-items: center; gap: .6em; padding: 14px 12px; color: inherit; opacity: .9; }
.bd-loading[hidden] { display: none; }
.bd-input-wrap { position: relative; display: flex; flex: 1 1 180px; min-width: 0; }
.bd-input-wrap > input { flex: 1 1 auto; width: 100%; padding-right: 2.2em !important; }
.bd-input-wrap > .bd-spinner { position: absolute; right: .75em; top: 50%; margin-top: -.5em; pointer-events: none; color: var(--gold, currentColor); }
.bd-input-wrap > .bd-spinner[hidden] { display: none; }
#bd-topbar { position: fixed; left: 0; top: 0; height: 3px; width: 0; z-index: 99999; background: var(--gold, #d9a441); transition: width .3s ease, opacity .3s ease; opacity: 0; pointer-events: none; }
#bd-topbar.on { opacity: 1; width: 70%; transition: width 8s cubic-bezier(.1,.6,.2,1), opacity .2s; }
#bd-topbar.done { opacity: 0; width: 100%; }
@media (prefers-reduced-motion: reduce) { .bd-spinner { animation-duration: 2s; } }
