/* Progress: the dock (head of the task strip), the desktop "Now" slot and the stage list (stages.js, dock.js). */

/* ---------- dock: one line above the tab bar ---------- */
.task-dock { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 2px var(--s3); min-height: 56px; padding: var(--s2) var(--edge); color: inherit; text-decoration: none; }
button.task-dock { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.task-dock + .task-rows { border-top: 1px solid var(--muted-dark); }
.dock-thumb { display: block; width: 40px; height: 40px; overflow: hidden; background: var(--tone); }
.dock-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dock-thumb .frame { width: 100%; height: 100%; }
.dock-text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--s2); min-width: 0; font-size: 14px; line-height: 1.3; }
.dock-stage { min-width: 0; font-weight: 700; overflow-wrap: break-word; }
.task-dock .task-side { max-width: 100%; text-align: left; }
/* A ready result's product name is one line, cut with an ellipsis. */
.dock-ready .task-side { flex: 1 1 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The desktop .task grid puts every child in column 1; the dock keeps its own thumb | text | arrow columns. */
.task-dock > * { grid-column: auto; }
.dock-bar { display: block; grid-column: 2 / -1; margin-top: 4px; height: 3px; background: var(--ink); }
.dock-see { padding: 10px 14px; background: var(--brand); color: var(--ink); font-size: 12px; white-space: nowrap; }
.dock-count { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--muted-dark); font-weight: 700; }
.dock-many::after { content: "›"; font-size: 22px; line-height: 1; transition: transform 0.2s; }
.dock-many[aria-expanded="true"]::after { transform: rotate(90deg); }
/* "Your look is ready" stays on the dark strip; its "See it" is the brand-coloured button (design: Result-After). */
.dock-ready .dock-thumb { width: 40px; height: 56px; }

/* Phones: one dock line; the rows open from the summary, or stay open when one of them needs an action. */
@media (max-width: 899px) {
  .task-strip[data-collapsed] .task-rows { display: none; }
}

/* ---------- desktop "Now" slot: the first place in the right column ---------- */
.now-slot:not([data-busy]) { display: none; }
.now-slot { margin-bottom: var(--gap-block); }
.task-strip[data-mode="slot"] { position: static; max-height: none; overflow: visible; }
.dock-full { display: block; padding: var(--s3) var(--s3); }
.dock-now { margin: 0 0 var(--s2); color: var(--muted-dark); }
.dock-product { display: flex; align-items: center; gap: var(--s3); color: inherit; font-weight: 600; text-decoration: none; }
.dock-product:hover { text-decoration: underline; }

/* ---------- the stage list ---------- */
.stages { list-style: none; margin: var(--s3) 0 0; padding: 0; font-size: 14px; line-height: 1.35; }
.stage { position: relative; padding: 0 0 var(--s2) 24px; }
.stage:last-child { padding-bottom: 0; }
.stage-mark { position: absolute; left: 0; top: 3px; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; }
.stage-current { font-weight: 700; }
.stage-current .stage-mark { border-color: var(--brand); background: var(--brand); animation: stage-pulse 1.2s ease-in-out infinite; }
.stage-todo { opacity: 0.6; }
@keyframes stage-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--brand); } 50% { opacity: 0.35; transform: scale(0.75); box-shadow: 0 0 0 5px transparent; } }

/* The result page: the stage list is the page's progress, on the page's ground. */
.result-stages .stage-todo { color: var(--muted); }
.result-stages { font-size: 16px; }
.result-actions { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }

@media (prefers-reduced-motion: reduce) {
  .stage-current .stage-mark { animation: none; }
  .dock-many::after { transition: none; }
}
