/* Coach cards (COACH-CARDS): a coach's rest countdown and the day's workout with the Align figure, on
 * a chat card's surface (.cc-card, app.css). docs/design/cloud-coach-cards.md is how they look. */

/* ---------- the countdown ---------- */
.cc-tm { gap: 10px; }
.cc-tm .cc-tm-word { margin: 0; }
.cc-tm[data-phase="over"] .cc-tm-word { color: var(--text); font-weight: 600; }
.cc-tm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.cc-tm-num {
  font-size: 44px; font-weight: 600; line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.cc-tm[data-phase="over"] .cc-tm-num, .cc-tm[data-phase="skipped"] .cc-tm-num { color: var(--muted); }
.cc-tm-acts { display: flex; gap: 8px; flex: none; }
.cc-tm-btn { height: 44px; min-width: 64px; padding: 0 14px; }
/* the bar drains from the right as the rest runs down; it slides, so its round end stays round */
.cc-tm-track { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.cc-tm-fill {
  height: 100%; border-radius: inherit; background: var(--accent);
  transform: translateX(calc((var(--p, 1) - 1) * 100%)); transition: transform 250ms linear;
}
.cc-tm-next { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.cc-tm-note { margin-top: -2px; }
@media (prefers-reduced-motion: reduce) { .cc-tm-fill { transition: none; } }

/* ---------- the workout ---------- */
.cc-wk, .gm-col > .cc-wk { width: min(100%, 560px); }
.cc-wk { gap: 14px; }
.cc-wk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cc-wk-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; text-wrap: balance; }
.cc-wk-count { margin: 0; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* the figure beside what it's doing, the muscles it works under both; narrower on a phone, where
 * the words need the room, and with the muscles under the words where there's room for them */
.cc-wk-hero {
  display: grid; grid-template-columns: 116px minmax(0, 1fr); grid-template-areas: "fig now" "works works";
  column-gap: 14px; row-gap: 10px; align-items: center;
}
@media (min-width: 761px) {
  .cc-wk-hero { grid-template-columns: 168px minmax(0, 1fr); grid-template-areas: "fig now" "fig works"; align-items: end; }
  .cc-wk-hero > .cc-wk-works { align-self: start; margin-top: 0; }
}
.cc-wk-hero > .cc-wk-big { grid-area: fig; align-self: center; }
.cc-wk-hero > .cc-wk-now { grid-area: now; }
.cc-wk-hero > .cc-wk-works { grid-area: works; }
.cc-wk-stage { display: block; }
.cc-wk-big { aspect-ratio: 10 / 11; }
.cc-fig { display: block; width: 100%; height: 100%; overflow: visible; }
.cc-wk-now { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cc-wk-kicker { margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.cc-wk-name { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; text-wrap: balance; overflow-wrap: anywhere; }
.cc-wk-lines { display: flex; flex-direction: column; gap: 2px; }
.cc-wk-set { margin: 0; font-size: 15px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.cc-wk-rest { margin: 0; font-size: 13.5px; color: var(--text-2); }
/* the phase the figure is in, as the Align app cued it; a dot in the accent marks it as live */
.cc-wk-cue { margin: 2px 0 0; min-height: 1.45em; display: flex; align-items: baseline; gap: 7px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.cc-wk-cue:not(:empty)::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 999px; background: var(--accent); transform: translateY(-1px); }
.cc-wk-works { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cc-wk-works li {
  padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

/* the day's exercises, a row each, the one on the figure selected */
.cc-wk-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cc-wk-row {
  width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 8px;
  border: 0; border-radius: 12px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.cc-wk-row[aria-pressed="true"] { background: var(--selected); }
@media (hover: hover) and (pointer: fine) { .cc-wk-row[aria-pressed="false"]:hover { background: var(--hover-2); } }
.cc-wk-row:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.cc-wk-mini { width: 40px; height: 40px; flex: none; }
.cc-wk-row-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cc-wk-row-name { font-size: 15px; font-weight: 500; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-wk-row-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cc-wk-row.done .cc-wk-row-name { color: var(--text-2); }
.cc-wk-dots { flex: none; display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cc-wk-dot { width: 8px; height: 8px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--hollow); }
.cc-wk-dot.on { background: var(--accent); box-shadow: none; }
.cc-wk-open { width: 100%; height: 44px; }

/* the figure itself: the Align figure's outline in the text color over the page's ground, the
 * muscles it works in the accent (mixed per frame on the page), equipment in the hollow grey */
.cc-fig-floor { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cc-fig-line { fill: var(--text); stroke: var(--text); stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cc-fig-body { fill: var(--bg); }
.cc-fig-gear-line { fill: var(--text-2); stroke: var(--text-2); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cc-fig-gear { fill: var(--hollow); }
.cc-wk-mini .cc-fig-line { stroke-width: 1.3; }
.cc-wk-mini .cc-fig-gear-line { stroke-width: 1; }
.cc-wk-mini .cc-fig-floor { display: none; }
