.operation-progress { position: sticky; top: 12px; z-index: 5; padding: 16px 20px; margin: 0 0 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 14px rgb(0 0 0 / 4%); }
.operation-progress[hidden] { display: none; }
.operation-progress-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.operation-progress-heading strong { font-size: 14px; }
.operation-progress-heading > span { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.operation-progress-track { height: 4px; margin: 12px 0 16px; overflow: hidden; background: var(--surface-soft); border-radius: 4px; }
.operation-progress-track > span { display: block; height: 100%; width: 100%; background: var(--primary); transform-origin: left center; transform: scaleX(0); transition: transform 260ms cubic-bezier(.22,1,.36,1); }
.operation-progress-steps { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.operation-progress-steps li { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; color: var(--text-secondary); line-height: 1.4; overflow-wrap: anywhere; }
.operation-step-marker { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); font-size: 11px; font-variant-numeric: tabular-nums; }
.operation-progress-steps [data-state=done] { color: var(--primary-dark); }
.operation-progress-steps [data-state=done] .operation-step-marker { border-color: var(--primary); background: var(--surface-soft); }
.operation-progress-steps [data-state=current] { color: var(--text); font-weight: 600; }
.operation-progress-steps [data-state=current] .operation-step-marker { background: var(--primary); border-color: var(--primary); color: #fff; animation: operation-pulse 1.6s ease-in-out infinite; }
.operation-progress [data-operation-status] { margin: 12px 0 0; font-size: 12px; color: var(--text-secondary); overflow-wrap: anywhere; white-space: pre-line; }
.operation-progress[data-state=error] { border-color: var(--danger, #b54444); }
.operation-progress[data-state=error] [data-operation-status] { color: var(--danger, #b54444); }
@keyframes operation-pulse { 50% { opacity: .6; } }
@media (max-width: 700px) { .operation-progress { position: static; padding: 14px; } .operation-progress-steps { flex-wrap: wrap; gap: 12px; } .operation-progress-steps li { flex: 1 1 40%; } }
@media (prefers-reduced-motion: reduce) { .operation-progress-track > span { transition: none; } .operation-progress-steps .operation-step-marker { animation: none; } }

.operation-progress:has(> [data-operation-status]:only-child) {
  position: static; margin-bottom: 12px; padding: 0; border: 0; background: transparent; box-shadow: none;
}
.operation-progress > [data-operation-status]:only-child { margin: 0; }
