/* Composer, as in the r3 prototype Felix approved (Build item BUIL-2026-12-01-10): one + drop-up, usage ring and card, short model chip, one-row attachments, queued-next list. */

/* Felix 30 Nov ruling, refined 1 Dec (coordinator review of the first build): ONE neat row above the box with even gaps, scrolling sideways when it is full;
   pictures free flow at one shared height (their own width, uncropped); documents, slides and pasted text are one fixed tile; the annotations chip keeps
   its ratified 30px size; every item is 48px tall except the chip, centred on one line; the red remove badges never overlap a neighbour */
#image-preview{flex-wrap:nowrap;align-items:center;gap:16px;overflow-x:auto;overflow-y:hidden;padding:12px 12px 6px 2px;margin-bottom:var(--space-1);scrollbar-width:thin;scrollbar-color:var(--border) transparent;overscroll-behavior-x:contain}
#image-preview > *,#image-preview .preview-item{flex:none}
#large-paste-list:has(.large-paste-card){display:contents!important}
#response-annotation-tray{display:contents}
/* pictures: one shared height, free width */
#image-preview .attachment-card.attachment-card-thumb{box-sizing:border-box;height:48px}
#image-preview .attachment-card.attachment-card-thumb .attachment-media{height:46px;max-height:46px;width:auto;max-width:none;min-width:0;object-fit:cover;border:0;border-radius:0}
/* documents, slides and pasted text: one tile, 200 x 48 (the shipped pasted-text card's look) */
#image-preview .preview-item.large-paste-card,#image-preview .pending-file-preview:has(.attachment-card-chip){width:200px;max-width:none;height:48px}
#image-preview .attachment-card-chip,#image-preview .attachment-card-chip .pdf-attachment{width:200px;max-width:none}
#image-preview .large-paste-card .large-paste-attachment,#image-preview .attachment-card-chip .pdf-attachment{display:grid;vertical-align:top;height:48px;min-height:48px;box-sizing:border-box;border-radius:12px}
#image-preview .attachment-card-chip .pdf-attachment{grid-template-columns:20px minmax(0,1fr);grid-template-rows:auto auto;column-gap:var(--space-2);align-items:center;align-content:center;padding:var(--space-1) var(--space-3) var(--space-1) var(--space-2)}
#image-preview .large-paste-card .large-paste-attachment{align-content:center}
#image-preview .attachment-card-chip .pdf-attachment .pdf-attachment-icon{grid-column:1;grid-row:1/span 2;width:20px;height:20px}
#image-preview .attachment-card-chip .pdf-attachment .pdf-attachment-icon svg{width:16px;height:16px}
#image-preview .attachment-card-chip .pdf-attachment .pdf-attachment-name{grid-column:2;grid-row:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#image-preview .attachment-card-chip .pdf-attachment .pdf-attachment-size{grid-column:2;grid-row:2;font-size:11px}
#image-preview .an-chip{align-self:center}
/* a picture's wrapper hugs its card (no baseline gap under the inline card) */
#image-preview .pending-file-preview:has(.attachment-card-thumb){display:flex;height:48px}
/* the row scrolls sideways by wheel, trackpad or keyboard; no scrollbar line drawn above the box */
#image-preview{scrollbar-width:none}
#image-preview::-webkit-scrollbar{display:none}

/* ===== Felix 1 Dec ~10:30 AM SGT: attachments row: a fade at the edge that hides items, and a round arrow on that fade to scroll ===== */
#att-wrap{position:relative}
#att-wrap.more-r #image-preview{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 56px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 56px),transparent)}
#att-wrap.more-l #image-preview{-webkit-mask-image:linear-gradient(to right,transparent,#000 56px);mask-image:linear-gradient(to right,transparent,#000 56px)}
#att-wrap.more-l.more-r #image-preview{-webkit-mask-image:linear-gradient(to right,transparent,#000 56px,#000 calc(100% - 56px),transparent);mask-image:linear-gradient(to right,transparent,#000 56px,#000 calc(100% - 56px),transparent)}
.att-nav{position:absolute;top:calc(50% + 3px);transform:translateY(-50%);z-index:3;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;padding:0;cursor:pointer;
 background:var(--surface);color:var(--text);border:1px solid var(--border);box-shadow:0 2px 8px var(--k-fx-001)}
