/**
 * 全局进度弹窗样式
 */

.progress-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  animation: progressModalFadeIn 0.2s ease;
}

/* 运行中状态 - 禁止关闭的提示 */
.progress-modal-overlay.running {
  cursor: default;
}

.progress-modal-overlay.running .progress-modal-container {
  cursor: default;
}

.progress-modal-container {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl, 16px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 90%;
  max-width: 360px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: progressModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 头部标题 */
.progress-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.progress-modal-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-modal-icon-animated {
  color: var(--primary, #22c55e);
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

.progress-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
  margin: 0;
}

/* 进度条区域 */
.progress-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-modal-bar-container {
  width: 100%;
  height: 12px;
  background: #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-modal-bar-fill {
  height: 100%;
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
  border-radius: 6px;
  position: relative;
  box-shadow: 0 1px 2px rgba(34, 197, 94, 0.3);
}

/* 不确定进度条（running 状态） */
.progress-modal-bar-indeterminate {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
  border-radius: 6px;
  animation: indeterminateSlide 1.5s infinite ease-in-out;
  box-shadow: 0 1px 2px rgba(34, 197, 94, 0.3);
}

@keyframes indeterminateSlide {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(150%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* 成功态 */
.progress-modal-success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.progress-modal-success-icon {
  color: var(--primary, #22c55e);
}

.progress-modal-success-message {
  font-size: 14px;
  color: var(--text-secondary, #666666);
  text-align: center;
  margin: 0;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.6;
}

.progress-modal-points-consumed {
  font-size: 13px;
  color: var(--primary, #22c55e);
  text-align: center;
  margin: 4px 0 0;
  font-weight: 500;
}

/* 状态信息 */
.progress-modal-info {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}

.progress-modal-status {
  color: var(--text-secondary, #666666);
}

/* 底部操作区 */
.progress-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 24px;
}

.progress-modal-hint {
  font-size: 13px;
  color: var(--text-tertiary, #999999);
}

.progress-modal-loading-dots::after {
  content: '...';
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: progressModalLoadingDots 1.2s steps(3, end) infinite;
}

@keyframes progressModalLoadingDots {
  0% { content: ''; }
  33% { content: '.'; }
  66% { content: '..'; }
  100% { content: '...'; }
}

/* 成功态步骤对勾 */
/* 错误内容 */
.progress-modal-error-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.progress-modal-error-icon {
  color: var(--error, #ef4444);
}

.progress-modal-error-message {
  font-size: 14px;
  color: var(--text-secondary, #666666);
  text-align: center;
  margin: 0;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.6;
}

.progress-modal-btn {
  padding: 10px 32px;
  background: var(--primary, #22c55e);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.progress-modal-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.progress-modal-btn:active {
  transform: translateY(0);
}

/* 错误关闭按钮 */
.progress-modal-btn-error {
  background: var(--error, #ef4444);
}

/* 动画 */
@keyframes progressModalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes progressModalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 暗黑模式适配 */
[data-theme='dark'] .progress-modal-container {
  background: rgba(40, 40, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .progress-modal-title {
  color: var(--text-primary, #ffffff);
}

[data-theme='dark'] .progress-modal-status {
  color: var(--text-secondary, #a0a0a0);
}


