/* Global loading overlay shared by all pages */
#global-loading[hidden] {
  display: none !important;
}

.global-loading {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
  visibility: hidden;
}

.global-loading.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.global-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 40%),
              radial-gradient(circle at 80% 30%, rgba(183,199,38,0.08), transparent 38%),
              rgba(13, 27, 42, 0.32);
  backdrop-filter: blur(2px);
}

.global-loading__card {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(13, 27, 42, 0.92);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e0e1dd;
}

.global-loading__spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #b7c726;
  animation: global-loading-spin 1s linear infinite;
  box-sizing: border-box;
}

.global-loading__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.global-loading__label {
  font-weight: 700;
  letter-spacing: .2px;
}

.global-loading__hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

@keyframes global-loading-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.global-loading__progress-container {
  width: 100%;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  height: 4px;
  overflow: hidden;
  display: none; /* Hidden by default until progress is set */
}

.global-loading__progress-bar {
  height: 100%;
  background: #b7c726;
  width: 0%;
  transition: width 0.2s ease;
}

.global-loading__percent {
  font-size: 12px;
  color: #b7c726;
  font-weight: bold;
  margin-left: auto;
  display: none; /* Hidden by default */
}

.global-loading__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
