/* ONEXTEAM live chat bubble */
#onx-chat{--oc:#ff6a1a;--oc-bg:#ffffff;--oc-ink:#14161c;--oc-mut:#6b7180;--oc-soft:#f3f4f7;--oc-bd:#e6e8ee;position:fixed;right:20px;bottom:20px;z-index:2147483000;font:14px/1.45 Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--oc-ink)}
@media (prefers-color-scheme:dark){#onx-chat{--oc-bg:#16181f;--oc-ink:#eef0f5;--oc-mut:#9aa1b2;--oc-soft:#22252f;--oc-bd:#2c303c}}
html[data-theme="dark"] #onx-chat{--oc-bg:#16181f;--oc-ink:#eef0f5;--oc-mut:#9aa1b2;--oc-soft:#22252f;--oc-bd:#2c303c}
html[data-theme="light"] #onx-chat{--oc-bg:#ffffff;--oc-ink:#14161c;--oc-mut:#6b7180;--oc-soft:#f3f4f7;--oc-bd:#e6e8ee}
#onx-chat *{box-sizing:border-box}
#onx-chat div,#onx-chat form,#onx-chat button,#onx-chat input,#onx-chat textarea{position:relative;top:auto;left:auto;margin:0;letter-spacing:normal;text-transform:none}
#onx-chat .oc-panel{position:absolute}
#onx-chat [hidden]{display:none!important}
#onx-chat svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

.oc-launch{position:relative;width:60px;height:60px;border-radius:50%;border:0;cursor:pointer;color:#fff;background:var(--oc);box-shadow:0 10px 30px -6px color-mix(in srgb,var(--oc) 70%,transparent),0 4px 12px rgba(0,0,0,.18);display:grid;place-items:center;transition:transform .2s ease,box-shadow .2s ease;margin-left:auto}
.oc-launch:hover{transform:translateY(-2px) scale(1.04)}
.oc-launch:focus-visible{outline:3px solid color-mix(in srgb,var(--oc) 45%,transparent);outline-offset:3px}
.oc-launch svg{width:28px;height:28px;position:absolute;transition:transform .25s ease,opacity .2s ease}
.oc-launch .oc-x{opacity:0;transform:rotate(-90deg) scale(.6)}
.oc-open .oc-launch svg:first-child{opacity:0;transform:rotate(90deg) scale(.6)}
.oc-open .oc-launch .oc-x{opacity:1;transform:none}
.oc-dot{position:absolute;top:4px;right:4px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2px solid #fff}

.oc-panel{position:absolute;right:0;bottom:76px;width:370px;height:min(600px,calc(100vh - 120px));display:flex;flex-direction:column;background:var(--oc-bg);border:1px solid var(--oc-bd);border-radius:20px;overflow:hidden;box-shadow:0 24px 60px -12px rgba(0,0,0,.35);opacity:0;transform:translateY(14px) scale(.97);transform-origin:bottom right;pointer-events:none;visibility:hidden;transition:opacity .2s ease,transform .22s ease,visibility 0s .22s}
.oc-open .oc-panel{opacity:1;transform:none;pointer-events:auto;visibility:visible;transition:opacity .2s ease,transform .22s ease}

.oc-head{display:flex;align-items:center;gap:12px;padding:16px 16px 18px;color:#fff;background:linear-gradient(135deg,var(--oc),color-mix(in srgb,var(--oc) 62%,#000))}
.oc-av{flex:0 0 44px;height:44px;border-radius:14px;background:#fff;display:grid;place-items:center;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.oc-av img{max-width:36px;max-height:36px;object-fit:contain}
.oc-ht{flex:1;min-width:0}
.oc-ht b{display:block;font:700 16px/1.2 Manrope,Inter,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.oc-status{display:flex;align-items:center;gap:6px;opacity:.92;font-size:12.5px;margin-top:3px}
.oc-status i{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.55)}
.oc-status i.on{background:#4ade80;box-shadow:0 0 0 3px rgba(74,222,128,.25)}
.oc-close{border:0;background:rgba(255,255,255,.16);color:#fff;width:34px;height:34px;border-radius:10px;cursor:pointer;display:grid;place-items:center}
.oc-close:hover{background:rgba(255,255,255,.26)}
.oc-close svg{width:18px;height:18px}

.oc-body{flex:1;overflow-y:auto;padding:16px 14px 8px;display:flex;flex-direction:column;gap:10px;background:var(--oc-bg);overscroll-behavior:contain}
.oc-msg{display:flex;flex-direction:column;max-width:84%;animation:oc-in .18s ease}
.oc-msg time{font-size:10.5px;color:var(--oc-mut);margin:3px 6px 0}
.oc-who-l{font-size:11px;font-weight:600;color:var(--oc-mut);margin:0 6px 3px}
.oc-bub{padding:9px 13px;border-radius:16px;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}
.oc-bub a{color:inherit;text-decoration:underline}
.oc-them{align-self:flex-start}
.oc-them .oc-bub{background:var(--oc-soft);border-bottom-left-radius:5px}
.oc-ai .oc-bub{background:color-mix(in srgb,var(--oc) 9%,var(--oc-soft))}
.oc-me{align-self:flex-end;align-items:flex-end}
.oc-me .oc-bub{background:var(--oc);color:#fff;border-bottom-right-radius:5px}
.oc-pending{opacity:.6}
.oc-sys{align-self:center;max-width:92%;align-items:center}
.oc-sys .oc-bub{background:transparent;color:var(--oc-mut);font-size:12.5px;text-align:center;padding:4px 8px}
.oc-sys time{display:none}
.oc-intro .oc-msg{max-width:90%}
.oc-typing .oc-bub{display:flex;gap:4px;padding:12px 14px}
.oc-typing i{width:7px;height:7px;border-radius:50%;background:var(--oc-mut);animation:oc-dot 1.2s infinite}
.oc-typing i:nth-child(2){animation-delay:.15s}.oc-typing i:nth-child(3){animation-delay:.3s}

.oc-form{border-top:1px solid var(--oc-bd);padding:10px 12px 8px;background:var(--oc-bg)}
.oc-who{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.oc-form input,.oc-form textarea{width:100%;font:inherit;color:var(--oc-ink);background:var(--oc-soft);border:1px solid transparent;border-radius:12px;padding:9px 12px;outline:none;resize:none}
.oc-form input:focus,.oc-form textarea:focus{border-color:color-mix(in srgb,var(--oc) 55%,transparent);background:var(--oc-bg)}
.oc-row{display:flex;gap:8px;align-items:flex-end}
.oc-row textarea{max-height:120px;min-height:42px}
.oc-send{flex:0 0 42px;height:42px;border:0;border-radius:12px;background:var(--oc);color:#fff;cursor:pointer;display:grid;place-items:center;transition:filter .15s}
.oc-send:hover{filter:brightness(1.08)}
.oc-send:disabled{opacity:.55;cursor:default}
.oc-send svg{width:19px;height:19px}
.oc-err{color:#e5484d;font-size:12.5px;margin:0 2px 6px}
.oc-foot{text-align:center;font-size:10.5px;color:var(--oc-mut);margin-top:6px;letter-spacing:.02em}

@keyframes oc-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes oc-dot{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@media (max-width:520px){
  #onx-chat{right:14px;bottom:14px}
  #onx-chat .oc-panel{position:fixed;inset:0;width:auto;height:auto;border-radius:0;bottom:0;border:0}
  .oc-open .oc-launch{display:none}
  .oc-who{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){#onx-chat *{animation:none!important;transition:none!important}}