.att-nav:hover{border-color:var(--accent);color:var(--accent)}
.att-nav.l{left:2px}.att-nav.r{right:2px}
.att-nav[hidden]{display:none}

/* ===== Felix 1 Dec ~10:30 AM SGT: one "+" with a drop-up menu holds slash commands, restart agent, compaction and attachments; the usage ring stays
   outside it; the runtime chip is short (model and thinking), its full detail is in the tooltip ===== */
#input-toolbar-left #btn-slash,#input-toolbar-left #btn-media,#input-toolbar-left #btn-attach,#input-toolbar-left #btn-restart,#input-toolbar-left #btn-compact,#input-toolbar-left #compaction-text,#input-toolbar-left #model-label,#input-toolbar-left #effort-pill,#input-container > #composer-plus-btn,#input-container > #composer-model-chip{display:none!important}
#input-toolbar-left{gap:var(--space-2)}
#r3-plus{width:28px;height:28px;border-radius:50%;border:0;padding:0;display:inline-flex;align-items:center;justify-content:center;background:transparent;color:var(--text);cursor:pointer;flex:none}
#r3-plus svg{width:16px;height:16px;transition:transform .15s}
#r3-plus:hover{background:color-mix(in srgb,var(--text) 14%,transparent)}
#r3-plus[aria-expanded="true"]{background:var(--accent-dim);color:var(--k-fg-005,#fff)}
#r3-plus[aria-expanded="true"] svg{transform:rotate(45deg)}
#r3-ring{width:28px;height:28px;border:0;padding:0;background:none;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-dim);flex:none}
#r3-ring:hover{background:var(--k-bg-026);color:var(--text)}
#r3-ring svg{width:18px;height:18px;transform:rotate(-90deg)}
#r3-ring .trk{stroke:var(--border)}
#r3-ring[data-tone="warn"]{color:var(--yellow-color,#d29922)}
#r3-ring[data-tone="bad"]{color:var(--danger)}
#binding-indicator.r3-short{max-width:200px;margin-left:0}

/* the drop-up menu: the shipped "+" menu surface (TM1 compact composer), with words beside each icon */
#r3-menu{position:fixed;z-index:60;max-height:calc(100vh - 16px);overflow:auto;min-width:264px;padding:var(--space-2);display:flex;flex-direction:column;gap:2px;
 background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:0 8px 24px var(--k-fx-001);font-size:13px;color:var(--text)}
#r3-menu[hidden]{display:none}
#r3-menu .mi{display:flex;align-items:center;gap:var(--space-3);height:36px;padding:0 var(--space-3);border:0;border-radius:8px;background:none;color:var(--text);font:inherit;text-align:left;cursor:pointer;width:100%}
#r3-menu .mi:hover,#r3-menu .mi:focus-visible{background:var(--k-bg-026);outline:none}
#r3-menu .mi svg{width:16px;height:16px;flex:none;color:var(--text-dim)}
#r3-menu .mi .grow{flex:1;min-width:0}
#r3-menu .mi small{color:var(--text-dim);font-size:12px;white-space:nowrap}
#r3-menu .mi kbd{font:11px/1 ui-monospace,monospace;color:var(--text-dim);border:1px solid var(--border);border-radius:4px;padding:2px 5px}
#r3-menu hr{border:0;border-top:1px solid var(--border);margin:var(--space-1) var(--space-2)}
#r3-menu .mg{padding:6px var(--space-3) 2px;font-size:11px;color:var(--text-dim);letter-spacing:.02em}
#r3-menu .seg{display:inline-flex;border:1px solid var(--border);border-radius:999px;padding:2px;gap:2px;flex:none}
#r3-menu .seg span{padding:2px 9px;border-radius:999px;font-size:12px;color:var(--text-dim);white-space:nowrap}
#r3-menu .seg span.on{background:var(--accent-dim);color:var(--k-fg-005,#fff)}
#r3-menu .mi[aria-disabled="true"]{cursor:default;opacity:.6}
#r3-menu .cmd b{font-weight:600;font-family:ui-monospace,monospace;font-size:12px;min-width:76px}
#input-container{position:relative}

