/* BuzzTrail Demo Loading UI Styles */

/* Loading Overlay - Full-screen dark semi-transparent background */
#demo-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-in-out;
}

/* Loading Content Container */
.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 90%;
  animation: slideIn 0.4s ease-out;
}

/* Loading Spinner */
.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #e7fbbc;
  border-top-color: #a3e635;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}

/* Loading Text */
.loading-overlay p {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
}

/* Loading Subtext */
.loading-subtext {
  font-size: 1rem !important;
  font-weight: 400 !important;
  color: #666 !important;
  margin-top: 12px !important;
}

/* Keyframe Animations */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Presentation Transition Effects */
.presentation-enter {
  animation: fadeSlideIn 0.6s ease-out;
}

.presentation-exit {
  animation: fadeSlideOut 0.4s ease-in;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeSlideOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Responsive Styles */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .loading-overlay {
    padding: 30px;
    border-radius: 12px;
  }

  .loading-spinner {
    width: 50px;
    height: 50px;
    border-width: 3px;
  }

  .loading-overlay p {
    font-size: 1.1rem;
  }

  .loading-subtext {
    font-size: 0.9rem !important;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .loading-overlay {
    padding: 24px 20px;
    border-radius: 12px;
    max-width: 85%;
  }

  .loading-spinner {
    width: 44px;
    height: 44px;
    border-width: 3px;
    margin-bottom: 20px;
  }

  .loading-overlay p {
    font-size: 1rem;
  }

  .loading-subtext {
    font-size: 0.85rem !important;
    margin-top: 10px !important;
  }
}

/* Small Mobile (320px and below) */
@media (max-width: 320px) {
  .loading-overlay {
    padding: 20px 16px;
  }

  .loading-spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
  }

  .loading-overlay p {
    font-size: 0.95rem;
  }

  .loading-subtext {
    font-size: 0.8rem !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #demo-loading {
    background: rgba(0, 0, 0, 0.95);
  }

  .loading-overlay {
    background: #ffffff;
    border: 2px solid #1a1a1a;
  }

  .loading-spinner {
    border-color: #1a1a1a;
    border-top-color: #a3e635;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #demo-loading,
  .loading-overlay,
  .presentation-enter,
  .presentation-exit {
    animation: none;
  }

  .loading-spinner {
    animation: spin 2s linear infinite;
  }
}
