/* The one progress piece (T2W ADR-216, ui/progress.js): the ring and the progress row, the same on the hub's pages and
   on T2W's -- so it brings its own colours and leans on neither page's stylesheet. Why it moves as it does is in progress.js.
   Nothing here blurs, nothing repeats for ever but the glint of a ring that is working, and every entrance is `backwards`. */
.pg-ring { --pg: 28px; --pg-c: #0a84ff; position: relative; flex: none; display: inline-grid; place-items: center; width: var(--pg); height: var(--pg); border-radius: 50%; }
.pg-ring[hidden] { display: none; }
.pg-ring svg { grid-area: 1 / 1; width: 100%; height: 100%; fill: none; overflow: visible; }
.pg-ring .pg-o { transform: rotate(-90deg); stroke-width: var(--pg-w, 2.2); transition: opacity .2s ease; }
.pg-ring .pg-track { stroke: rgba(255, 255, 255, .16); }
.pg-ring .pg-arc { stroke: var(--pg-c); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .5s cubic-bezier(.3, .7, .3, 1), stroke .2s; }
.pg-ring.est .pg-arc { transition: stroke-dashoffset .55s linear; }           /* the clock ticks twice a second: one even glide */
.pg-ring .pg-glint { stroke: rgba(255, 255, 255, .55); stroke-linecap: round; stroke-dasharray: 9 91; transform-origin: 10px 10px; opacity: 0; }
.pg-ring.run .pg-glint { opacity: 1; animation: pg-turn 1.5s linear infinite; }                     /* working: never still */
.pg-ring.wait .pg-track { animation: pg-breathe 1.8s ease-in-out infinite; }                         /* waiting: it breathes */
.pg-ring.fail .pg-arc { stroke: #ff453a; }
.pg-ring.pg-warn { --pg-c: #ffcc4d; }                                                                  /* stuck: what it has, amber and still */
.pg-ring.pg-warn .pg-track, .pg-ring.pg-idle .pg-track { animation: none; }                        /* idle: not out for weeks -- nothing is working, nothing breathes */
.pg-ring .pg-tick { position: absolute; inset: 0; border-radius: 50%; background: rgba(48, 209, 88, .16); stroke: #30d158; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.pg-ring .pg-tick path { stroke-dasharray: 1; }
.pg-ring.done .pg-arc { stroke: #30d158; transition-duration: .3s; }
.pg-ring.done .pg-o { opacity: 0; }
.pg-ring.done .pg-tick { opacity: 1; }
/* seen to end: the ring closes (.3 s), then the tick pops in and is drawn -- once */
.pg-ring.done.pop .pg-o { transition-delay: .32s; }
.pg-ring.done.pop .pg-tick { animation: pg-pop .5s cubic-bezier(.34, 1.56, .64, 1) .3s backwards; }
.pg-ring.done.pop .pg-tick path { animation: pg-draw .28s ease-out .46s backwards; }
@keyframes pg-turn { to { transform: rotate(360deg); } }
@keyframes pg-breathe { 50% { stroke: rgba(255, 255, 255, .36); } }
@keyframes pg-pop { from { transform: scale(.3); opacity: 0; } }
@keyframes pg-draw { from { stroke-dashoffset: 1; } }

/* the row: icon, title, one status line, the ring or its button */
.pg-row { box-sizing: border-box; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; overflow: hidden; }
.pg-row + .pg-row { border-top: 1px solid rgba(255, 255, 255, .07); }
.pg-ico { --pg-ico: 40px; flex: none; box-sizing: border-box; width: var(--pg-ico); height: var(--pg-ico); padding: 6px; border-radius: 10px; object-fit: contain; background: rgba(255, 255, 255, .07); }
span.pg-ico.letter { display: grid; place-items: center; padding: 0; font-size: 17px; font-weight: 700; color: #98989f; }
.pg-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; color: inherit; text-decoration: none; }
.pg-name { font-size: 15px; font-weight: 600; color: #f5f5f7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the step may take a second line on a narrow row ("Downloading · 62% · 4 min left"): its numbers are the point, never three dots */
.pg-step { font-size: 13px; line-height: 1.3; color: #98989f; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-variant-numeric: tabular-nums; transition: color .2s; }
.pg-step:empty { display: none; }
.pg-row.run .pg-step { color: #64d2ff; }
.pg-row.done .pg-step { color: #30d158; }
.pg-err { font-size: 13px; line-height: 1.35; color: #ff453a; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pg-err[hidden] { display: none; }
.pg-row.pg-warn .pg-step { color: #ffcc4d; }
/* a film's or a series' poster where an app has its logo (T2W ADR-217) */
.pg-poster { flex: none; display: block; width: 36px; height: 54px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .07); }
.pg-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-act { flex: none; display: grid; place-items: center; min-width: 72px; min-height: 44px; }
.pg-act:empty { display: none; }
/* the button where the ring will be: an app store's capsule */
button.pg-go { position: relative; box-sizing: border-box; width: auto; height: auto; min-width: 72px; min-height: 30px; margin: 0; padding: 0 14px; border: 0; box-shadow: none; text-transform: none; letter-spacing: 0; border-radius: 999px; background: #0a84ff; color: #fff;
  font: inherit; font-size: 13px; font-weight: 650; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background .15s, transform .15s, opacity .15s; }
button.pg-go:hover:not(:disabled) { background: #2a95ff; }
button.pg-go:active:not(:disabled) { transform: scale(.94); }
button.pg-go:disabled { opacity: .5; cursor: default; }
button.pg-go[hidden] { display: none; }
button.pg-go:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 2px; }
button.pg-go::after { content: ""; position: absolute; inset: -7px 0; }           /* a finger's 44 px */
/* a running ring that can be stopped is a button, as an app store's: the square in its middle says so */
button.pg-stop { position: relative; box-sizing: border-box; display: grid; place-items: center; width: 44px; height: 44px; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 50%;
  box-shadow: none; background: none; color: #0a84ff; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background .15s, transform .15s, opacity .15s; }
button.pg-stop::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
button.pg-stop:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
button.pg-stop:active:not(:disabled) { transform: scale(.92); }
button.pg-stop:disabled { opacity: .5; cursor: default; }
button.pg-stop:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 0; }
.pg-row.pg-warn button.pg-stop { color: #ffcc4d; }
/* a file's row (T2W ADR-218): its kind as a glyph, its own picture over it when there is one; the x waves a row off */
.pg-file { position: relative; display: grid; place-items: center; padding: 0; overflow: hidden; color: #98989f; }
.pg-file svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pg-file img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s ease; }
.pg-file img.on { opacity: 1; }
button.pg-x { position: relative; flex: none; box-sizing: border-box; display: grid; place-items: center; width: 30px; height: 30px; min-width: 0; margin: 0 2px 0 -6px; padding: 0; border: 0; border-radius: 50%;
  box-shadow: none; background: none; color: #98989f; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background .15s, color .15s; }
button.pg-x::after { content: ""; position: absolute; inset: -7px; }                /* a finger's 44 px */
button.pg-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
button.pg-x:hover { background: rgba(255, 255, 255, .08); color: #f5f5f7; }
button.pg-x:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 0; }
.pg-row.in { animation: pg-in .3s cubic-bezier(.2, .8, .2, 1) backwards; }
.pg-row.out { min-height: 0; padding-block: 0; opacity: 0; transition: height .32s cubic-bezier(.3, .7, .3, 1), padding .32s, opacity .2s; }
@keyframes pg-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .pg-ring *, .pg-row.in, .pg-row.out { animation: none !important; transition: none !important; }
}
/* around the bell (chat.js bellRing): thin, outside the button, under its count; it fades when the work is over */
#hubbell-btn > .pg-ring { --pg-w: .75; position: absolute; inset: -17.7%; width: auto; height: auto; pointer-events: none; transition: opacity .5s ease; }
#hubbell-btn > .pg-ring[hidden] { display: inline-grid; opacity: 0; }
#hubbell-btn > .pg-ring .pg-track { stroke: rgba(255, 255, 255, .12); }
#hubbell-btn > .pg-ring .pg-tick { display: none; }
#hubbell-btn > .pg-ring.done .pg-o { opacity: 1; }
