/* Show changes in a ticket's conversation (GitHub issue 488, stage 3; docs/adr/0247-show-changes-and-the-phone.md;
   public/js/app/ticket-changes.js). Since GitHub issue 599 the conversation's All filter threads them (its filters are in
   ticket-conversation.css). Since the Record workspace (docs/adr/0387-record-workspace-ticket-page.md) each change is one
   muted line with an icon ("Priya Shah linked problem OUT-001 · Nov 19, 4:00 PM"), the fields it doesn't say in the
   same small muted type under it, and a run of one person's changes folds to one line ("made 3 changes ▸"), a button
   that opens to each change's line. Quieter than a message so the conversation still reads first. Long text wraps,
   never cut. Colors are the palette's tokens, so the dark theme follows. */

/* The messages' list shows while it has changes, even before the first reply. */
.tp-conversation > .comment-history.tc-showing:has(> .tc-change) { display:grid; }
.tc-change { display:grid; grid-template-columns:auto minmax(0, 1fr); align-items:start; gap:var(--space-100); margin:0 0 0 var(--space-600); padding:var(--space-25) 0; color:var(--muted); font-size:var(--text-sm); line-height:var(--leading-normal); overflow-wrap:anywhere; }
/* The icon sits on the first line's middle, in the line's own color. */
.tc-icon { display:flex; align-items:center; justify-content:center; width:1rem; height:calc(var(--leading-normal) * 1em); color:var(--muted); }
.tc-icon svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.tc-body { min-width:0; }
.tc-line { margin:0; }
.tc-body b { color:var(--ink-2); font-weight:var(--weight-semibold); }
.tc-dot { margin:0 var(--space-25); }
.tc-when { white-space:nowrap; }
/* A problem's or a ticket's number that opens its peek. */
.tc-line .tc-ref, .tc-fields .tc-ref { font-size:inherit; white-space:normal; }
.tc-ref:focus-visible { outline:2px solid var(--spruce); outline-offset:2px; border-radius:var(--radius-sm); }
.tc-fields { display:grid; gap:0; margin:0; padding:0; list-style:none; font-size:var(--text-xs); }
.tc-fields li { min-width:0; overflow-wrap:anywhere; }

/* A folded run: its line is the button; open, each change's line under it. */
.tc-run-toggle { display:inline; margin:0; padding:0; border:0; background:none; color:inherit; font:inherit; line-height:inherit; text-align:left; cursor:pointer; }
.tc-run-toggle:hover { color:var(--ink-2); text-decoration:underline; text-underline-offset:2px; }
.tc-run-toggle:focus-visible { outline:2px solid var(--spruce); outline-offset:2px; border-radius:var(--radius-sm); }
.tc-caret { display:inline-block; transition:transform .15s ease; }
.tc-run-toggle[aria-expanded="true"] .tc-caret { transform:rotate(90deg); }
.tc-run-list[hidden] { display:none; }
.tc-run-list { display:grid; gap:var(--space-25); margin:var(--space-25) 0 0; padding:0; list-style:none; }
.tc-run-item { display:grid; grid-template-columns:auto minmax(0, 1fr); align-items:start; gap:var(--space-100); }

@media (prefers-reduced-motion:reduce) { .tc-caret { transition:none; } }
@media (max-width:700px) {
  .tc-change { margin-left:0; }
  /* A finger's target on a phone; the run's icon stays on its line's middle. */
  .tc-run-toggle { display:inline-flex; flex-wrap:wrap; align-items:center; column-gap:.25em; min-height:44px; }
  .tc-run > .tc-icon { height:44px; }
}
@media print { .tc-caret { display:none; } }
