body.client-template-hstock .hstock-chat-root{--hc-primary:#635bdb;--hc-primary-2:#7855c9;--hc-ink:#1c2942;--hc-muted:#8290a8;--hc-line:#e5eaf4;--hc-surface:#fff;--hc-soft:#f5f7fc;position:relative;z-index:2000}
body.client-template-hstock .hstock-chat-launcher{position:fixed;right:24px;bottom:24px;width:58px;height:58px;border:0;border-radius:20px;background:linear-gradient(145deg,#6a5ce0,#7654c9);color:#fff;display:grid;place-items:center;box-shadow:0 14px 30px rgba(73,57,171,.32);cursor:pointer;transition:transform .2s ease,box-shadow .2s ease;z-index:2090}
body.client-template-hstock .hstock-chat-launcher:hover,body.client-template-hstock .hstock-chat-launcher:focus-visible{transform:translateY(-3px);box-shadow:0 18px 35px rgba(73,57,171,.4);outline:none}
body.client-template-hstock .hstock-chat-launcher i{font-size:22px}
body.client-template-hstock .hstock-chat-unread{position:absolute;right:-3px;top:-5px;min-width:21px;height:21px;padding:0 5px;border:2px solid #fff;border-radius:99px;background:#f04462;color:#fff;font-size:11px;line-height:17px;font-weight:800;display:none}
body.client-template-hstock .hstock-chat-panel{position:fixed;right:24px;bottom:94px;width:min(390px,calc(100vw - 32px));height:min(680px,calc(100dvh - 122px));min-height:460px;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(218,224,239,.95);border-radius:22px;background:var(--hc-surface);box-shadow:0 25px 70px rgba(28,41,66,.24);z-index:2085;transform-origin:bottom right;animation:hstockChatIn .2s ease-out}
body.client-template-hstock .hstock-chat-panel[hidden]{display:none}
body.client-template-hstock .hstock-chat-head{display:flex;align-items:center;gap:11px;padding:16px 16px 15px;background:linear-gradient(135deg,#635bdb,#7855c9);color:#fff}
body.client-template-hstock .hstock-chat-agent-avatar{width:40px;height:40px;display:grid;place-items:center;flex:0 0 auto;border:1px solid rgba(255,255,255,.42);border-radius:14px;background:rgba(255,255,255,.18);font-size:19px}
body.client-template-hstock .hstock-chat-head-copy{min-width:0;flex:1}
body.client-template-hstock .hstock-chat-head-copy strong{display:block;font-size:15px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.client-template-hstock .hstock-chat-head-copy span{display:block;margin-top:3px;color:rgba(255,255,255,.78);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.client-template-hstock .hstock-chat-head-status{display:inline-flex;align-items:center;gap:5px}
body.client-template-hstock .hstock-chat-head-status:before{width:7px;height:7px;border-radius:50%;background:#55e19d;content:"";box-shadow:0 0 0 3px rgba(85,225,157,.2)}
body.client-template-hstock .hstock-chat-close{width:32px;height:32px;border:0;border-radius:50%;background:rgba(255,255,255,.15);color:#fff;display:grid;place-items:center;cursor:pointer}
body.client-template-hstock .hstock-chat-close:hover{background:rgba(255,255,255,.26)}
body.client-template-hstock .hstock-chat-notice{margin:12px 12px 4px;padding:10px 12px;border-left:3px solid #2e9eea;border-radius:10px;background:#eef7ff;color:#52708f;font-size:12px;line-height:1.5}
body.client-template-hstock .hstock-chat-notice i{margin-right:6px;color:#209bdd}
body.client-template-hstock .hstock-chat-messages{display:flex;flex:1;flex-direction:column;gap:10px;overflow:auto;padding:15px 14px 12px;background:linear-gradient(180deg,#fbfcff 0%,#f5f7fc 100%);overscroll-behavior:contain}
body.client-template-hstock .hstock-chat-empty{margin:auto;padding:24px 18px;text-align:center;color:var(--hc-muted);font-size:13px;line-height:1.7}
body.client-template-hstock .hstock-chat-empty i{display:block;margin-bottom:9px;color:#b7c0d3;font-size:28px}
body.client-template-hstock .hstock-chat-bubble{max-width:84%;padding:11px 13px;border-radius:16px;color:#fff;font-size:13px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 6px 14px rgba(31,48,90,.08)}
body.client-template-hstock .hstock-chat-bubble.is-user{align-self:flex-end;border-bottom-right-radius:5px;background:linear-gradient(135deg,#665be0,#7b56c8)}
body.client-template-hstock .hstock-chat-bubble.is-admin{align-self:flex-start;border-bottom-left-radius:5px;background:linear-gradient(135deg,#2fac72,#279d65)}
body.client-template-hstock .hstock-chat-bubble.is-system{align-self:center;max-width:92%;padding:7px 11px;background:#e9edf6;color:#64728d;font-size:12px;box-shadow:none}
body.client-template-hstock .hstock-chat-bubble-meta{display:block;margin-top:5px;color:rgba(255,255,255,.68);font-size:10px;line-height:1;text-align:right}
body.client-template-hstock .hstock-chat-bubble.is-system .hstock-chat-bubble-meta{display:none}
body.client-template-hstock .hstock-chat-quick{display:flex;gap:7px;overflow-x:auto;padding:8px 12px;border-top:1px solid var(--hc-line);background:#fff;scrollbar-width:none}
body.client-template-hstock .hstock-chat-quick::-webkit-scrollbar{display:none}
body.client-template-hstock .hstock-chat-quick button{flex:0 0 auto;padding:7px 10px;border:1px solid #dfe4f0;border-radius:99px;background:#fff;color:#596884;font-size:11px;cursor:pointer;white-space:nowrap}
body.client-template-hstock .hstock-chat-quick button:hover{border-color:#b6adf1;background:#f7f5ff;color:#5d51c9}
body.client-template-hstock .hstock-chat-compose{display:flex;align-items:flex-end;gap:8px;padding:10px 12px 12px;border-top:1px solid var(--hc-line);background:#fff}
body.client-template-hstock .hstock-chat-input{min-height:40px;max-height:110px;flex:1;resize:none;padding:11px 12px;border:1px solid #dce2ee;border-radius:12px;background:#f8f9fc;color:var(--hc-ink);font:inherit;font-size:13px;line-height:1.4;outline:none}
body.client-template-hstock .hstock-chat-input:focus{border-color:#9d94e9;background:#fff;box-shadow:0 0 0 3px rgba(99,91,219,.1)}
body.client-template-hstock .hstock-chat-send{width:42px;height:40px;border:0;border-radius:12px;background:linear-gradient(145deg,#665be0,#7555cb);color:#fff;display:grid;place-items:center;cursor:pointer;box-shadow:0 7px 15px rgba(99,91,219,.22)}
body.client-template-hstock .hstock-chat-send:disabled{opacity:.55;cursor:not-allowed;box-shadow:none}
body.client-template-hstock .hstock-chat-connection{padding:0 14px 8px;background:#fff;color:#9aa5ba;font-size:10px;text-align:right}
body.client-template-hstock .hstock-chat-connection.is-live{color:#23a66d}
body.client-template-hstock .hstock-header-chat{background:linear-gradient(145deg,#6259d9,#7b58c9)}
body.client-template-hstock.hstock-dark-mode .hstock-chat-panel,html.hstock-dark-mode body.client-template-hstock .hstock-chat-panel{--hc-surface:#20283b;--hc-ink:#edf2ff;--hc-muted:#a8b4cb;--hc-line:#344058;--hc-soft:#283148}
body.client-template-hstock.hstock-dark-mode .hstock-chat-notice,body.client-template-hstock.hstock-dark-mode .hstock-chat-quick,body.client-template-hstock.hstock-dark-mode .hstock-chat-compose,body.client-template-hstock.hstock-dark-mode .hstock-chat-connection,html.hstock-dark-mode body.client-template-hstock .hstock-chat-notice,html.hstock-dark-mode body.client-template-hstock .hstock-chat-quick,html.hstock-dark-mode body.client-template-hstock .hstock-chat-compose,html.hstock-dark-mode body.client-template-hstock .hstock-chat-connection{background:#20283b}
body.client-template-hstock.hstock-dark-mode .hstock-chat-messages,html.hstock-dark-mode body.client-template-hstock .hstock-chat-messages{background:linear-gradient(180deg,#1d2537 0%,#171e2e 100%)}
body.client-template-hstock.hstock-dark-mode .hstock-chat-quick button,html.hstock-dark-mode body.client-template-hstock .hstock-chat-quick button{border-color:#3e4962;background:#273149;color:#d3dbed}
body.client-template-hstock.hstock-dark-mode .hstock-chat-input,html.hstock-dark-mode body.client-template-hstock .hstock-chat-input{border-color:#3e4962;background:#273149;color:#edf2ff}
@keyframes hstockChatIn{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:800px){body.client-template-hstock .hstock-chat-launcher{right:16px;bottom:calc(16px + env(safe-area-inset-bottom));width:54px;height:54px;border-radius:18px}body.client-template-hstock .hstock-chat-panel{right:0;bottom:0;width:100vw;height:min(100dvh,760px);min-height:0;border-radius:22px 22px 0 0;border-bottom:0;animation:hstockChatMobileIn .22s ease-out}body.client-template-hstock .hstock-chat-messages{padding-bottom:14px}body.client-template-hstock .hstock-chat-compose{padding-bottom:calc(12px + env(safe-area-inset-bottom))}}
@keyframes hstockChatMobileIn{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
