/* Modern Modal Loading States CSS */

/* Loading Spinner Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Loading Container */
.modal-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  min-height: 300px;
  background: linear-gradient(135deg, rgba(26, 30, 36, 0.8) 0%, rgba(35, 43, 58, 0.8) 100%);
  border-radius: 12px;
  border: 1px solid rgba(74, 144, 226, 0.2);
  animation: fadeIn 0.3s ease-out;
}

/* Spinner */
.modal-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(74, 144, 226, 0.1);
  border-top: 4px solid #4a90e2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

/* Loading Text */
.modal-loading-text {
  color: #4a90e2;
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 10px;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Loading Subtitle */
.modal-loading-subtitle {
  color: #888;
  font-size: 0.9em;
  text-align: center;
  max-width: 400px;
  line-height: 1.5;
}

/* Progress Bar */
.modal-loading-progress {
  width: 100%;
  max-width: 300px;
  height: 4px;
  background: rgba(74, 144, 226, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 20px;
}

.modal-loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4a90e2 0%, #5ba0f2 50%, #4a90e2 100%);
  background-size: 200% 100%;
  animation: progressSlide 1.5s ease-in-out infinite;
  border-radius: 2px;
}

@keyframes progressSlide {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Dots Loading Animation */
.modal-loading-dots {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.modal-loading-dot {
  width: 10px;
  height: 10px;
  background: #4a90e2;
  border-radius: 50%;
  animation: dotBounce 1.4s ease-in-out infinite;
}

.modal-loading-dot:nth-child(1) {
  animation-delay: 0s;
}

.modal-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.modal-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Empty State */
.modal-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  min-height: 300px;
  text-align: center;
  animation: fadeIn 0.3s ease-out;
}

.modal-empty-icon {
  font-size: 4em;
  color: #555;
  margin-bottom: 20px;
  opacity: 0.5;
}

.modal-empty-title {
  color: #888;
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
}

.modal-empty-text {
  color: #666;
  font-size: 0.95em;
  max-width: 400px;
  line-height: 1.6;
}

/* Error State */
.modal-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  min-height: 300px;
  text-align: center;
  animation: fadeIn 0.3s ease-out;
  background: rgba(220, 53, 69, 0.05);
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: 12px;
}

.modal-error-icon {
  font-size: 4em;
  color: #dc3545;
  margin-bottom: 20px;
  opacity: 0.8;
}

.modal-error-title {
  color: #dc3545;
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
}

.modal-error-text {
  color: #ff6b6b;
  font-size: 0.95em;
  max-width: 400px;
  line-height: 1.6;
}

.modal-error-retry {
  margin-top: 20px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-error-retry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Skeleton Loading */
.modal-skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.modal-skeleton-row {
  height: 60px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.modal-skeleton-text {
  height: 20px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.modal-skeleton-text.short {
  width: 60%;
}

.modal-skeleton-text.medium {
  width: 80%;
}

.modal-skeleton-text.long {
  width: 100%;
}

/* Success State */
.modal-success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  text-align: center;
  animation: fadeIn 0.3s ease-out;
  background: rgba(40, 167, 69, 0.05);
  border: 1px solid rgba(40, 167, 69, 0.2);
  border-radius: 12px;
}

.modal-success-icon {
  font-size: 4em;
  color: #28a745;
  margin-bottom: 20px;
}

.modal-success-title {
  color: #28a745;
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
}

.modal-success-text {
  color: #95c97d;
  font-size: 0.95em;
  max-width: 400px;
  line-height: 1.6;
}

/* Fade Transitions */
.modal-fade-enter {
  opacity: 0;
  transform: translateY(10px);
}

.modal-fade-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.modal-fade-exit {
  opacity: 1;
  transform: translateY(0);
}

.modal-fade-exit-active {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-loading-container {
    padding: 40px 20px;
    min-height: 250px;
  }
  
  .modal-spinner {
    width: 50px;
    height: 50px;
  }
  
  .modal-loading-text {
    font-size: 1em;
  }
  
  .modal-empty-icon,
  .modal-error-icon,
  .modal-success-icon {
    font-size: 3em;
  }
}
