/* Loading Spinner Component */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #00ffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  color: #fff;
  font-family: 'Arial', sans-serif;
  font-size: 18px;
  margin-top: 20px;
  letter-spacing: 2px;
}

.loading-progress {
  margin-top: 15px;
  color: #00ffff;
  font-family: monospace;
  font-size: 14px;
}

/* 3D Model Loading Progress Bar */
.model-loading-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 15px;
  overflow: hidden;
}

.model-loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ffff, #0099ff);
  width: 0%;
  transition: width 0.3s ease;
  animation: shimmer 2s infinite;
}

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

/* Payment Processing Overlay */
.payment-processing {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.payment-processing.active {
  display: flex;
}

.payment-spinner {
  width: 80px;
  height: 80px;
  border: 6px solid rgba(0, 255, 0, 0.1);
  border-top-color: #00ff00;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Accessibility: Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .loading-spinner,
  .payment-spinner {
    animation: none;
    border-top-color: transparent;
  }

  .loading-overlay,
  .model-loading-bar-fill {
    transition: none;
  }
}

/* Page Transition Overlay */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-transition.active {
  opacity: 1;
  pointer-events: all;
}
