/* JupyterLab Loading Overlay - Matching replay-loading-overlay.css */

#custom-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #000000; /* Solid black background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999; /* Very high z-index to cover everything */
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  animation: sage-replay-content-enter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

@keyframes sage-replay-content-enter {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.loader-spinner-container {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader {
  width: 64px;
  height: 64px;
  position: relative;
  z-index: 2;
}

.loader-spinner-svg {
  width: 100%;
  height: 100%;
  animation: sage-replay-rotate 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  filter: drop-shadow(0 0 12px rgba(74, 144, 226, 0.4));
}

.loader-spinner-path {
  stroke: #4A90E2;
  stroke-linecap: round;
  animation: sage-replay-dash 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite,
             sage-replay-color-shift 4s ease-in-out infinite;
}

/* Pulsing ring effect */
.loader-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(74, 144, 226, 0.3);
  transform: translate(-50%, -50%);
  animation: sage-replay-pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  z-index: 1;
}

@keyframes sage-replay-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes sage-replay-dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

@keyframes sage-replay-pulse {
  0%, 100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

@keyframes sage-replay-color-shift {
  0%, 100% {
    stroke: #4A90E2;
  }
  50% {
    stroke: #5CA4FF;
  }
}

.loader-text {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 22px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.3px;
  text-align: center;
}

.loader-text-main {
  font-weight: 400;
  opacity: 0.95;
}

.loader-dots {
  display: inline-flex;
  gap: 2px;
}

.loader-dots span {
  display: inline-block;
  animation: sage-replay-dot-bounce 1.4s ease-in-out infinite;
  opacity: 0.5;
  transform-origin: center;
}

.loader-dots span:nth-child(1) {
  animation-delay: 0s;
}

.loader-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.loader-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes sage-replay-dot-bounce {
  0%, 60%, 100% {
    opacity: 0.5;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-6px);
  }
}

