/* Online chat button and panel (web/chat-widget.js). Fixed to the bottom-right on every public and customer page. */
.ra-chat{position:fixed;right:20px;bottom:20px;z-index:60;display:flex;flex-direction:column;align-items:flex-end;gap:12px;font-size:15px}
.ra-chat[hidden]{display:none}
.ra-chat-button{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0 18px 0 16px;border:0;border-radius:999px;background:var(--s-blue);color:#fff;font:inherit;font-weight:600;cursor:pointer;box-shadow:0 10px 28px rgba(2,6,23,.45);position:relative}
.ra-chat-button:hover{background:var(--s-blue-2)}
.ra-chat-button:focus-visible{outline:2px solid var(--s-sky);outline-offset:3px}
.ra-chat-button svg{width:20px;height:20px}
.ra-chat-badge{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#ef4444;color:#fff;font-size:12px;line-height:20px;text-align:center}
.ra-chat-badge[hidden]{display:none}
.ra-chat-panel{width:360px;height:min(560px,calc(100vh - 110px));display:flex;flex-direction:column;border:1px solid var(--s-line-2);border-radius:16px;background:var(--s-bg-alt);color:var(--s-text);box-shadow:0 24px 60px rgba(2,6,23,.6);overflow:hidden}
.ra-chat-panel[hidden]{display:none}
.ra-chat-panel header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:var(--s-panel-2);border-bottom:1px solid var(--s-line)}
.ra-chat-panel header strong{display:block;font-size:16px}
.ra-chat-panel header small{display:flex;align-items:center;gap:6px;color:var(--s-muted);font-size:13px}
.ra-chat-dot{width:8px;height:8px;border-radius:50%;background:var(--s-green)}
.ra-chat-x{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:10px;background:transparent;color:var(--s-muted);cursor:pointer}
.ra-chat-x:hover{background:var(--s-line);color:var(--s-text)}
.ra-chat-x svg{width:18px;height:18px}
.ra-chat-log{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}
.ra-chat-msg{max-width:85%;display:flex;flex-direction:column;gap:4px}
.ra-chat-msg small{color:var(--s-muted);font-size:12px}
.ra-chat-msg p{margin:0;padding:10px 12px;border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.ra-chat-msg.theirs{align-self:flex-start}
.ra-chat-msg.theirs p{background:var(--s-panel-2);border:1px solid var(--s-line);border-top-left-radius:4px}
.ra-chat-msg.mine{align-self:flex-end;align-items:flex-end}
.ra-chat-msg.mine p{background:var(--s-blue);color:#fff;border-top-right-radius:4px}
.ra-chat-note{margin:0;color:var(--s-muted);font-size:13px;text-align:center}
.ra-chat-form{display:flex;flex-direction:column;gap:8px;padding:12px 16px 16px;border-top:1px solid var(--s-line);background:var(--s-panel)}
.ra-chat-field{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--s-muted)}
.ra-chat-form input,.ra-chat-form textarea{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid var(--s-line-2);border-radius:10px;background:var(--s-bg);color:var(--s-text);font:inherit;resize:none}
.ra-chat-form input:focus,.ra-chat-form textarea:focus{outline:none;border-color:var(--s-blue-2)}
.ra-chat-form .btn{align-self:flex-end;min-width:88px}
.ra-chat-error{color:#fca5a5;font-size:13px}
.ra-chat-error:empty{display:none}
@media(max-width:480px){
  .ra-chat{right:12px;bottom:12px;left:12px}
  .ra-chat-panel{width:100%;height:calc(100dvh - 90px)}
  .ra-chat-button{align-self:flex-end;width:52px;min-height:52px;padding:0;justify-content:center}
  .ra-chat-label{display:none}
}
