/**
 * 加载动画样式
 */

/* 上传加载遮罩层 */
.upload-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* 加载动画容器 */
.upload-loading-container {
  background: white;
  border-radius: 12px;
  padding: 30px 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
  min-width: 200px;
  animation: fadeInScale 0.3s ease-out;
}

/* 加载动画 */
.upload-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

/* 加载文字 */
.upload-loading-text {
  color: #333;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

/* 加载进度条 */
.upload-loading-progress {
  width: 100%;
  height: 4px;
  background-color: #f0f0f0;
  border-radius: 2px;
  margin-top: 15px;
  overflow: hidden;
}

.upload-loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #007bff, #0056b3);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
  animation: progressPulse 2s ease-in-out infinite;
}

/* 动画定义 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes progressPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* 文件预览项的上传状态 */
.file-item.uploading {
  opacity: 0.7;
  position: relative;
}

.file-item.uploading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 10px;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translateY(-50%);
}

.file-item.upload-success {
  color: #28a745;
}

.file-item.upload-error {
  color: #dc3545;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .upload-loading-container {
    margin: 20px;
    padding: 25px 30px;
    min-width: 180px;
  }
  
  .upload-loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }
  
  .upload-loading-text {
    font-size: 14px;
  }
}
