.chat{grid-template-rows:56px auto auto minmax(0,1fr) auto;grid-template-areas:"header" "tools" "topics" "messages" "composer"}
.chat-ui-icon{display:inline-block;width:20px;height:20px;flex:0 0 20px;background-color:currentColor;-webkit-mask:var(--chat-icon) center/contain no-repeat;mask:var(--chat-icon) center/contain no-repeat}
.icon-calendar-clock{--chat-icon:url('icons/lucide/calendar-clock.svg')}.icon-paperclip{--chat-icon:url('icons/lucide/paperclip.svg')}.icon-smile{--chat-icon:url('icons/lucide/face-slightly-smiling.svg')}
.icon-pin{--chat-icon:url('icons/lucide/pin.svg')}.icon-pencil{--chat-icon:url('icons/lucide/pencil.svg')}.icon-x{--chat-icon:url('icons/lucide/x.svg')}
.composer .composer-icon{display:grid;place-items:center;color:var(--tg-muted)}.composer .chat-ui-icon{width:22px;height:22px;flex-basis:22px}
.composer .composer-icon:hover{color:var(--tg-blue)}.contact-context-menu .chat-ui-icon{width:22px;height:22px;flex-basis:22px}
.chat-tools{grid-area:tools;flex:0 0 auto;max-height:190px;overflow-y:auto;background:var(--tg-panel);border-bottom:1px solid var(--tg-border)}
.chat-tool-row{display:flex;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid #edf0f3;min-width:0}
.chat-tool-row:last-child{border-bottom:0}.chat-tool-icon{display:grid;place-items:center;color:#299bd9;flex:0 0 24px}
.chat-tool-content{min-width:0;flex:1;border-left:2px solid #2aabee;padding-left:9px}
.chat-tool-heading{font-size:12px;line-height:18px;color:#1995d1;font-weight:500}
.chat-tool-preview{font-size:13px;line-height:19px;color:var(--tg-text);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.chat-tool-action{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border:0;border-radius:7px;background:transparent;color:var(--tg-muted);font-size:22px;cursor:pointer}
.chat-tool-action:hover,.chat-tool-action:focus-visible{background:var(--tg-hover);color:#198eca}.chat-tool-action:disabled{opacity:.4;cursor:default}
.chat-tool-open{display:block;width:100%;min-width:0;text-align:left;border:0;background:transparent;cursor:pointer;padding:0;font:inherit}
.chat-tool-open:focus-visible{outline:2px solid #2aabee;border-radius:3px}.chat-tool-error{font-size:12px;line-height:17px;color:#b42318;white-space:normal}
.scheduled-draft{flex:0 0 100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 10px;border-radius:8px;background:#eaf6ff;color:#168ac4;font-size:13px}
.scheduled-draft button{border:0;background:transparent;color:inherit;cursor:pointer;font-size:22px;padding:0 5px}
#scheduleMessageBtn{display:grid;place-items:center;color:var(--tg-muted)}#scheduleMessageBtn.is-selected{color:#199cdc;background:#e6f4ff}
#scheduleDialog{width:min(470px,calc(100vw - 24px))}#scheduleDialog textarea{resize:vertical;width:100%}#scheduleDialog .error:empty,#scheduleFiles:empty{display:none}
html[data-theme=dark] .chat-tool-row{border-color:var(--tg-border)}html[data-theme=dark] .chat-tool-error{color:#ffaaaa}
html[data-theme=dark] .scheduled-draft,html[data-theme=dark] #scheduleMessageBtn.is-selected{background:#314c63;color:#91c7f2}
@media(max-width:600px){.chat-tool-row{padding:7px 9px;gap:6px}.chat-tool-action{flex-basis:28px;width:28px}.chat-tools{max-height:170px}}
