/* ============================================================
   LOADING OVERLAY
   ============================================================ */

.nh-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 20, 20, 0.98); /* More opaque - hide rendering */
  backdrop-filter: blur(12px); /* Stronger blur */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.15s ease-out; /* Faster fade in */
  pointer-events: none; /* Don't block when hidden */
}

.nh-loader-overlay.is-active {
  display: flex;
  animation: fadeIn 0.15s ease-out forwards; /* Match faster transition */
  pointer-events: all; /* Block everything when active */
  cursor: wait; /* Show wait cursor */
  user-select: none; /* Prevent text selection */
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; }
}

.nh-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Spinner */
.nh-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--nh-border-subtle);
  border-top-color: var(--nh-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Loading text */
.nh-loader-text {
  color: var(--nh-text-main);
  font-size: 14px;
  font-weight: 500;
}

.nh-loader-subtext {
  color: var(--nh-text-soft);
  font-size: 12px;
  margin-top: -12px;
}

/* Progress dots animation */
.nh-loader-dots {
  display: inline-block;
  width: 4px;
}

.nh-loader-dots::after {
  content: '';
  animation: dots 1.5s steps(4) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Mini loader (for inline use) */
.nh-loader-mini {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--nh-border-subtle);
  border-top-color: var(--nh-accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

/* Success state */
.nh-loader-overlay.is-success .nh-spinner {
  border-color: #10b981;
  border-top-color: #10b981;
  animation: none;
}

.nh-loader-overlay.is-success .nh-spinner::after {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #10b981;
  font-size: 24px;
  font-weight: bold;
}