/* NProgress Custom Styling - 999DEX Professional Purple-Cyan Branding */

#nprogress {
  pointer-events: none;
}

#nprogress .bar {
  background: linear-gradient(90deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
  height: 3px;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.6), 0 0 5px rgba(6, 182, 212, 0.4);
  will-change: width;
}

#nprogress .bar::after {
  content: '';
  display: block;
  position: absolute;
  right: 0;
  width: 100px;
  height: 100%;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.8), 0 0 5px rgba(168, 85, 247, 0.5);
  opacity: 1;
}

#nprogress .peg {
  display: block;
  position: absolute;
  right: 0px;
  width: 100px;
  height: 100%;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.9), 0 0 6px rgba(168, 85, 247, 0.6);
  opacity: 1;
  transform: rotate(3deg) translate(0px, -4px);
}

#nprogress .spinner {
  display: block;
  position: fixed;
  z-index: 9999;
  top: 15px;
  right: 15px;
}

#nprogress .spinner-icon {
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border: 2px solid transparent;
  border-top-color: var(--accent-purple);
  border-left-color: var(--accent-cyan);
  border-radius: var(--radius-full);
  animation: nprogress-spinner 400ms linear infinite;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6), 0 0 4px rgba(6, 182, 212, 0.4);
}

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

/* Ensure spinner doesn't interfere with clicks */
#nprogress .spinner {
  pointer-events: none;
}

/* Hide spinner on mobile */
@media (max-width: 768px) {
  #nprogress .spinner {
    display: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  #nprogress .bar {
    background: rgba(255, 255, 255, 0.95);
  }

  #nprogress .peg {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 0 0 8px rgba(255, 255, 255, 0.6);
  }

  #nprogress .spinner-icon {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  }
}

/* Animation for progress completion */
@keyframes progress-completion {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

#nprogress.done .bar {
  animation: progress-completion 200ms var(--ease-out) forwards;
}

#nprogress.done .spinner {
  animation: progress-completion 200ms var(--ease-out) forwards;
}
