.team-chat{position:fixed;z-index:46;right:22px;bottom:var(--company-footer-height,76px);width:360px;max-width:calc(100vw - 24px);color:#34473f;font-family:var(--tl-reading,'Segoe UI',sans-serif);filter:drop-shadow(0 -4px 20px #263c3020)}
.team-chat.expanded{width:430px}.team-chat.expanded.tc-wide{width:600px}
.team-chat[hidden],.team-chat [hidden]{display:none!important}
.tc-toggle{display:flex;align-items:center;gap:10px;width:100%;min-height:54px;padding:10px 15px;border:1px solid #d6e2dc;border-radius:17px 6px 0 0;background:#fff;color:#34473f;cursor:pointer;text-align:left;font:600 15px var(--tl-display,'Segoe UI',sans-serif)}
.tc-toggle>img{width:30px;height:30px;object-fit:contain}.tc-toggle>span:first-of-type{flex:1}.tc-badge{padding:3px 7px;border-radius:12px;background:#b93e24;color:white;font:700 12px 'Segoe UI',sans-serif}.tc-chevron{font-size:20px;line-height:1}.tc-panel{height:min(530px,calc(100dvh - 215px));min-height:220px;display:flex;flex-direction:column;background:#fff;border:1px solid #d6e2dc;border-top:0}
.tc-intro{margin:0;padding:9px 14px;font-size:12px;line-height:1.4;background:#edf4ef;color:#53685c;border-bottom:1px solid #e1e9e4}.tc-list{flex:1;min-height:0;overflow-y:auto;padding:12px;overscroll-behavior:contain;scrollbar-width:thin}.tc-message{max-width:90%;margin:0 0 13px;padding:10px 12px;background:#f0f4f2;border:1px solid #e4ebe6;border-radius:13px 4px 13px 4px;overflow-wrap:anywhere}.tc-message.mine{margin-left:auto;background:#fff0e7;border-color:#efded1}.tc-message header{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#677a6d}.tc-message b{font-weight:650;color:#354c3e}.tc-message p{white-space:pre-wrap;margin:5px 0 0;font-size:14px;line-height:1.45;color:#2f3e36}.tc-empty{font-size:14px;line-height:1.5;padding:25px 12px;text-align:center;color:#718077}.tc-older,.tc-new{display:block;margin:0 auto 12px;background:#fff;border:1px solid #d5e1d9;border-radius:8px;padding:7px 11px;color:#42614d;font:inherit;font-size:12px;cursor:pointer}.tc-new{margin:5px auto}
.tc-form{border-top:1px solid #e2e9e5;padding:10px 12px;background:#fff}.tc-form label{display:block;font-size:12px;font-weight:600;margin-bottom:5px}.tc-form textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:68px;max-height:140px;padding:9px 10px;border:1px solid #cfddd4;border-radius:10px 4px;color:#293d31;background:#fff;font:14px/1.4 var(--tl-reading,'Segoe UI',sans-serif)}.tc-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}.tc-actions small{font-size:10px;color:#6c7e71}.tc-send{background:#3d6350;color:white;border:1px solid #3d6350;border-radius:9px 3px;padding:8px 15px;font:600 13px var(--tl-display,'Segoe UI',sans-serif);cursor:pointer}.tc-send:disabled{opacity:.5;cursor:default}.tc-status{padding:0 12px;margin:5px 0;font-size:12px;color:#6a5441;line-height:1.4}.tc-toggle:focus-visible,.team-chat button:focus-visible,.tc-form textarea:focus-visible{outline:3px solid #d66a43;outline-offset:2px}
body.session-login .team-chat{display:none!important}
@media(max-width:650px){.team-chat{right:10px;width:350px;max-width:calc(100vw - 20px)}.team-chat:not(.expanded){width:230px}.tc-panel{height:min(500px,calc(100dvh - 180px))}.tc-form textarea{font-size:16px}.tc-actions small{font-size:9px}}
@media print{.team-chat{display:none!important}}

.tc-settings{padding:7px 14px;background:#f8faf9;border-bottom:1px solid #e1e9e4;font-size:12px}.tc-settings summary{cursor:pointer;font-weight:600}.tc-settings form{padding-top:8px}.tc-settings label{display:block;margin-bottom:4px}.tc-settings input{box-sizing:border-box;width:100%;padding:8px;border:1px solid #cfddd4;border-radius:7px;font:inherit}.tc-settings button,.tc-attach{padding:6px 10px;margin-top:6px;border:1px solid #cbdacf;background:#f2f7f3;color:#34583e;border-radius:7px;font:600 12px var(--tl-reading,'Segoe UI',sans-serif);cursor:pointer}.tc-settings p{margin:6px 0;font-size:11px}.tc-settings[open]{max-height:180px;overflow:auto;flex-shrink:0}.tc-list{min-height:65px}.tc-form{max-height:55%;overflow-y:auto;flex-shrink:0}.tc-file{display:block;margin-top:7px;padding:7px;border:1px solid #d5e1d9;border-radius:8px;background:#fff;color:#305540;text-decoration:none;font-size:12px;overflow-wrap:anywhere}.tc-file img{display:block;width:100%;height:160px;max-width:100%;max-height:160px;object-fit:contain;margin-bottom:6px;border-radius:5px}.tc-draft-files{max-height:90px;overflow:auto}.tc-draft-file{display:flex;align-items:center;gap:6px;padding:5px 0;font-size:11px}.tc-draft-file span{flex:1;min-width:0;overflow-wrap:anywhere}.tc-draft-file button{border:1px solid #d5e1d9;border-radius:5px;background:#fff;color:#34473f;cursor:pointer;min-height:26px}.tc-attach:disabled{opacity:.5;cursor:default}@media(max-width:650px){.tc-settings input{font-size:16px}}
/* Conversation first: compact tools and a single composer action row. */
.tc-toggle{min-height:48px;padding:7px 13px}
.tc-panel{height:min(640px,calc(100dvh - var(--company-footer-height,76px) - 72px));min-height:0}
.tc-wide .tc-panel{height:min(780px,calc(100dvh - var(--company-footer-height,76px) - 72px))}
.tc-tools{display:flex;align-items:flex-start;flex:none;border-bottom:1px solid #e1e9e4;background:#f8faf9}
.tc-tools .tc-settings{flex:1;min-width:0;border:0;padding:9px 13px;background:transparent}
.tc-tools .tc-settings[open]{max-height:180px}
.tc-settings .tc-intro{padding:7px 0 0;border:0;background:transparent;font-size:11px}
.tc-expand{flex:none;margin:4px 9px 4px 0;padding:5px 9px;min-height:30px;border:1px solid #cfddd4;border-radius:7px;background:white;color:#34583e;font:600 12px var(--tl-reading,'Segoe UI',sans-serif);cursor:pointer}
.tc-list{min-height:0;padding:12px 14px;background:linear-gradient(155deg,#f8fbf9,#fff 65%)}
.tc-message{max-width:92%;margin-bottom:10px}
.tc-form{display:grid;grid-template-columns:1fr auto;gap:7px 10px;padding:9px 12px;max-height:45%;min-height:0;overflow:auto}
.tc-form>label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.tc-form textarea{grid-column:1/-1;min-height:44px;max-height:110px;padding:10px;font-size:14px}
.tc-draft-files{grid-column:1/-1}.tc-draft-files:empty{display:none}
.tc-form>.tc-attach{margin:0;justify-self:start;align-self:center;min-height:34px}
.tc-actions{margin:0;align-self:center;justify-content:flex-end}
.tc-send{min-height:34px;padding:7px 17px}
.tc-status:empty{display:none}
@media(max-width:650px){.team-chat.expanded,.team-chat.expanded.tc-wide{width:calc(100vw - 20px)}.tc-panel,.tc-wide .tc-panel{height:min(620px,calc(100dvh - var(--company-footer-height,76px) - 62px))}.tc-expand{display:none}.tc-form textarea{font-size:16px}.tc-message{max-width:94%}}
@media(max-height:500px){.tc-toggle{min-height:40px;padding:4px 12px}.tc-toggle>img{height:26px;width:26px}.tc-panel,.tc-wide .tc-panel{height:calc(100dvh - var(--company-footer-height,76px) - 52px)}.tc-tools .tc-settings{padding:6px 12px}.tc-form{gap:4px;padding:5px 10px}.tc-form textarea{min-height:38px;padding:7px}.tc-tools .tc-settings[open]{max-height:95px}}
/* Percent sizing respects the usable viewport when a vertical scrollbar is present. */
.team-chat{max-width:calc(100% - 24px)}
@media(max-width:650px){.team-chat{max-width:calc(100% - 20px)}.team-chat.expanded,.team-chat.expanded.tc-wide{width:calc(100% - 20px)}}
