/* ============================================================
   Progress — Progress bars and status indicators
   ============================================================ */

.progress-container {
  margin: 1rem 0;
}

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

.progress-bar__fill {
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-bar__fill.indeterminate {
  width: 30%;
  animation: progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes progress-indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

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

.progress-info__count {
  font-weight: 600;
  color: var(--color-text);
}

/* --- Per-file mini progress --- */
.file-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--color-bg-tertiary);
}

.file-progress__fill {
  height: 100%;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}

.file-progress__fill.done {
  background-color: var(--color-success);
}

.file-progress__fill.error {
  background-color: var(--color-error);
}

/* --- Status badge --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-pending   { background-color: var(--color-bg-tertiary); color: var(--color-text-muted); }
.status-processing { background-color: var(--color-primary-light); color: var(--color-primary); }
.status-done      { background-color: var(--color-success-bg); color: var(--color-success); }
.status-error     { background-color: var(--color-error-bg); color: var(--color-error); }

/* --- Spinner --- */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
