/* The chat's composer part (round 3, package C3: docs/CHAT_ROUND3_SPEC.md 5.4): the price on
   the send button, the attachments above the box, the outbox's kept messages, the Attach sheet.
   Only the app's own tokens; nothing here is a new colour or a new font. */

/* the send button with a price: the price beside the arrow, never wrapped or cut, and narrow
   enough that the box keeps its room (5.4: at most 56 px with a price of up to four digits at
   320 px; below 360 px the price alone carries the button, its label still saying it sends) */
#desk .desk-box .desk-send .dc-price { font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
#desk .desk-box.dc-priced .desk-send { width: auto; min-width: 44px; max-width: 80px; padding: 0 8px 0 10px; border-radius: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  background: var(--primary, var(--accent, #3167ed)); color: var(--primary-ink, #fff); }
#desk .desk-box.dc-priced .desk-send svg { width: 14px; height: 14px; flex: none; }
@media (max-width: 359px) {
  #desk .desk-box.dc-priced .desk-send { padding: 0 8px; }
  #desk .desk-box.dc-priced .desk-send svg { display: none; }
}

/* 5.4: the bolt only while the box is empty and the send button shows no price; the microphone
   only on an empty box with nothing attached, the send button once there are words or a file */
#desk .desk-box:not(.empty) .desk-quick, #desk .desk-box.dc-priced .desk-quick { display: none; }
#desk .desk-box:not(.empty) .desk-mic, #desk .desk-box.dc-has-attach .desk-mic { display: none; }
#desk .desk-box.empty:not(.dc-has-attach) .desk-mic:not([hidden]) ~ .desk-send { display: none; }

/* the attachments of a reel's message, above the box */
.dc-attachrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; min-width: 0; }
.dc-attachrow[hidden], .dc-attachrow:empty { display: none; }
.dc-attach { display: inline-flex; align-items: center; gap: 2px; min-height: 36px; max-width: 100%; padding: 0 0 0 12px;
  border-radius: 18px; border: 1px solid var(--line, rgba(127, 127, 127, .3)); background: var(--panel-2, transparent);
  font-size: 14px; color: var(--ink, inherit); }
.dc-attach.busy { padding-right: 12px; color: var(--muted, inherit); }
.dc-attach-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* the remove button is a whole 44 by 44 target that overhangs the 36 px chip by 4 px each way */
.dc-attach .dc-attach-x { flex: none; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; margin: -4px 0;
  border: 0; background: transparent; color: var(--muted, inherit); display: grid; place-items: center; position: relative; }
.dc-attach .dc-attach-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* the outbox: his kept bubble, then what it waits for and the two ways on */
.dc-outbox { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0; }
.dc-outbox[hidden], .dc-outbox:empty { display: none; }
.dc-kept { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dc-kept > .desk-item { margin: 0; }
.dc-keptnote { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; max-width: 100%; }
.dc-keptwords { font-size: 13px; color: var(--warn, #d9822b); }
.dc-kept.dc-bad .dc-keptwords { color: var(--bad, #d33); }
.dc-keptnote button { min-height: 44px; min-width: 44px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.dc-keptnote button[hidden] { display: none; }
/* what goes with a kept message: each attachment's name, a small picture where it is one */
.dc-kept .dc-keptatts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; max-width: 100%; }
.dc-kept .dc-keptatt { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; max-width: 100%; padding: 2px 8px 2px 2px;
  border-radius: 8px; background: rgba(127, 127, 127, .16); font-size: 13px; line-height: 1.3; box-sizing: border-box; }
.dc-kept .dc-keptatt:not(.pic) { padding-left: 8px; }
.dc-kept .dc-keptatt img { flex: none; width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.dc-kept .dc-keptatt > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the Attach sheet: one row a way of adding, 56 px each */
.dc-attachsheet .dc-rows { display: flex; flex-direction: column; gap: 6px; }
.dc-attachsheet .dc-rows[hidden], .dc-attachsheet .dc-sub[hidden] { display: none; }
.dc-attachsheet .dc-row { display: block; width: 100%; min-height: 56px; padding: 0 16px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.dc-attachsheet .dc-hint { margin: 8px 0; color: var(--muted, inherit); font-size: 15px; line-height: 1.45; }
.dc-attachsheet .dc-clips { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.dc-attachsheet .dc-clip { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 6px 12px; text-align: left; }
.dc-attachsheet .dc-clip img { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--panel-2, transparent); }
.dc-attachsheet .dc-clipname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dc-attachsheet .dc-cliplen { color: var(--muted, inherit); font-size: 14px; font-variant-numeric: tabular-nums; }
.dc-attachsheet .dc-recacts { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-attachsheet .dc-recacts button { min-height: 44px; padding: 0 16px; }

@media (prefers-reduced-motion: reduce) { .dc-attach, .dc-kept { transition: none; animation: none; } }

/* the voice note's row: its name, and under it what reading it costs, both whole */
.dc-attachsheet .dc-row[data-row="note"] { display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  white-space: normal; padding-top: 6px; padding-bottom: 6px; line-height: 1.3; }
.dc-attachsheet .dc-rowsub { font-size: 14px; color: var(--muted, inherit); font-variant-numeric: tabular-nums; }

/* the walk (WK): the send button's price is white words at 14 px on the primary and needs
   4.5:1; the Simple layout's primary gives 3.8:1, so a priced send takes the primary darkened */
#desk .desk-box.dc-priced .desk-send { background: color-mix(in srgb, var(--primary) 85%, #000); }
