/* Assistant flow body: full-width narration (figma 16/28 scaled 0.875 → 14/24
   with the markdown token ladder), block gap 16. The Settings font-size
   preference rides the body-published axis: size follows
   --dsh-content-font-size and the line height keeps the 10px leading via the
   shared px delta. IconActions sit below the body with an explicit 16px top
   margin (figma 43:32997) — separate from the body's internal gap so the
   footer spacing stays fixed when the body is a single block. */

.root {
  display: flex;
  flex-direction: column;
  font-size: var(--dsh-content-font-size, 14px);
  line-height: calc(24px + var(--dsh-content-font-delta, 0px));
  color: var(--dsw-alias-label-primary);
}

.body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Wide markdown tables (the renderer's ≥4-column md-table-wide hook) span
   the whole transcript width instead of clipping at the 748px message
   column, while the table content keeps starting at its normal x (the lead
   padding compensates the negative margin) — deepsuite chat TableWrapper
   parity, with 100cqw (the ChatView scroll container) standing in for its
   JS-measured --dsl-virtual-list-width. `--dsh-table-spare` clamps to zero
   when the transcript is narrower than the message column, so narrow
   viewports keep the plain in-column scroll with no sideways shift.
   Percentages resolve against the wrapper's containing block, so a table
   indented inside a list still reaches the same transcript edges. */
.body :global(.md-table-wide) {
  --dsh-table-spare: max(0px, calc((100cqw - var(--dsh-chat-content-width)) / 2));
  --dsh-table-lead: calc(var(--dsh-table-spare) + min(var(--dsh-chat-content-width), 100cqw) - 100%);
  box-sizing: border-box;
  width: calc(100% + var(--dsh-table-lead) + var(--dsh-table-spare));
  /* The base .tableScroll caps at the column (max-width: 100%); the breakout
     is exactly the case that must exceed it. */
  max-width: none;
  margin-left: calc(-1 * var(--dsh-table-lead));
  padding-left: var(--dsh-table-lead);
}

/* hidden="until-found" keeps a zero-height reasoning box in flex layout.
   Cancel the one gap that box would otherwise leave before the visible reply;
   visible Assistant blocks retain the ordinary 16px rhythm. */
.body > [data-turn-process-inline][hidden] {
  margin-bottom: -16px;
}

/* Interrupted-turn terminal marker: quiet inline tag, no animation. Fixed
   size like the small/code token variants — 11px is dense secondary text
   that would fall to an illegible 9px at the 12px floor. */
.stopped {
  align-self: flex-start;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--dsw-alias-interactive-bg-hover);
  color: var(--dsw-alias-label-tertiary);
  font-size: 11px;
  line-height: 18px;
}

/* Finalized footer offset (figma 43:32997); chrome lives in MessageIconActions. */
.actions {
  margin-top: 16px;
  /* Optical align with 28px icon hit targets that pad 6px past the glyph. */
  margin-left: -6px;
}
