/* One scrollable transcript, with a stationary composer. These rules own chat layout. */
:is(#tca-chat-root,#tca-faq-root) :is(.cc-window,.tf-window){overscroll-behavior:none;isolation:isolate}
#tca-faq-root .tf-content.tf-direct,#tca-chat-root #tca-faq-root .tf-content.tf-direct{display:flex!important;flex-direction:column!important;position:relative!important;flex:1 1 0!important;min-height:0!important;height:100%!important;overflow:hidden!important;padding:0!important;margin:0!important;max-width:none!important;width:100%!important;background:#fff!important}
#tca-faq-root .tf-content.tf-direct>.tf-transcript,#tca-chat-root #tca-faq-root .tf-content.tf-direct>.tf-transcript{flex:1 1 0!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:none!important;touch-action:pan-y;scrollbar-gutter:stable;padding:22px!important;width:100%!important;max-width:none!important;margin:0!important;scroll-behavior:auto!important}
#tca-faq-root .tf-content.tf-direct>.tf-compose,#tca-chat-root #tca-faq-root .tf-content.tf-direct>.tf-compose{position:relative!important;flex:0 0 auto!important;max-height:50%;overflow:visible;width:100%!important;max-width:none!important;padding:12px 22px 6px!important;margin:0!important;background:#fff!important}
#tca-faq-root .tf-content.tf-direct textarea,#tca-chat-root .cc-composer-box textarea{resize:none!important;min-height:44px!important;max-height:180px!important;overflow-y:auto!important;overscroll-behavior:contain}
#tca-chat-root .cc-body,#tca-chat-root .cc-main{min-height:0;overflow:hidden;overscroll-behavior:none}
#tca-chat-root .cc-message-list,.tf-history-list{overscroll-behavior:none!important;touch-action:pan-y}
#tca-faq-root .tf-jump-latest{position:absolute!important;left:50%!important;top:-46px!important;transform:translateX(-50%);z-index:12;display:grid!important;place-items:center!important;width:36px!important;height:36px!important;padding:8px!important;border:1px solid #e4dbea!important;border-radius:50%!important;background:#fff!important;color:#493477!important;box-shadow:0 3px 14px #39264c26!important;cursor:pointer}
#tca-faq-root .tf-jump-latest[hidden]{display:none!important}
#tca-faq-root .tf-jump-latest svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
:is(#tca-chat-root,#tca-faq-root) .tf-history .tf-history-title{display:block!important;justify-content:flex-start!important;text-align:left!important;padding:10px 8px!important;font-weight:500!important;border-radius:8px!important;background:transparent!important;line-height:1.5!important}
:is(#tca-chat-root,#tca-faq-root) .tf-history .tf-history-title:before,:is(#tca-chat-root,#tca-faq-root) .tf-history .tf-history-title:after{display:none!important}
:is(#tca-chat-root,#tca-faq-root) .tf-history-row:has([aria-current=true]){background:#f3eef8;border-radius:8px}
#tca-faq-root .tf-suggestions{max-width:none!important;width:100%!important}
#tca-faq-root .tf-suggestions button{display:flex!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important}
:is(#tca-chat-root,#tca-faq-root) .tf-read-player{position:relative!important;top:auto!important;left:auto!important;right:auto!important;transform:none!important;flex:0 0 auto!important;align-self:center!important;margin:8px auto!important;width:max-content!important;max-width:calc(100% - 24px)!important;gap:7px!important;padding:8px 12px!important;border-radius:40px!important;z-index:35}
:is(#tca-chat-root,#tca-faq-root) .tf-read-player button{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;font-size:13px!important}
:is(#tca-chat-root,#tca-faq-root) .tf-read-player svg{width:19px!important;height:19px!important}
:is(#tca-chat-root,#tca-faq-root) .tf-read-player .tf-read-time{font-size:12px!important;color:#796988}
:is(#tca-chat-root,#tca-faq-root) :is(.cc-window,.tf-window):has(.tf-read-player:not([hidden]))>.tf-tabs{margin-top:0!important}
#tca-faq-root .tf-window:has(.tf-read-player:not([hidden]))>.tf-content{margin-top:0!important}
#tca-chat-root .cc-record-wave{display:flex;flex:1;align-items:center;justify-content:center;gap:3px;height:36px;min-width:0;overflow:hidden}
#tca-chat-root .cc-record-wave i{width:3px;flex:1;max-width:5px;min-height:4px;border-radius:4px;background:#493477;transition:height .1s}
#tca-chat-root .cc-record-wave i:nth-child(5n){background:#ce1327}#tca-chat-root .cc-record-wave i:nth-child(7n){background:#d4ad00}
#tca-chat-root .cc-composer-box .cc-voice-draft{display:flex;align-items:center;gap:10px;min-height:54px;padding:6px 4px;background:transparent}
#tca-chat-root .cc-composer-box .cc-voice-draft[hidden]{display:none!important}
#tca-chat-root .cc-voice-draft .cc-record-control{display:grid;place-items:center;border:0!important;border-radius:50%;width:32px;height:32px;min-width:32px;padding:6px;background:#ebe3f3;color:#493477;box-shadow:none}
#tca-chat-root .cc-record-time{font-size:12px;color:#493477;white-space:nowrap;font-variant-numeric:tabular-nums}#tca-chat-root .is-recording .cc-record-time{color:#ce1327}
#tca-chat-root .cc-voice-draft .cc-record-control:disabled{opacity:.4}
@media(max-width:650px){#tca-faq-root .tf-content.tf-direct>.tf-transcript,#tca-chat-root #tca-faq-root .tf-content.tf-direct>.tf-transcript{padding:16px!important}#tca-faq-root .tf-content.tf-direct>.tf-compose,#tca-chat-root #tca-faq-root .tf-content.tf-direct>.tf-compose{padding:10px 14px 4px!important}:is(#tca-chat-root,#tca-faq-root) .tf-read-player{gap:2px!important;padding:7px!important}:is(#tca-chat-root,#tca-faq-root) .tf-read-player button{width:34px!important;min-width:34px!important}}

/* Starter prompts belong only to an empty conversation. */
#tca-chat-root .tf-suggestions,#tca-faq-root .tf-suggestions{width:100%!important;max-width:620px!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important}
#tca-chat-root .tf-suggestions[hidden],#tca-faq-root .tf-suggestions[hidden]{display:none!important}
/* Both composers use the same current visual controls. */
#tca-chat-root .cc-voice-draft{gap:10px!important;min-height:54px!important;padding:6px 4px!important}
#tca-chat-root .cc-record-control{display:grid!important;place-items:center;width:38px!important;height:38px!important;background:white!important;border:1px solid #e4dced!important;box-shadow:0 2px 5px #49347708!important;border-radius:50%!important;flex:none}
#tca-chat-root .cc-record-control svg{width:18px!important;height:18px!important}
#tca-chat-root .cc-record-wave{display:flex!important;flex:1!important;align-items:center;justify-content:center;gap:3px!important;height:36px!important;overflow:hidden}
#tca-chat-root .cc-record-wave i:nth-child(n){width:3px!important;flex:1!important;max-width:5px!important;min-height:4px;border-radius:4px;background:#68518b!important;transition:height .15s linear}
#tca-chat-root .cc-record-time{font-size:12px!important;color:#68518b!important;white-space:nowrap}
#tca-chat-root .cc-upload-list{display:flex;gap:10px;flex-wrap:wrap;padding:8px 0}
#tca-chat-root .cc-upload-list:empty{display:none}
#tca-chat-root .cc-upload-card{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #e6dff0;border-radius:16px;padding:8px;max-width:280px;box-shadow:0 3px 12px #38265308}
#tca-chat-root .cc-upload-card img{width:52px;height:52px;object-fit:cover;border-radius:10px}
#tca-chat-root .cc-upload-card>div{min-width:0;flex:1}
#tca-chat-root .cc-upload-card strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
#tca-chat-root .cc-upload-card small{display:block;font-size:11px;color:#80758e;margin-top:4px}
#tca-chat-root .cc-upload-card button{border:0!important;background:transparent!important;color:#766589!important;padding:6px!important}
#tca-chat-root .tf-file-type{padding:12px 8px;background:#f2edf8;border-radius:10px;color:#503780;font-size:11px;font-weight:700}
#tca-chat-root .tca-upload-progress{font-size:12px;color:#68518b;padding:8px 4px}
#tca-chat-root .tca-upload-progress[hidden]{display:none!important}

#tca-chat-root .tf-reset-countdown,#tca-faq-root .tf-reset-countdown{display:block;text-align:center;width:100%;font-size:12px;color:#80758e;margin:8px auto 16px;}

:is(#tca-chat-root,#tca-faq-root) .tf-read-player[hidden]{display:none!important}
/* Shared motion language: brief entrances and responsive controls. */
.tf-history-row{position:relative}
.tf-unread-dot{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#7951ba;align-self:center;box-shadow:0 0 0 3px #7951ba15;animation:tca-dot-in .22s ease-out}
@keyframes tca-dot-in{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}
@keyframes tca-surface-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
:is(#tca-chat-root,#tca-faq-root) :is(button,a,select,textarea){transition:background-color .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease,opacity .16s ease}
:is(#tca-chat-root,#tca-faq-root) :is(.tf-history-row,.tf-history-actions,.tf-history-dialog,.tf-attachments>* ,.tf-message-row,.tf-waiting,.tf-read-player:not([hidden])){animation:tca-surface-in .18s ease-out}
:is(#tca-chat-root,#tca-faq-root) .tf-transcript{animation:tca-surface-in .18s ease-out}
@media(prefers-reduced-motion:reduce){:is(#tca-chat-root,#tca-faq-root) *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

:is(#tca-chat-root,#tca-faq-root) .tf-history-push{font-size:12px!important;padding:8px 10px!important;color:#65488c!important;border-radius:10px!important;background:#f5f1fa!important}
