.chat-legacy-control { display:none !important; }
.dock-enabled .chat-head { background:inherit; border-bottom:0; height:40px; min-height:40px; flex-basis:40px; gap:6px; }
.chat-header-controls { display:flex; gap:3px; flex:0 0 auto; }
.chat-header-action { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border:0; border-radius:8px; padding:4px; color:#a4a4a4; background:transparent; cursor:pointer; }
.chat-header-action:hover, .chat-header-action[aria-pressed=true] { background:#303030; color:#eee; }
.chat-header-action .codex-icon svg { width:18px; height:18px; }
.chat-header-menu { width:290px; }
.chat-menu-item { display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:transparent; color:#ddd; border:0; padding:10px; border-radius:8px; font:inherit; cursor:pointer; }
.chat-menu-item:hover { background:#383838; }
.chat-menu-item:disabled { opacity:.4; cursor:default; }
.chat-history { width:min(650px,calc(100vw - 24px)); }
.chat-history-search { width:100%; border:0; border-bottom:1px solid #414141; border-radius:0; background:transparent; color:#eee; padding:12px; font:inherit; outline-offset:-2px; }
.chat-history-caption { color:#999; font-size:13px; padding:14px 12px 8px; }
.chat-history-list { max-height:50dvh; overflow:auto; }
.chat-history-row { display:flex; gap:12px; align-items:center; width:100%; padding:9px 12px; border:0; border-radius:8px; background:transparent; color:#ddd; font:inherit; text-align:left; cursor:pointer; }
.chat-history-row:hover { background:#353535; }
.chat-history-row > span { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dock-window.chat-expanded { position:fixed !important; inset:36px 8px 26px; z-index:90; height:auto !important; }
.attachment-open { display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; height:100%; padding:0; border:0; background:transparent; color:inherit; cursor:pointer; }
.attachment-open:focus-visible { outline:2px solid #6caaff; outline-offset:-2px; }
.attachment-remove svg { width:16px; height:16px; }
.queued-attachments { display:flex; gap:4px; flex:0 1 auto; min-width:0; max-width:150px; overflow:hidden; }
.queued-attachment { flex:0 0 28px; width:28px; height:28px; padding:0; border:1px solid #454545; border-radius:6px; overflow:hidden; background:#222; display:grid; place-items:center; }
.queued-attachment img { width:100%; height:100%; object-fit:cover; }
.attachment-dialog { width:calc(100vw - 24px); height:calc(100dvh - 24px); max-width:none; padding:14px; background:#111; display:flex; flex-direction:column; }
.attachment-dialog:not([open]) { display:none; }
.attachment-dialog-head { flex-shrink:0; margin:0 0 8px; }
.attachment-dialog-head > strong { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:400; }
.attachment-dialog-head .chat-action, .attachment-nav, .attachment-zoom .chat-action { width:38px; height:38px; border-radius:50%; background:#262626; display:grid; place-items:center; color:#ddd; padding:0; }
.attachment-dialog-head .attachment-download { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:#262626; margin:0; }
.attachment-stage { display:flex; flex:1; align-items:center; gap:10px; min-height:0; }
.attachment-content { flex:1; min-width:0; height:100%; display:grid; align-items:safe center; justify-items:safe center; overflow:auto; }
.attachment-content img.attachment-full { max-width:none; max-height:none; flex-shrink:0; }
.attachment-content .attachment-full.zoomed { transform-origin:top left; }
.attachment-content iframe.attachment-full { width:100%; height:100%; }
.attachment-nav { flex:0 0 38px; border:0; cursor:pointer; }
.attachment-nav[hidden], .attachment-zoom[hidden], .attachment-dialog-head button[hidden], .client-update[hidden] { display:none; }
.attachment-zoom { display:flex; align-items:center; align-self:center; gap:6px; border-radius:24px; padding:4px; margin-top:8px; background:#252525; }
.attachment-zoom button:nth-child(2) { width:auto; min-width:65px; white-space:nowrap; border:0; color:#ddd; background:transparent; padding:8px; }
.client-update { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 10px 8px; padding:9px 12px; border:1px solid #3b3b3b; border-radius:12px; color:#bbb; background:#262626; font-size:13px; }
.client-update button { border:0; background:#393939; color:#eee; padding:6px 10px; border-radius:7px; cursor:pointer; }
.app-view > .client-update { position: fixed; z-index: 100; top: 44px; right: 8px; max-width: calc(100vw - 16px); margin: 0; box-shadow: 0 4px 16px #0006; }
.window-chat { font-family:var(--chat-font-family); font-weight:400; }
.window-chat :is(button,input,textarea,select) { font-family:inherit; }
.conversation-load-error { display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:8px 12px; color:var(--muted); }
.conversation-load-error > span { flex:1 1 180px; overflow-wrap:anywhere; }
.conversation-load-error > button { border:1px solid var(--line); }
.codex-toolbar #sendButton { width:36px; height:36px; flex:0 0 36px; }
.codex-toolbar #sendButton svg { width:18px; height:18px; }
.codex-toolbar > :first-child { width:28px; padding:4px; justify-content:center; }
.codex-toolbar > :first-child svg { width:18px; height:18px; }
.queued-message > .codex-icon svg { width:16px; height:16px; }
.queued-message > .chat-action:not(.queue-steer) { width:26px; height:28px; flex:0 0 26px; justify-content:center; padding:4px; }
.queued-message .chat-action svg { width:16px; height:16px; }
@container(max-width:520px) {
  .queued-message { gap:4px; padding-right:8px; }
  .queue-steer { font-size:0; padding:4px; }
  .queued-attachments { max-width:60px; }
  .codex-toolbar { gap:2px; }
  .codex-toolbar [popovertarget="accessMenu"] { max-width:130px; }
  .codex-toolbar :is([popovertarget="accessMenu"],[popovertarget="modelMenu"],[popovertarget="effortMenu"]) { font-size:11px; padding-inline:3px; }
}
@media(max-width:720px) {
  .codex-toolbar { gap:1px; }
  .codex-toolbar > :first-child { width:22px; padding-inline:0; }
  .codex-toolbar :is([popovertarget="accessMenu"],[popovertarget="effortMenu"]) { padding-inline:0; gap:2px; }
  .codex-toolbar [popovertarget="effortMenu"] > .codex-icon, .codex-toolbar [popovertarget="effortMenu"] svg { width:12px; height:12px; }
  .codex-toolbar #voiceButton { width:24px; padding:0; }
  .codex-toolbar #sendButton { width:30px; height:30px; }
  .chat-header-controls { gap:0; } .chat-header-action { width:26px; height:26px; } .chat-head #taskStatus { display:none; } .attachment-dialog { padding:10px; } .attachment-stage { gap:5px; } .attachment-nav { width:30px; height:30px; flex-basis:30px; }
}
@media(max-width:390px) {
  .codex-toolbar { grid-template-columns:20px auto minmax(0,1fr) 22px 30px; }
  .codex-toolbar > :first-child { width:20px; }
  .codex-toolbar :is([popovertarget="accessMenu"],[popovertarget="effortMenu"]) { font-size:10px; }
  .codex-toolbar [popovertarget="accessMenu"] .access-icon svg { width:12px; height:12px; }
  .codex-toolbar #voiceButton { width:22px; }
}
