/**
 * 轮询状态框样式
 * 用于显示异步任务处理进度
 */

/* 遮罩层 */
.task-status-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 30000; /* [修复] 提升层级，确保在 Uppy (20000+) 之上 */
  backdrop-filter: blur(2px);
}

/* 任务状态面板 */
.task-status-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 2rem;
  min-width: 400px;
  max-width: 500px;
  z-index: 30001; /* [修复] 提升层级 */
  border: 1px solid #e5e7eb;
}

.task-status-content h3 {
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.task-status-content p {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* 进度条容器 */
.task-progress {
  margin: 1.5rem 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.status-text {
  color: #6b7280;
  font-size: 0.875rem;
  text-align: center;
  margin: 0;
}

/* 状态文本样式 */
.status-text.status-completed {
  color: #10b981;
  font-weight: 600;
}

.status-text.status-failed {
  color: #ef4444;
  font-weight: 600;
}

.status-text.status-error {
  color: #ef4444;
  font-weight: 600;
}

.status-text.status-timeout {
  color: #f59e0b;
  font-weight: 600;
}

/* 查看按钮 */
.btn-check-status {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.btn-check-status:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(102, 126, 234, 0.5);
}

.btn-check-status:active:not(:disabled) {
  transform: translateY(0);
}

.btn-check-status:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 640px) {
  .task-status-panel {
    min-width: 320px;
    max-width: 90vw;
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .task-status-content h3 {
    font-size: 1.125rem;
  }
}

/* 动画效果 */
@keyframes fade-in-scale {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.task-status-panel {
  animation: fade-in-scale 0.3s ease-out;
}

/* 加载动画 */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.progress-fill {
  animation: pulse 2s ease-in-out infinite;
}

/* 进度条动画 */
@keyframes progress-animation {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.progress-fill {
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #3b82f6 100%);
  background-size: 200% 100%;
  animation: progress-animation 2s linear infinite;
}
