/* Native full-height chat; palettes are owned by the installed theme. */
body #appView>#chatView:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr) 260px;grid-template-rows:auto auto minmax(0,1fr) auto auto auto;gap:8px 16px!important;height:100%!important;min-height:0!important;overflow:hidden!important;padding:12px 18px!important;position:relative}
body #appView>#chatView.details-closed{grid-template-columns:minmax(0,1fr)}
#chatView>.lli-chat-topbar{grid-column:1;grid-row:1;min-width:0}
#chatView .chat-title-row{display:flex;align-items:center;gap:8px;min-width:0}
#chatView .conversation-heading-block{display:flex;align-items:center;gap:12px;flex:1;min-width:0}
#chatView .conversation-title-line{min-width:0;gap:5px}
#chatView #conversationTitle{font-size:16px!important;line-height:1.3;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#chatView #backHome{font-size:12px;white-space:nowrap;margin:0}
#chatView .lli-chat-topbar button.secondary{width:34px;height:34px;min-width:34px;padding:0;border-radius:10px}
#chatView>#chatDetails{grid-column:2;grid-row:1/-1;min-height:0;max-height:none!important;overflow:auto!important;padding:16px;border:1px solid var(--lli-line,#d7e2e9);border-radius:16px;background:var(--lli-panel,#fff);color:var(--lli-ink,#123752);box-sizing:border-box}
#chatDetails h2{font-size:14px;margin:0 0 16px}
#chatDetails p{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
#chatDetails .ai-chat-controls{display:flex;flex-direction:column;align-items:stretch;gap:10px}
#chatView #chatDetails .ai-chat-controls,#chatView #chatDetails .cl14-reading-controls{display:flex!important}
#chatDetails .ai-chat-controls select,#chatDetails .ai-chat-controls button{max-width:100%;width:100%;box-sizing:border-box}
#chatDetails .lli-mail-chat-actions{display:flex;flex-direction:column;align-items:stretch}
#chatDetails .lli-mail-chat-tools{margin:12px 0 0;padding:12px 0 0;border-top:1px solid var(--lli-line,#d7e2e9)}
#chatDetails .lli-mail-chat-status{font-size:11px}
#chatView>#lliMailChatFiles{grid-column:1;grid-row:2;min-width:0;min-height:0}
#chatView>#messages{grid-column:1;grid-row:3;min-width:0;min-height:0!important;height:auto!important;overflow:auto!important;padding:22px!important;margin:0;border-radius:18px}
/* A grid status row needs a content height, not the legacy percentage cap. */
body #appView>#chatView>#status{grid-column:1;grid-row:4;width:100%;min-width:0;height:auto;min-height:26px;max-height:72px;margin:0;padding:4px;box-sizing:border-box;overflow:auto;overflow-wrap:anywhere;font-size:12px;line-height:18px}
#chatView>#status:empty{display:none}
#chatView>#resumePendingSubmission{grid-column:1;grid-row:5}
#chatView>#composerDropZone{grid-column:1;grid-row:6;display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;gap:4px!important;position:relative;min-width:0;width:100%!important;max-width:850px!important;margin:0 auto!important;padding:10px 12px!important;border-radius:22px!important;border:1px solid var(--lli-line,#d7e2e9);background:var(--lli-panel,#fff)!important;box-sizing:border-box;box-shadow:0 3px 14px #00000008}
#chatView #prompt{width:100%;box-sizing:border-box;flex:0 0 auto!important;min-height:34px!important;height:34px;max-height:min(160px,24dvh)!important;padding:6px!important;line-height:22px!important;border:0!important;box-shadow:none!important;background:transparent!important;color:var(--lli-ink,#123752)!important;resize:none!important;font-size:15px!important;border-radius:0!important}
#chatView #prompt:focus{outline:none}
#chatView .lli-composer-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}
#chatView #promptToolsToggle,#chatView #send{display:grid;place-items:center;width:34px!important;height:34px!important;min-height:34px!important;min-width:34px!important;padding:0!important;flex:0 0 34px;font-size:23px;border-radius:50%!important;box-shadow:none!important}
#chatView #promptToolsToggle{border:0;background:transparent;color:var(--lli-ink,#123752)}
#chatView #send{color:white;background:var(--lli-accent,#0099b7);border:0}
#chatView #send[data-action=stop]{background:#d83c46!important;color:#fff!important;font-size:15px}
#chatView #stop{display:none!important}
#promptTools{position:absolute;bottom:calc(100% + 8px);left:0;display:flex;flex-direction:column;padding:7px;gap:3px;min-width:210px;max-height:45dvh;overflow:auto;border:1px solid var(--lli-line,#d7e2e9);border-radius:14px;background:var(--lli-panel,#fff);color:var(--lli-ink,#123752);box-shadow:0 12px 35px #0002;z-index:30}
#promptTools[hidden],#chatDetails[hidden]{display:none!important}
#chatView #promptTools button{display:flex;align-items:center;gap:9px;text-align:left;justify-content:flex-start;border:0;border-radius:9px;min-height:38px;width:100%;padding:8px 12px;background:transparent;color:var(--lli-ink,#123752);font-size:13px;box-shadow:none}
#chatView #promptTools button:hover{background:var(--lli-tint,#edf7fa)}
#chatView #promptTools button:focus-visible,#chatView #promptToolsToggle:focus-visible,#chatView #send:focus-visible{outline:2px solid var(--lli-accent,#0099b7);outline-offset:2px}
#chatView #promptAttachments{max-height:min(96px,15dvh);overflow:auto}
#chatView #lyeDraftStatus{flex:1 1 auto!important;width:auto!important;min-width:0;max-width:100%;box-sizing:border-box;min-height:15px;margin:0;font-size:11px;line-height:15px;color:var(--lli-muted,#657b88);overflow-wrap:anywhere}
#chatView .message-mail-metadata{font-size:12px;color:var(--lli-muted,#657b88);overflow-wrap:anywhere}
#chatView .lyl-typing{background:var(--lli-tint,#edf7fa)!important;color:var(--lli-accent,#0099b7)!important;border:1px solid var(--lli-line,#d7e2e9)!important}
#chatView .lyl-dots i,#chatView .thinking-indicator span{background:var(--lli-accent,#0099b7)!important}
:root:not([data-response-tools=true]) #messages .message.assistant .message-copy-button,
:root:not([data-response-tools=true]) #messages .message.assistant .message-timing,
:root:not([data-response-tools=true]) #messages .message.assistant .message-performance,
:root:not([data-response-tools=true]) #messages .message.assistant .cl14-message-tools,
:root:not([data-response-tools=true]) #messages .message.assistant .lyc-message-actions,
:root:not([data-response-tools=true]) #messages .message.assistant .lli-resume,
:root:not([data-response-tools=true]) #messages .message.assistant .lyl-message-actions{display:none!important}
:root:not([data-response-tools=true]) #messages .message.assistant.has-copy-action{padding-bottom:16px!important}
#sidebar .lli-conversation-row>.tree-row-main{width:calc(100% - 60px)!important}
#sidebar .lli-conversation-row>.lli-tree-actions>summary{right:28px!important}
.lli-conversation-row .lli-quick-delete{position:absolute;top:4px;right:1px;width:26px;min-width:26px;height:32px;padding:0;font-size:19px;opacity:.6}
.lli-conversation-row .lli-quick-delete:hover{opacity:1;color:#d83c46}
@media(max-width:1000px){body #appView>#chatView:not([hidden]){grid-template-columns:minmax(0,1fr);padding:10px!important}#chatView>#chatDetails{grid-column:1/-1;grid-row:1/-1;position:absolute;top:54px;right:10px;bottom:10px;width:min(300px,calc(100% - 20px));z-index:25;box-shadow:0 10px 35px #0002}#chatView .conversation-heading-block{gap:6px}#chatView #conversationTitle{font-size:14px!important}#chatView>#messages{padding:14px!important}}
@media(max-height:600px){#chatView:not([hidden]){gap:5px!important;padding-top:5px!important;padding-bottom:5px!important}#chatView>#composerDropZone{padding:6px 10px!important}#chatView #prompt{max-height:80px!important}}
