/* Live progress component (templates/_progress.html) and the top-bar activity indicator (app/static/progress.js). */
.pg { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; min-width: 0; max-width: 520px; }
.pg-title { font-weight: var(--fw-semi); font-size: var(--fs-sm); }
.pg-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); }
.pg-label { font-weight: var(--fw-semi); }
.pg-pct { font-variant-numeric: tabular-nums; }
.pg-elapsed { font-variant-numeric: tabular-nums; }
.pg-bar { position: relative; height: 5px; border-radius: var(--r-xs); background: var(--surface-3); overflow: hidden; width: 100%; max-width: 320px; }
.pg-bar i { display: block; height: 100%; background: var(--run); border-radius: var(--r-xs); transition: width .6s ease; }
.pg-indet i { width: 35%; position: absolute; left: 0; animation: pg-slide 1.6s ease-in-out infinite; }
@keyframes pg-slide { 0% { left: -35%; } 100% { left: 100%; } }
.pg-reason { color: var(--muted); }
.pg-queued .pg-label { color: var(--muted); }
.pg-detail { overflow-wrap: anywhere; }
.pg-warn { color: var(--warn); display: flex; align-items: center; gap: 4px; }
.pg-warn[hidden] { display: none; }
.pg-stale .pg-bar i { background: var(--warn); }
.pg-failed .pg-label { color: var(--err); }
.pg-done .pg-label { color: var(--ok); }
.pg-compact { max-width: 320px; }
.pg-compact .pg-bar { max-width: 160px; }
.pg-lines { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-lines .pg-stale { color: var(--warn); }
.pg-chunks td { vertical-align: top; }
.pg-node { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.pg-node:last-child { border-bottom: 0; padding-bottom: 0; }
.pg-plan .pg { margin-top: 2px; }
.pg-strip { margin-bottom: var(--s-4, 16px); }
.pg-strip-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 20px; padding: 10px 16px 14px; }
.pg-strip-more { padding: 0 16px 10px; }
.hub-progress { margin-top: 6px; }
.feeds-progress { margin-bottom: var(--s-4, 16px); }
.feeds-progress .card-body { padding: 12px 16px; }

/* top bar: fixed-size icon button, the count is an overlay (no layout shift) */
.act { position: relative; display: inline-flex; }
.act-btn { position: relative; }
.act-count { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r);
  background: var(--run); color: #fff; font-size: var(--fs-2xs); font-weight: var(--fw-bold); line-height: 16px; text-align: center;
  pointer-events: none; font-variant-numeric: tabular-nums; }
.act-count[hidden] { display: none; }
.act.act-on .act-btn svg.i { color: var(--run); }
.act-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-navpop, 60); width: min(380px, calc(100vw - 24px));
  max-height: min(520px, 75vh); overflow: auto; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 10px 12px; }
.act-pop[hidden] { display: none; }
/* R-161 (1.7.0): on a phone the panel is a sheet under the top bar (it left the screen by 22 px on the left) */
@media (max-width: 640px) { .act-pop { position: fixed; left: 12px; right: 12px; top: calc(var(--topbar-h) + 4px); width: auto; } }
.act-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.act-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.act-item { padding: 8px 0; border-top: 1px solid var(--border); max-width: none; margin: 0; }
.act-item:first-child { border-top: 0; }
.act-title { font-weight: var(--fw-semi); font-size: var(--fs-sm); }
.act-empty { margin: 4px 0; }
.act-empty[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .pg-indet i { animation: none; width: 100%; opacity: .45; }
  .pg-bar i { transition: none; }
}
