/**
 * Banner Account Creation Loading Screen - Improved Version
 * Matches registration popup style with transparent background
 * Professional, modern, and user-friendly design
 */

/* Loading overlay with transparent background */
.banner-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent dark overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show when active */
.banner-loading-overlay.active {
  opacity: 1;
  visibility: visible;
  display: flex;
}

/* Loading content container - Clean white card */
.banner-loading-content {
  background: white;
  border-radius: 12px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: slideUp 0.3s ease;
  position: relative;
}

/* Smooth slide-up animation */
@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modern spinner with blue accent color */
.banner-loading-spinner {
  width: 70px;
  height: 70px;
  margin: 0 auto 25px;
  position: relative;
}

.banner-loading-spinner::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid #e3f2fd;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Loading title - Professional typography */
.banner-loading-title {
  color: #333;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 15px 0;
  line-height: 1.4;
}

/* Loading message - Clear and readable */
.banner-loading-message {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 15px 0;
}

/* Submessage - Lighter and italicized */
.banner-loading-submessage {
  color: #999;
  font-size: 14px;
  line-height: 1.5;
  font-style: italic;
  margin: 0;
}

/* Animated dots for loading indicator */
.banner-loading-dots {
  display: inline-block;
}

.banner-loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

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

/* Progress bar indicator (optional - can be added via JS) */
.banner-loading-progress {
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
}

.banner-loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
  border-radius: 2px;
  animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

/* Responsive design for tablets */
@media (max-width: 768px) {
  .banner-loading-content {
    padding: 35px 25px;
    max-width: 450px;
  }

  .banner-loading-spinner {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
  }

  .banner-loading-title {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .banner-loading-message {
    font-size: 15px;
  }

  .banner-loading-submessage {
    font-size: 13px;
  }
}

/* Responsive design for mobile phones */
@media (max-width: 480px) {
  .banner-loading-content {
    padding: 30px 20px;
    max-width: 400px;
  }

  .banner-loading-spinner {
    width: 55px;
    height: 55px;
    margin-bottom: 18px;
  }

  .banner-loading-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .banner-loading-message {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .banner-loading-submessage {
    font-size: 12px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .banner-loading-content {
    padding: 25px 15px;
    max-width: 95%;
  }

  .banner-loading-spinner {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
  }

  .banner-loading-title {
    font-size: 18px;
  }

  .banner-loading-message {
    font-size: 13px;
  }

  .banner-loading-submessage {
    font-size: 11px;
  }
}

/* Prevent body scrolling when loading is active */
body.banner-loading-active {
  overflow: hidden;
}

/* Accessibility - Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .banner-loading-overlay,
  .banner-loading-content {
    animation: none;
    transition: none;
  }

  .banner-loading-spinner::before {
    animation: spin 2s linear infinite; /* Slower animation */
  }
}

/* Focus indicator for accessibility */
.banner-loading-overlay:focus {
  outline: 3px solid #007bff;
  outline-offset: -3px;
}

/* Optional: Pulse effect for loading content */
.banner-loading-content.pulse {
  animation: slideUp 0.3s ease, contentPulse 2s ease-in-out infinite;
}

@keyframes contentPulse {
  0%, 100% {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 10px 50px rgba(0, 123, 255, 0.4);
  }
}
