.direct-chat-root{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));z-index:30;font-size:13px;color:#29362d;max-width:calc(100vw - 24px)}
.direct-chat-root[hidden],.direct-chat-root [hidden]{display:none!important}
.direct-chat-launcher{border:1px solid #3e5341;border-radius:30px;background:#334d39;color:#fff;box-shadow:0 6px 22px #132a2530;min-height:48px;padding:11px 19px;display:flex;align-items:center;justify-content:center;gap:10px;font-weight:650;margin-left:auto}
.direct-chat-launcher>span:first-child{font-size:25px;line-height:1}
.direct-chat-unread{background:#ae5431;color:#fff;min-width:21px;height:21px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;padding:0 6px;flex-shrink:0}
.direct-chat-panel{position:absolute;right:0;bottom:60px;width:380px;max-width:calc(100vw - 24px);height:min(650px,calc(100dvh - 135px));min-height:min(260px,calc(100dvh - 100px));border:1px solid #c5cdbd;border-radius:14px;background:#fbfcf7;box-shadow:0 12px 40px #10261f30;display:flex;flex-direction:column;overflow:hidden}
.direct-chat-header{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#edf1e5;padding:16px 18px;border-bottom:1px solid #dbe1d2;flex-shrink:0}
.direct-chat-header h2{font-size:16px;margin:0;letter-spacing:0}
.direct-chat-header p{font-size:10px;margin:5px 0 0;color:#62725f}
.direct-chat-header button{border:0;border-radius:7px;background:transparent;color:#344638;width:34px;height:34px;font-size:25px;line-height:1}
.direct-chat-sound-settings{flex-shrink:0;border-bottom:1px solid #dbe1d2;background:#f6f8f0}
.direct-chat-sound-settings summary{cursor:pointer;padding:10px 14px;font-size:12px;color:#40533a;min-height:38px;box-sizing:border-box}
.direct-chat-sound-settings>div{display:grid;gap:8px;padding:2px 14px 12px;max-height:min(280px,38dvh);overflow:auto;overscroll-behavior:contain}
.direct-chat-sound-settings label{font-size:12px;display:flex;align-items:center;gap:7px;min-height:24px}
.direct-chat-sound-settings .direct-chat-volume-label{justify-content:space-between;font-weight:600}
.direct-chat-sound-settings input[type=range]{width:100%;min-height:26px;accent-color:#536c46}
.direct-chat-sound-settings input[type=checkbox]{width:18px;height:18px;accent-color:#536c46}
.direct-chat-sound-settings button{justify-self:start;border:1px solid #c5d0ba;border-radius:6px;background:#fff;color:#40533a;padding:8px 12px;min-height:36px;font-size:12px}
.direct-chat-sound-settings small{font-size:11px;line-height:1.5;color:#65745b}
@media(any-pointer:coarse),(max-width:450px){.direct-chat-sound-settings summary,.direct-chat-sound-settings label,.direct-chat-sound-settings button{min-height:44px}.direct-chat-sound-settings input[type=range]{min-height:44px}}
.direct-chat-error{padding:10px 14px;background:#faede7;color:#853d26;border-bottom:1px solid #e7c2b2;font-size:11px;overflow-wrap:anywhere;flex-shrink:0}
.direct-chat-people{padding:16px 0 0;overflow:auto;min-height:0;flex:1}
.direct-chat-search{display:block;padding:0 16px;font-size:11px;font-weight:600}
.direct-chat-search input{display:block;width:100%;margin-top:7px;padding:10px;border:1px solid #d6decd;border-radius:7px;background:#fff;box-sizing:border-box;font-size:12px}
.direct-chat-presence-note{font-size:10px;color:#74806c;line-height:1.5;margin:12px 16px}
.direct-chat-person{display:flex;align-items:center;gap:11px;background:transparent;border:0;border-top:1px solid #e6eadf;width:100%;text-align:left;padding:14px 16px;color:inherit;min-height:76px}
.direct-chat-person:hover{background:#f0f4e9}
.direct-chat-person:disabled{cursor:default;opacity:.75}
.direct-chat-avatar{width:35px;height:35px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;background:#e1e9d5;color:#46623f;font-size:11px;font-weight:700}
.direct-chat-person-copy{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
.direct-chat-person-copy strong{font-size:12px;font-weight:600;overflow-wrap:anywhere}
.direct-chat-person-copy>span{font-size:10px;color:#6b7865;display:flex;align-items:center;gap:5px}
.direct-chat-person-copy small{font-size:10px;line-height:1.4;color:#71806d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.direct-chat-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#9aa295}
[data-presence=online] .direct-chat-dot{background:#4e814f}
[data-presence=away] .direct-chat-dot{background:#b68a39}
.direct-chat-thread{display:flex;flex-direction:column;min-height:0;flex:1}
.direct-chat-thread-header{display:flex;gap:14px;align-items:center;padding:12px 15px;background:#fff;border-bottom:1px solid #e1e6d8;flex-shrink:0}
.direct-chat-thread-header button{font-size:11px;background:transparent;border:0;padding:6px 0;color:#9a4b2d;flex-shrink:0}
.direct-chat-thread-header h3{font-size:12px;margin:0 0 4px;overflow-wrap:anywhere}
.direct-chat-thread-header span{display:block;color:#78806e;font-size:10px}
.direct-chat-thread-header>div:not(.direct-chat-thread-calls){min-width:0;flex:1}
.direct-chat-thread-calls{display:flex;gap:6px;flex-shrink:0}
.direct-chat-thread-calls button{border:1px solid #d5dfcc;border-radius:5px;padding:6px;color:#4d6846;background:#f7f9f1;font-size:10px}
.direct-chat-call{padding:11px 13px;border-bottom:1px solid #d5dfca;background:#edf3e5;flex-shrink:0}
.direct-chat-call-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px}
.direct-chat-call-heading strong{overflow-wrap:anywhere}
.direct-chat-call-heading span{color:#617957;font-size:10px;flex-shrink:0}
.direct-chat-call>small{display:block;font-size:8px;color:#74856a;line-height:1.5;margin-top:7px}
.direct-chat-call-error{font-size:10px;color:#8b3f24;margin:7px 0;line-height:1.5}
.direct-chat-call-permission{font-size:12px;color:#435b3a;margin:9px 0;line-height:1.5}
.direct-chat-playback{padding:9px;margin-top:9px;border:1px solid #cbd9c0;border-radius:6px;background:#fff}
.direct-chat-playback p{font-size:11px;line-height:1.5;margin:0 0 7px}
.direct-chat-playback button{min-height:44px;padding:10px;border:1px solid #435b3a;border-radius:5px;background:#435b3a;color:#fff;font-size:12px}
.direct-chat-call-video{position:relative;height:115px;margin-top:9px;border-radius:7px;overflow:hidden;background:#263c2c}
.direct-chat-call-video [data-direct-remote-video]{display:block;width:100%;height:100%;object-fit:contain}
.direct-chat-call-video [data-direct-local-video]{position:absolute;right:5px;bottom:5px;width:80px;height:57px;object-fit:cover;border:1px solid #cad6bc;border-radius:4px;background:#273a2b}
.direct-chat-call-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
.direct-chat-call-actions button{background:#fff;color:#435b3a;border:1px solid #cbd9c0;border-radius:5px;padding:7px;font-size:10px;min-height:32px}
.direct-chat-call-actions .direct-chat-call-danger{background:#9c482b;color:#fff;border-color:#9c482b}
.direct-chat-older{background:#f4f7ed;color:#516448;border:0;border-bottom:1px solid #dce4d1;padding:9px;font-size:10px;flex-shrink:0}
.direct-chat-messages{min-height:0;flex:1;overflow:auto;padding:12px;background:#f7f9f1;overscroll-behavior:contain;scrollbar-gutter:stable}
.direct-chat-message{max-width:93%;border:1px solid #e0e6d7;border-radius:9px;background:#fff;padding:11px;margin:0 auto 11px 0;overflow-wrap:anywhere}
.direct-chat-message-self{background:#e9efdf;border-color:#d6e0c9;margin-left:auto;margin-right:0}
.direct-chat-message>div{display:flex;flex-wrap:wrap;gap:5px 10px;justify-content:space-between;font-size:9px;color:#6b7862}
.direct-chat-message strong{font-weight:600;color:#44563c}
.direct-chat-message time{font-size:8px}
.direct-chat-message p{margin:7px 0 0;white-space:pre-wrap;font-size:12px;line-height:1.6}
.direct-chat-empty{padding:18px 12px;color:#7d8773;text-align:center;font-size:12px;line-height:1.7}
.direct-chat-typing{font-size:10px;min-height:22px;margin:0;padding:3px 13px;color:#718369;flex-shrink:0}
.direct-chat-compose{padding:10px 13px 12px;border-top:1px solid #dce4d2;background:#fff;flex-shrink:0}
.direct-chat-compose label{font-size:10px;color:#617157}
.direct-chat-compose textarea{width:100%;display:block;min-height:64px;max-height:135px;resize:vertical;box-sizing:border-box;border:1px solid #cdd9c2;background:#fff;border-radius:7px;padding:9px;margin-top:5px;color:inherit;font-size:12px;line-height:1.5}
.direct-chat-compose-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}
.direct-chat-compose-footer small{font-size:9px;color:#7b8473;line-height:1.4}
.direct-chat-compose button{border:1px solid #96502e;border-radius:6px;background:#ae5431;color:#fff;padding:8px 14px;font-size:11px;min-height:34px}
.direct-chat-root button:focus-visible,.direct-chat-root input:focus-visible,.direct-chat-root textarea:focus-visible{outline:3px solid #bd815b;outline-offset:2px}
body.navigation-drawer-open .direct-chat-root,body:has(dialog[open]) .direct-chat-root{visibility:hidden;pointer-events:none}
@media(max-width:450px){.direct-chat-root{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom))}.direct-chat-panel{width:calc(100vw - 24px);bottom:59px;height:min(620px,calc(100dvh - 145px));overflow-y:auto;overscroll-behavior:contain}.direct-chat-header{padding:10px 13px}.direct-chat-header button{width:44px;height:44px}.direct-chat-message time{font-size:9px}.direct-chat-compose textarea{font-size:16px}.direct-chat-person{padding:12px 14px}.direct-chat-header p{font-size:10px}.direct-chat-compose-footer small{max-width:65%}.direct-chat-thread-header{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 12px;padding:8px 13px}.direct-chat-thread-header>button{min-height:44px}.direct-chat-thread-calls{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.direct-chat-thread-calls button,.direct-chat-call-actions button{min-height:44px;font-size:12px;padding:9px}.direct-chat-call-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.direct-chat-call-actions .direct-chat-call-danger{grid-column:1/-1}.direct-chat-call-video{height:clamp(72px,18dvh,115px)}}
@media(any-pointer:coarse) and (min-width:451px){.direct-chat-thread-header>button,.direct-chat-thread-calls button,.direct-chat-call-actions button{min-height:44px;font-size:12px}.direct-chat-header button{width:44px;height:44px}.direct-chat-panel{overflow-y:auto;overscroll-behavior:contain}}
@media(prefers-reduced-motion:no-preference){.direct-chat-launcher{transition:background .15s}.direct-chat-person{transition:background .12s}}

