/**
 * AniWorld - Progress Styles
 *
 * Progress bars, loading indicators,
 * and download progress displays.
 */

/* Progress bar base */
.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--color-bg-tertiary);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--color-accent);
  border-radius: var(--border-radius-sm);
  transition: width var(--transition-duration) var(--transition-easing);
  width: 0%;
}

.progress-text {
  margin-top: var(--spacing-xs);
  text-align: center;
  font-size: var(--font-size-caption);
  color: var(--color-text-secondary);
}

/* Progress container */
.progress-container {
  margin-top: var(--spacing-md);
}

/* Mini progress bar */
.progress-bar-mini {
  width: 80px;
  height: 4px;
  background-color: var(--color-bg-tertiary);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.progress-fill-mini {
  height: 100%;
  background-color: var(--color-accent);
  border-radius: var(--border-radius-sm);
  transition: width var(--transition-duration) var(--transition-easing);
  width: 0%;
}

.progress-text-mini {
  font-size: var(--font-size-caption);
  color: var(--color-text-secondary);
  font-weight: 500;
  min-width: 35px;
}

/* Download progress */
.download-progress {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  min-width: 120px;
  margin-top: var(--spacing-lg);
}

/* Progress bar gradient style */
.download-progress .progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

.download-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-caption);
  color: var(--color-text-secondary);
}

.download-speed {
  color: var(--color-primary);
  font-weight: 500;
}

/* Missing episodes status */
.missing-episodes {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--color-text-secondary);
  font-size: var(--font-size-caption);
}

.missing-episodes i {
  color: var(--color-warning);
}

.missing-episodes.has-missing {
  color: var(--color-warning);
  font-weight: 500;
}

.missing-episodes.complete {
  color: var(--color-success);
  font-weight: 500;
}

.missing-episodes.has-missing i {
  color: var(--color-warning);
}

.missing-episodes.complete i {
  color: var(--color-success);
}

/* Speed and ETA section */
.speed-eta-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
}

.speed-info {
  display: flex;
  gap: var(--spacing-xl);
}

.speed-current,
.speed-average,
.eta-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.speed-info .label,
.eta-info .label {
  font-size: var(--font-size-caption);
  color: var(--color-text-secondary);
  text-transform: uppercase;
}

.speed-info .value,
.eta-info .value {
  font-size: var(--font-size-subtitle);
  font-weight: 500;
  color: var(--color-text-primary);
}

/* Dark theme adjustments */
[data-theme="dark"] .speed-eta-section {
  background: var(--color-surface-dark);
  border-color: var(--color-border-dark);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .current-download-item {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
  }

  .download-progress {
    justify-content: space-between;
  }

  .speed-eta-section {
    flex-direction: column;
    gap: var(--spacing-lg);
    text-align: center;
  }

  .speed-info {
    justify-content: center;
  }
}
