.global-progress {
  position: fixed;
  z-index: 10000;
  inset: 0 0 auto;
  height: 3px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.global-progress span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, #d7a849, #f1d987, #d7a849);
  box-shadow: 0 0 10px rgba(215, 168, 73, .42);
  transform: translateX(-110%);
}

body.is-processing .global-progress { opacity: 1; }
body.is-processing .global-progress span { animation: lakeel-progress 1.15s ease-in-out infinite; }

.global-loading-status {
  position: fixed;
  z-index: 10001;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: #102c29;
  color: #fff;
  box-shadow: 0 14px 34px rgba(16, 44, 41, .22);
  font-size: 13px;
  font-weight: 600;
}

.global-loading-status[hidden] { display: none; }

.global-loading-spinner,
.action-loading-spinner {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .38);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: lakeel-spin .72s linear infinite;
}

.btn.is-loading,
button.is-loading {
  pointer-events: none;
  cursor: wait;
  opacity: .88;
}

.btn.is-loading { gap: 8px; }

.icon-button.is-loading-icon {
  display: grid;
  overflow: hidden;
  place-items: center;
}

.icon-button.is-loading-icon .action-loading-spinner { margin: 0; }

[data-async-filter-view] {
  transition: opacity 140ms ease;
}

[data-async-filter-view].htmx-request,
[data-async-filter-view].is-filtering {
  cursor: progress;
  opacity: .62;
}

@keyframes lakeel-progress {
  0% { transform: translateX(-110%); }
  55% { transform: translateX(115%); }
  100% { transform: translateX(285%); }
}

@keyframes lakeel-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .global-loading-status {
    right: 14px;
    bottom: 14px;
    left: 14px;
    box-sizing: border-box;
    justify-content: center;
    max-width: calc(100vw - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-processing .global-progress span { animation-duration: 2.4s; }
  .global-loading-spinner,
  .action-loading-spinner { animation-duration: 1.4s; }
}

@media print {
  .global-progress,
  .global-loading-status { display: none !important; }
}
