/* ==========================================================================
   AI TOOLS - LOADING STATES
   Standard loading and spinner styling for all AI Tools
   ========================================================================== */

/* Loading State */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--primary-color, #ff6b35);
  font-size: 1.1rem;
  font-weight: 500;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Spinner */
.spinner,
.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 107, 53, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color, #ff6b35);
  animation: spin 1s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

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

/* Spinner with Text */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}

.loading-text {
  color: var(--text-secondary, #b3b3bd);
  font-size: 0.95rem;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--background-light, #2a2a2a) 25%,
    var(--background-secondary, #232425) 50%,
    var(--background-light, #2a2a2a) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--border-radius-sm, 4px);
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
  width: 70%;
}

.skeleton-heading {
  height: 1.5em;
  width: 40%;
  margin-bottom: 1rem;
}

.skeleton-button {
  height: 44px;
  width: 120px;
  border-radius: var(--border-radius, 8px);
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--background-light, #2a2a2a);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color, #ff6b35), var(--primary-light, #ff8855));
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Indeterminate Progress */
.progress-bar-indeterminate .progress-bar-fill {
  width: 30%;
  animation: progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes progress-indeterminate {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(400%);
  }
}
