/* Loading Indicators - ArchitectUI Style */

/* Global Loading Overlay */
#global-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  display: none; /* Hidden by default; toggled via .is-visible */
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease;
}

#global-loading-overlay.is-visible {
  display: flex;
}

#global-loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Ball Scale Multiple Animation */
.ball-scale-multiple {
  position: relative;
  transform: translateY(-25px);
  display: inline-block;
  width: 54px;
  height: 54px;
}

.ball-scale-multiple > div {
  background-color: #1664A3;
  border-radius: 100%;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  margin: 0;
  width: 54px;
  height: 54px;
  animation: ball-scale-multiple 1s 0s linear infinite;
}

.ball-scale-multiple > div:nth-child(2) {
  animation-delay: -0.4s;
}

.ball-scale-multiple > div:nth-child(3) {
  animation-delay: -0.2s;
}

@keyframes ball-scale-multiple {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* Alternative colors for different contexts */
.ball-scale-multiple.loader-primary > div {
  background-color: #1664A3;
}

.ball-scale-multiple.loader-success > div {
  background-color: #2E8540;
}

.ball-scale-multiple.loader-warning > div {
  background-color: #D98C10;
}

.ball-scale-multiple.loader-danger > div {
  background-color: #C23A2B;
}

.ball-scale-multiple.loader-info > div {
  background-color: #2B90B6;
}

.ball-scale-multiple.loader-light > div {
  background-color: #ffffff;
}

/* Small loader variant */
.ball-scale-multiple.loader-sm {
  width: 32px;
  height: 32px;
}

.ball-scale-multiple.loader-sm > div {
  width: 32px;
  height: 32px;
}

/* Large loader variant */
.ball-scale-multiple.loader-lg {
  width: 72px;
  height: 72px;
}

.ball-scale-multiple.loader-lg > div {
  width: 72px;
  height: 72px;
}

/* Loading text */
.loading-text {
  color: #e5e7eb;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 20px;
  text-align: center;
}

/* Page transition loading */
.page-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Inline loader for buttons */
.btn .ball-scale-multiple {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.btn .ball-scale-multiple > div {
  width: 20px;
  height: 20px;
  background-color: currentColor;
}

/* Element-scoped loading overlay (used by LoadingIndicator.showOnElement) */
.element-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-parent-relative {
  position: relative;
}
