.surface { container: chat-composer / inline-size; } /* The actions drop below the context only when the two don't fit side by side. A width breakpoint split them on every narrow surface — a side panel's composer showed a mode chip on one row and a lone send button on the next, with room for both. */ .toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; } .context { display: flex; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; align-items: center; gap: 4px; } .context > * { min-width: 0; max-width: 100%; } .actions { display: flex; flex: 0 0 auto; min-width: 0; align-items: center; justify-content: flex-end; gap: 6px; } /* Animated selector names must not displace the microphone or send button. */ .toolbar [data-toolbar-label] { display: none; } @container chat-composer (min-width: 600px) { .toolbar [data-toolbar-label] { display: inline-flex; max-width: 140px; } .toolbar [data-toolbar-label] > span { min-width: 0; flex-shrink: 1; white-space: nowrap; } .toolbar [data-toolbar-label] > span > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }