.service-messenger{position:fixed;right:24px;bottom:22px;z-index:1000;font-family:inherit}.service-launch{display:flex;align-items:center;gap:12px;border:0;border-radius:32px;padding:16px 22px;background:#2458bd;color:#fff;font-weight:700;box-shadow:0 10px 32px #17365a33}.service-launch:before{content:'◌';display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#16846d;color:#fff;font-size:23px}.service-unread{display:inline-grid;place-items:center;min-width:23px;height:23px;padding:0 6px;border-radius:20px;background:#16846d;color:white;font-size:12px;font-weight:700}.service-panel{width:420px;height:min(700px,calc(100dvh - 44px));display:flex;flex-direction:column;overflow:hidden;border:1px solid #d6e2f4;border-radius:22px;background:white;box-shadow:0 18px 65px #17365a38}.service-panel[hidden],.service-messenger [hidden]{display:none!important}.service-head{display:flex;align-items:center;gap:12px;padding:18px;background:#2458bd;color:white}.service-avatar{display:grid;place-items:center;border-radius:14px;background:#16846d;width:43px;height:43px;font-size:12px;font-weight:800}.service-head div{display:grid;gap:5px;flex:1}.service-head small{font-size:11px;color:#e4eeff}.service-minimise{background:transparent;border:0;color:white;font-size:25px;padding:8px}.service-context{display:grid;gap:9px;padding:14px 18px;border-bottom:1px solid #e4ebf6}.service-context strong{font-size:12px;color:#536a8b;overflow-wrap:anywhere}.service-new,.service-back,.service-older{border:0;background:#edf4ff;color:#2458bd;text-align:left;padding:9px 12px;border-radius:9px;font-size:12px}.service-inbox{overflow:auto;flex:1;padding:8px}.service-conversation{display:flex;align-items:center;justify-content:space-between;width:100%;gap:10px;text-align:left;padding:15px 12px;border:0;border-bottom:1px solid #e9eff8;background:#fff;color:#17365a;border-radius:10px}.service-conversation:hover{background:#f2f7ff}.service-conversation span:first-child{display:grid;gap:6px}.service-conversation small{font-size:11px;color:#687e99}.service-thread{display:flex;flex-direction:column;flex:1;min-height:0}.service-thread h2{font-size:15px;padding:14px 18px 0;margin:0;color:#17365a}.service-note{font-size:11px;color:#6b7c93;margin:8px 18px 12px}.service-history{flex:1;overflow:auto;min-height:90px;padding:16px;display:flex;flex-direction:column;gap:12px;background:#f5f8fd}.service-message{align-self:flex-start;background:#fff;border:1px solid #e0e9f6;border-radius:16px 16px 16px 4px;padding:11px 13px;max-width:90%;overflow-wrap:anywhere}.service-message.mine{align-self:flex-end;background:#e8f4ef;border-color:#c7e6d9;border-radius:16px 16px 4px 16px}.service-message small{font-size:10px;color:#60778c}.service-message p{white-space:pre-wrap;font-size:13px;line-height:1.6;color:#17365a;margin:5px 0 0}.service-compose{display:grid;grid-template-columns:1fr auto;gap:9px;border-top:1px solid #e0e9f6;padding:13px;background:white}.service-compose textarea{width:100%;min-height:60px;max-height:140px;resize:vertical;font-size:14px;margin:0}.service-compose button{align-self:end;background:#2458bd;color:white;border:0;border-radius:11px;padding:12px 15px;font-weight:700}.service-error{grid-column:1/-1;color:#a53432;font-size:12px;margin:0}.service-error:empty{display:none}.service-empty{font-size:13px;line-height:1.7;color:#657c96;padding:20px}.service-older{margin:0 16px 8px}@media(max-width:600px){.service-messenger{right:12px;bottom:12px}.service-panel{width:calc(100vw - 24px);height:min(650px,calc(100dvh - 24px));border-radius:18px}.service-launch{padding:12px 16px}.service-compose textarea{font-size:16px}}
.service-search{width:100%;border:1px solid #dce5ef;border-radius:24px;padding:10px 14px;font-size:13px;background:#f5f8fa}.service-conversation>span:first-child{flex:1;min-width:0}.service-chat-heading{display:flex!important;align-items:baseline;justify-content:space-between;gap:12px}.service-chat-heading time{font-size:10px;color:#6b7c93;white-space:nowrap}.service-preview{display:block;font-size:12px;color:#64758a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:310px}.service-alert{display:block;max-width:350px;margin:0 0 12px auto;border:1px solid #d5e6df;border-left:4px solid #16846d;border-radius:15px;background:white;color:#17365a;box-shadow:0 6px 25px #17365a22;text-align:left;font-size:12px;line-height:1.6;padding:12px 16px;white-space:pre-line;overflow-wrap:anywhere}.service-history{background:#eef4f1}.service-message.mine{background:#dcf2e6}
.service-alert{top:100px;bottom:auto;max-height:190px;overflow:auto}.service-desktop{border:0;border-top:1px solid #e4ebf6;background:#f5faf7;color:#176f58;padding:8px 14px;font-size:11px;flex-shrink:0}.service-head .service-unread{justify-self:start;background:#fff;color:#2458bd}.service-launch:has(.service-unread:not([hidden])){box-shadow:0 0 0 4px #16846d33,0 10px 32px #17365a33}
.service-alert{position:fixed;right:24px;top:auto;bottom:94px;z-index:1002}.service-messenger:has(.service-panel:not([hidden])) .service-alert{top:96px;bottom:auto}@media(max-width:600px){.service-alert{right:12px;max-width:calc(100vw - 24px)}}
.service-messenger{font:14px Inter,Segoe UI,Arial,sans-serif}.service-messenger *{box-sizing:border-box}.service-messenger button{cursor:pointer;font:inherit}.service-messenger textarea,.service-messenger input{box-sizing:border-box;padding:10px;border:1px solid #c9d8ee;border-radius:10px;font:inherit;color:#17365a}.service-panel{position:fixed;right:0;top:0;width:400px;height:100dvh;border-radius:0}.service-launch{position:fixed;right:24px;bottom:22px}.service-alert{right:24px;bottom:94px}.service-messenger:has(.service-panel:not([hidden])) .service-alert{right:412px;top:90px;bottom:auto}body:has(.service-panel:not([hidden])) #root{margin-right:400px}.client-inbox-badge{background:#16846d;color:white;border-radius:20px;font-size:11px;font-weight:700;padding:3px 7px;margin-left:8px}.client-inbox-badge[hidden]{display:none}@media(max-width:850px){.service-panel{width:min(400px,100vw)}body:has(.service-panel:not([hidden])) #root{margin-right:0}.service-messenger:has(.service-panel:not([hidden])) .service-alert{right:12px;top:84px;max-width:calc(100vw - 24px)}}

/* One right-edge dock for human messages and the existing Brokify assistant. */
body:has(.service-messenger),body:has(#r2s-chat-launcher){--brokify-dock:64px}body:has(.service-panel:not([hidden])),body:has(#r2s-chat-panel:not([hidden])){--brokify-dock:400px}body:has(#r2s-chat-panel.r2s-chat-expanded:not([hidden])){--brokify-dock:min(640px,calc(100vw - 64px))}body:has(.service-messenger) #root,body:has(#r2s-chat-launcher) #root{margin-right:var(--brokify-dock);transition:margin-right .2s ease}body:has(.service-messenger):after,body:has(#r2s-chat-launcher):after{content:'';position:fixed;right:0;top:0;bottom:0;width:64px;background:linear-gradient(180deg,#244b9d,#17365a);border-left:1px solid #d6e2f4;z-index:1500;pointer-events:none}.service-messenger{right:0;top:0;bottom:0;width:64px;z-index:1600}.service-launch{right:10px;bottom:22px;width:44px;height:44px;min-height:44px;padding:0;border:2px solid white;border-radius:50%;font-size:0;justify-content:center;box-shadow:none}.service-launch:before{width:34px;height:34px;font-size:26px}.service-launch .service-unread{position:absolute;top:-9px;right:-6px;font-size:11px}.service-panel{right:0;top:0;width:400px;height:100dvh;border-radius:0;border:0;border-left:1px solid #d6e2f4;box-shadow:-8px 0 30px #17365a12}.service-alert{right:76px;bottom:24px}.service-messenger:has(.service-panel:not([hidden])) .service-alert{right:412px;top:90px;bottom:auto}#r2s-chat-launcher{position:fixed;right:10px;bottom:82px;width:44px;height:44px;min-height:44px;display:flex;align-items:center;justify-content:center;padding:0;border:2px solid white;border-radius:50%;background:#16846d;z-index:1650;box-shadow:none;visibility:visible}#r2s-chat-launcher span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}#r2s-chat-launcher svg{width:23px;height:23px}#r2s-chat-panel,#r2s-chat-panel.r2s-chat-expanded{box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;position:fixed;right:0;top:0;bottom:0;width:var(--brokify-dock,400px);height:100dvh;border-radius:0;border:0;border-left:1px solid #d6e2f4;z-index:1700;box-shadow:-8px 0 30px #17365a12;visibility:visible}#r2s-chat-panel[hidden]{display:none}#r2s-chat-panel .r2s-chat-toolbar{min-height:78px;background:linear-gradient(110deg,#244b9d,#345fbd);color:white;padding:16px}#r2s-chat-panel .r2s-chat-toolbar button{color:white}body:has(#r2s-chat-panel:not([hidden])) #r2s-chat-launcher{display:none}body:has(#r2s-chat-panel:not([hidden])) .service-launch,body:has(.service-panel:not([hidden])) #r2s-chat-launcher{right:calc(var(--brokify-dock) + 12px);bottom:22px}body:has(#r2s-chat-panel:not([hidden])) .service-alert{right:calc(var(--brokify-dock) + 12px)}
@media(max-width:850px){body:has(.service-messenger) #root,body:has(#r2s-chat-launcher) #root{margin-right:0}body:has(.service-messenger):after,body:has(#r2s-chat-launcher):after{display:none}.service-messenger{width:0}.service-panel,#r2s-chat-panel,#r2s-chat-panel.r2s-chat-expanded{width:100vw;height:100dvh;border-radius:0}.service-launch{right:12px;bottom:16px}#r2s-chat-launcher{right:12px;bottom:76px}.service-messenger:has(.service-panel:not([hidden])) .service-alert{right:12px;top:84px;max-width:calc(100vw - 24px)}body:has(.service-panel:not([hidden])) #r2s-chat-launcher,body:has(#r2s-chat-panel:not([hidden])) .service-launch{display:none}}
@media(prefers-reduced-motion:reduce){body:has(.service-messenger) #root,body:has(#r2s-chat-launcher) #root{transition:none}}

#r2s-chat-panel iframe{width:100%;flex:1;min-height:0;border:0}#r2s-chat-panel .r2s-chat-toolbar{display:flex;align-items:center;gap:8px}#r2s-chat-panel .r2s-chat-toolbar strong{flex:1}#r2s-chat-panel .r2s-chat-toolbar button{background:transparent;border:0;min-height:44px}

/* Keep messenger controls independent of platform sidebar and button defaults. */
.service-messenger .service-launch{display:flex;align-items:center;justify-content:center;gap:0;font-size:0;line-height:1;padding:0;overflow:visible}
.service-messenger .service-launch-label{display:none}
.service-messenger .service-launch:before{content:'';box-sizing:border-box;width:21px;height:18px;border:2px solid #fff;border-radius:7px 7px 7px 2px;background:transparent;flex:none}
.service-messenger .service-panel{background:#fff;color:#17365a;min-height:0;padding:0;display:flex;flex-direction:column}
.service-messenger .service-head{flex:0 0 auto;min-height:82px;padding:16px;gap:12px}
.service-messenger .service-head>div{min-width:0;gap:5px}
.service-messenger .service-head strong{font-size:14px;line-height:1.4}
.service-messenger .service-avatar{flex:0 0 42px;width:42px;height:42px}
.service-messenger .service-minimise{flex:0 0 36px;width:36px;height:36px;padding:0;font-size:24px;line-height:1}
.service-messenger .service-context{flex:0 0 auto;background:#fff;padding:12px 16px;gap:9px}
.service-messenger .service-back,.service-messenger .service-new,.service-messenger .service-older{color:#2458bd;font-size:12px;line-height:1.4}
.service-messenger .service-inbox{flex:1 1 0;min-height:0;background:#fff}
.service-messenger .service-thread{flex:1 1 0;min-height:0;overflow:hidden;background:#fff}
.service-messenger .service-history{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain}
.service-messenger .service-compose{flex:0 0 auto;margin:0;align-items:end}
.service-messenger .service-compose textarea{min-width:0;min-height:64px;line-height:1.5;resize:none}
.service-messenger .service-compose button{font-size:13px;min-height:42px}
.service-messenger .service-history p{color:#17365a;line-height:1.6}
.service-messenger .service-note{flex:0 0 auto;font-size:11px;line-height:1.5;margin:8px 16px 12px}
.service-messenger .service-panel>button:last-child{flex:0 0 auto;min-height:38px;border:0;border-top:1px solid #dce5ef;background:#f5f8fd;color:#2458bd;font-size:12px}
