/* =============================================
   LIVEWIRE ACTIVITY FEEDBACK
   Loaded by both the storefront and the admin layouts.
   ============================================= */
.lw-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 20000; pointer-events: none;
  opacity: 0; transition: opacity .2s ease;
}
.lw-bar.active { opacity: 1; }
.lw-bar-fill {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #d4af37, #f0d980, #d4af37);
  box-shadow: 0 0 10px rgba(212,175,55,0.7);
  transition: width .25s ease;
}
.lw-bar-label {
  display: none; position: absolute; top: 10px; right: 14px;
  background: rgba(15,15,17,0.92); color: #f0d980;
  font-size: 0.72rem; font-weight: 600; letter-spacing: .3px;
  padding: 5px 11px; border-radius: 99px;
  border: 1px solid rgba(212,175,55,0.35);
  font-family: system-ui, sans-serif;
}
.lw-bar.has-label .lw-bar-label { display: block; }

/* Whatever control was pressed grows a spinner and stops accepting clicks.
   The label stays readable — blanking it made buttons look broken mid-request. */
.lw-busy {
  pointer-events: none;
  opacity: 0.8;
}
.lw-busy::before {
  content: '';
  display: inline-block; vertical-align: -2px;
  width: 13px; height: 13px; margin-right: 7px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-bottom-color: transparent;
  animation: lw-spin 0.6s linear infinite;
}
/* An icon-only control swaps its icon for the spinner instead of widening. */
.lw-busy > i:only-child { display: none; }
.lw-busy:has(> i:only-child)::before { margin-right: 0; }
@keyframes lw-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .lw-bar-fill { transition: none; }
  .lw-busy::after { animation-duration: 1.6s; }
}