/* the 390 view (TM1's compact pill): the same "+" sits in the pill's "+" place, the ring and short chip in the chip place */
#input-container.composer-compact > #r3-plus{grid-area:plus;margin-left:var(--space-2);width:32px;height:32px}
#input-container.composer-compact > #r3-tailbox{grid-area:chip;display:flex;align-items:center;gap:var(--space-1)}
#input-container.composer-compact > #r3-tailbox #binding-indicator{display:inline-flex!important;max-width:120px;margin:0}
#input-container.composer-compact.composer-multiline > #r3-plus,#input-container.composer-compact.composer-multiline > #r3-tailbox{margin-bottom:var(--space-2)}

/* The usage card's content on the one shipped tooltip surface (.nlc-tooltip, above this in the generated tooltip-r3.css). Only the inside layout is
   new; surface, border, radius, shadow, font size and colours are the shipped tooltip's. */
.nlc-tooltip--usage{width:280px;max-width:min(300px,calc(100vw - 16px));padding:10px 12px;white-space:normal}
.nlc-tooltip--usage .uc-h{display:flex;align-items:baseline;gap:6px;margin-bottom:8px}
.nlc-tooltip--usage .uc-h b{font-size:13px;font-weight:600}
.nlc-tooltip--usage .uc-h span{color:var(--text-dim);font-size:11px}
.nlc-tooltip--usage .uc-r{margin-top:8px}
.nlc-tooltip--usage .uc-l{display:flex;justify-content:space-between;gap:8px}
.nlc-tooltip--usage .uc-l b{font-weight:600;font-variant-numeric:tabular-nums}
.nlc-tooltip--usage .uc-bar{display:block;height:4px;border-radius:2px;background:var(--nlc-overlay-border);margin:4px 0 3px;overflow:hidden}
.nlc-tooltip--usage .uc-bar i{display:block;height:100%;border-radius:2px;background:var(--accent)}
.nlc-tooltip--usage .uc-bar[data-tone="warn"] i{background:#d29922}
.nlc-tooltip--usage .uc-bar[data-tone="bad"] i{background:var(--danger,#f85149)}
.nlc-tooltip--usage .uc-s{color:var(--text-dim);font-size:11px}
.nlc-tooltip--usage .uc-f{margin-top:10px;padding-top:8px;border-top:1px solid var(--nlc-overlay-border);color:var(--text-dim);font-size:11px}

/* Felix 1 Dec ~1:22 AM SGT (SC9): the queued-next list. Edit, Send now and Remove are 26px wide with no gap between them (a group of 78px); there are no
   up/down arrows; a grip sits at the left of each row when there is more than one item, and dragging it (or ArrowUp/ArrowDown on it) reorders. */
#durable-conversation-queue [data-queue-id]{gap:0;padding-left:var(--space-3)}
#durable-conversation-queue .queue-row-label{margin-right:var(--space-2);min-width:1.4em}
#durable-conversation-queue .queue-row-text{margin-right:var(--space-2)}
#durable-conversation-queue .queue-row-edit{margin-right:var(--space-2)}
#durable-conversation-queue .queue-row-btn{width:26px;height:26px}
#durable-conversation-queue .queue-row-grip{flex:none;display:inline-grid;place-items:center;width:18px;height:26px;margin-left:-8px;margin-right:2px;padding:0;border:0;background:none;color:var(--text-dim);cursor:grab;touch-action:none;opacity:.55}
#durable-conversation-queue [data-queue-id]:hover .queue-row-grip,#durable-conversation-queue .queue-row-grip:focus-visible{opacity:1}
#durable-conversation-queue [data-queue-id].drag{background:var(--surface-raised,var(--bg));box-shadow:0 4px 14px rgba(0,0,0,.35);position:relative;z-index:2}
#durable-conversation-queue [data-queue-id].drag .queue-row-grip{cursor:grabbing;opacity:1}
#durable-conversation-queue.dragging,#durable-conversation-queue.dragging *{cursor:grabbing;user-select:none}
