/* Shared conversation presentation. Keep every transport and authority unchanged. */
.rcb-chat-panel.rcb-chat-panel{box-sizing:border-box;width:min(28rem,calc(100vw - 24px));max-width:calc(100vw - 24px);height:min(40rem,calc(var(--pos-dialog-height,var(--rcb-popup-height,100dvh)) - 24px));max-height:calc(var(--pos-dialog-height,var(--rcb-popup-height,100dvh)) - 24px);min-height:0;margin:0;padding:0;border:1px solid #b7c5cf;border-radius:14px;background:#fff;color:#18222b;overflow:hidden;box-shadow:0 12px 48px #17303740;font:16px/1.5 system-ui,sans-serif}
.rcb-chat-panel.rcb-chat-panel:not(dialog),dialog.rcb-chat-panel[open]{display:flex;flex-direction:column}
dialog.rcb-chat-panel.rcb-chat-panel{margin:auto}
.rcb-chat-panel::backdrop{background:#17303766}
.rcb-chat-heading.rcb-chat-heading{position:static;display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:8px;margin:0;padding:10px 12px;border-bottom:1px solid #d1deed;background:#f4f7fa;color:#18222b}
.rcb-chat-heading :is(h1,h2,h3,strong){margin:0;font:600 16px/1.4 system-ui,sans-serif}
.rcb-chat-heading button{flex:0 0 auto;min-width:44px;min-height:44px;margin:0;padding:8px;border:1px solid #b7c5cf;border-radius:8px;background:#fff;color:#18222b;font:inherit}
.rcb-chat-body.rcb-chat-body,.rcb-chat-panel>.pos-dialog-body{display:flex;flex:1 1 auto;flex-direction:column;gap:8px;min-height:0;min-width:0;overflow:hidden;padding:12px;margin:0}
.rcb-chat-body>p{flex:0 0 auto;margin:0;font-size:14px;overflow-wrap:anywhere}
.rcb-chat-toolbar.rcb-chat-toolbar{display:flex;flex:0 0 auto;align-items:center;flex-wrap:wrap;gap:6px;margin:0;padding:0}
.rcb-chat-toolbar>button{width:auto;min-width:0;min-height:44px;margin:0;padding:6px 10px;border:1px solid #b7c5cf;border-radius:8px;background:#f4f7fa;color:#18222b;font:inherit}
.rcb-chat-inbox:empty,.rcb-chat-body>p:empty{display:none}
.rcb-chat-inbox{flex:0 1 auto;min-height:0;overflow:auto;overflow-wrap:anywhere}
.rcb-chat-inbox>button{min-height:44px;max-width:100%;margin:3px;padding:8px;border:1px solid #b7c5cf;border-radius:8px;background:#f4f7fa;color:#18222b;font:inherit;white-space:normal;overflow-wrap:anywhere}
.rcb-chat-log.rcb-chat-log{display:flex;flex:1 1 0;flex-direction:column;gap:8px;min-width:0;min-height:0;max-height:none!important;overflow:auto;overscroll-behavior:contain;padding:4px;margin:0;background:#f4f8fb;white-space:pre-wrap;overflow-wrap:anywhere}
.rcb-chat-log>[data-chat-role],.rcb-chat-log>.chat-bubble{box-sizing:border-box;flex:0 0 auto;max-width:90%;margin:0;padding:9px 12px;border:0;border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px;line-height:1.5}
.rcb-chat-log>[data-chat-role=customer],.rcb-chat-log>.chat-bubble.mine{align-self:flex-end;background:#dbeeff;color:#18222b}
.rcb-chat-log>[data-chat-role=admin],.rcb-chat-log>[data-chat-role=ai],.rcb-chat-log>.chat-bubble.theirs{align-self:flex-start;background:#eef2f6;color:#18222b}
.rcb-chat-compose.rcb-chat-compose{box-sizing:border-box;display:flex;flex:0 0 auto;align-items:flex-end;gap:8px;width:100%;min-width:0;margin:0;padding:0;border:0;background:#fff}
.rcb-chat-compose>label:not(.sr-only){display:contents}
.rcb-chat-input.rcb-chat-input{box-sizing:border-box;display:block;flex:1 1 0;width:100%;min-width:0;min-height:52px;max-height:120px;margin:0;padding:10px;border:1px solid #71808b;border-radius:8px;background:#fff;color:#18222b;font:16px/1.5 system-ui,sans-serif;resize:vertical}
.rcb-chat-input:read-only{background:#f4f7fa}
.rcb-chat-send.rcb-chat-send{flex:0 0 auto;width:auto;min-width:44px;min-height:52px;max-width:100%;margin:0;padding:10px 12px;border:1px solid #16477f;border-radius:8px;background:#16477f;color:#fff;font:600 16px/1.4 system-ui,sans-serif}
.rcb-chat-send:disabled{opacity:.5;cursor:default}
.rcb-chat-panel :is(textarea,button):focus-visible{outline:3px solid #cd9b3b;outline-offset:2px}
.rcb-chat-panel .chat-compose-actions{flex-direction:row;align-items:flex-end;gap:6px}
.rcb-chat-panel .chat-compose-actions>button{min-width:44px;min-height:52px}
.rcb-chat-panel .chat-compose-actions button span{display:none}
.rcb-chat-panel>.pos-dialog-heading{flex:0 0 auto}
.rcb-chat-panel>.pos-dialog-body>details{flex:0 0 auto;max-height:25%;overflow:auto}
.rcb-chat-page>main{width:100%;max-width:calc(28rem + 24px);padding:12px;margin:auto}
.rcb-chat-page>main>h1{display:none}
.rcb-chat-page .rcb-chat-panel{box-shadow:none}
.rcb-chat-page #chat.rcb-chat-body{height:min(40rem,calc(100dvh - 130px));border:1px solid #b7c5cf;border-radius:14px;background:#fff}
.rcb-chat-page #chat.rcb-chat-body[hidden],.rcb-chat-body [hidden]{display:none!important}
.rcb-chat-page #chat.rcb-chat-body #history{flex:1 1 0;min-height:0;max-height:none;overflow:auto}
.rcb-chat-page #chat.rcb-chat-body #askForm{position:static;display:flex;flex:0 0 auto;align-items:flex-end;gap:8px;margin:0;padding:0;border:0;background:#fff}
.rcb-chat-page #chat.rcb-chat-body #question{min-height:52px;max-height:120px;font-size:16px}
.rcb-chat-page #chat.rcb-chat-body #askButton{min-width:44px;min-height:52px;background:#16477f;color:#fff;border-radius:8px}
@media(max-width:380px){.rcb-chat-body.rcb-chat-body,.rcb-chat-panel>.pos-dialog-body{padding:8px;gap:6px}.rcb-chat-compose.rcb-chat-compose{gap:6px}.rcb-chat-panel .chat-compose-actions{flex-direction:column;gap:4px}.rcb-chat-panel .chat-compose-actions>button{min-height:44px}}

.rcb-chat-needs-attention{background:#fff0f0!important;border-color:#e8aaaa!important;color:#782f2f}

.rcb-chat-day-separator{display:flex;align-items:center;justify-content:center;align-self:stretch;gap:10px;flex:0 0 auto;margin:8px 0;color:#61756b;font-size:13px;text-align:center}.rcb-chat-day-separator::before,.rcb-chat-day-separator::after{content:"";height:1px;flex:1;background:#d1deed}.rcb-chat-day-separator time{flex:none;padding:2px 6px}
