/* LOADING INDICATOR STYLES

Provides visual feedback during API calls. */

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Loading Spinner Container */
.loading-spinner {
  background: white;
  padding: 2rem 3rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Spinner */
.loading-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
}

/* Loading Text */
.loading-text {
  margin-top: 1rem;
  margin-bottom: 0;
  color: #333;
  font-size: 1rem;
  font-weight: 500;
}

/* Loading Skeleton (for content loading) */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

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

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .loading-spinner {
    background: #2d2d2d;
    color: #fff;
  }

  .loading-text {
    color: #fff;
  }

  .skeleton {
    background: linear-gradient(90deg, #3a3a3a 25%, #4a4a4a 50%, #3a3a3a 75%);
    background-size: 200% 100%;
  }
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .loading-spinner {
    padding: 1.5rem 2rem;
  }

  .loading-spinner .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
  }

  .loading-text {
    font-size: 0.9rem;
  }
}
