.spinner-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner-overlay.global {
  position: fixed;
  top: var(--header-height, 60px);
  left: var(--sidebar-l1-width, 65px);
  width: calc(100% - var(--sidebar-l1-width, 65px));
  height: calc(100vh - var(--header-height, 60px));
  background: rgba(0, 0, 0, 0.2);
}

html.l2-is-open .spinner-overlay.global {
  left: calc(var(--sidebar-l1-width, 65px) + var(--sidebar-l2-width, 270px));
  width: calc(100% - var(--sidebar-l1-width, 65px) - var(--sidebar-l2-width, 270px));
}

.spinner-overlay.local {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.loading-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
}

.loading-spinner span {
  position: absolute;
  width: 17px;
  height: 17px;
  background: var(--primary-color, #3b82f6);
  border-radius: 50%;
  animation: dotFade 1.2s ease-in-out infinite;
}

.loading-spinner span:nth-child(1) { top: 0px;    left: 31.5px; animation-delay: 0s; }
.loading-spinner span:nth-child(2) { top: 9px;    left: 54px;   animation-delay: 0.15s; }
.loading-spinner span:nth-child(3) { top: 31.5px; left: 63.5px; animation-delay: 0.3s; }
.loading-spinner span:nth-child(4) { top: 54px;   left: 54px;   animation-delay: 0.45s; }
.loading-spinner span:nth-child(5) { top: 63.5px; left: 31.5px; animation-delay: 0.6s; }
.loading-spinner span:nth-child(6) { top: 54px;   left: 9px;    animation-delay: 0.75s; }
.loading-spinner span:nth-child(7) { top: 31.5px; left: 0px;    animation-delay: 0.9s; }
.loading-spinner span:nth-child(8) { top: 9px;    left: 9px;    animation-delay: 1.05s; }

.loading-spinner-container p {
  font-weight: 500;
  color: #000000;
  font-size: 0.9rem;
}

html.dark-theme .loading-spinner-container p {
  color: #ffffff;
}

@keyframes dotFade {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}
