/* Live chat widget for visitors. Every rule is scoped to .hxc-root so storefront templates and the
   customer area cannot restyle it, and it cannot restyle them. The business colour arrives as
   --hxc-brand / --hxc-on-brand (set by chat-widget.js with a readable text colour). */
.hxc-root{--hxc-brand:#1d4ed8;--hxc-on-brand:#fff;--hxc-bg:#fff;--hxc-soft:#f5f5f3;--hxc-line:#e4e2dc;--hxc-ink:#16181c;--hxc-muted:#5d626b;--hxc-faint:#8a8f97;
  --hxc-ok:#1ea672;--hxc-away:#e0a320;--hxc-radius:18px;--hxc-font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  position:fixed;right:20px;bottom:20px;z-index:2147483000;font:400 15px/1.45 var(--hxc-font);color:var(--hxc-ink);-webkit-font-smoothing:antialiased;text-align:left;letter-spacing:normal;text-transform:none}
.hxc-root *:not(svg *),.hxc-root *::before,.hxc-root *::after{box-sizing:border-box;margin:0;padding:0;border:0;font:inherit;color:inherit;letter-spacing:inherit;text-transform:none;text-decoration:none;background:none;box-shadow:none;float:none;min-width:0;max-width:none;width:auto;height:auto;line-height:inherit}
.hxc-root [hidden]{display:none !important}
.hxc-root button{cursor:pointer;-webkit-appearance:none;appearance:none;border-radius:0}
.hxc-root :focus{outline:none}
.hxc-root :focus-visible{outline:2px solid var(--hxc-brand);outline-offset:2px}
.hxc-root svg{display:block;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Launcher */
.hxc-root .hxc-launcher{position:relative;display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:var(--hxc-brand);color:var(--hxc-on-brand);box-shadow:0 6px 20px rgba(16,18,24,.22),0 2px 4px rgba(16,18,24,.12);transition:transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .18s}
.hxc-root .hxc-launcher:hover{transform:scale(1.05);box-shadow:0 10px 28px rgba(16,18,24,.26)}
.hxc-root .hxc-launcher:active{transform:scale(.97)}
.hxc-root .hxc-launcher svg{width:26px;height:26px;transition:transform .2s,opacity .2s}
.hxc-root .hxc-launcher .hxc-ic-close{position:absolute;opacity:0;transform:rotate(-45deg)}
.hxc-root.is-open .hxc-launcher .hxc-ic-chat{opacity:0;transform:rotate(45deg)}
.hxc-root.is-open .hxc-launcher .hxc-ic-close{opacity:1;transform:none}
.hxc-root .hxc-badge{position:absolute;top:-3px;right:-3px;min-width:21px;height:21px;padding:0 6px;border-radius:999px;background:#e5484d;color:#fff;font:700 11.5px/21px var(--hxc-font);text-align:center;box-shadow:0 0 0 2px #fff}
.hxc-root .hxc-nudge{position:absolute;right:0;bottom:72px;width:260px;padding:12px 34px 12px 14px;border-radius:14px;background:var(--hxc-bg);box-shadow:0 10px 30px rgba(16,18,24,.18);font-size:14px;color:var(--hxc-ink);cursor:pointer;text-align:left}
.hxc-root .hxc-nudge strong{display:block;font-weight:700;font-size:13px;margin-bottom:2px}
.hxc-root .hxc-nudge-x{position:absolute;top:6px;right:6px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;color:var(--hxc-faint)}
.hxc-root .hxc-nudge-x svg{width:14px;height:14px}

/* Panel */
.hxc-root .hxc-panel{position:absolute;right:0;bottom:74px;display:flex;flex-direction:column;width:380px;height:min(620px,calc(100vh - 110px));border-radius:var(--hxc-radius);background:var(--hxc-bg);box-shadow:0 18px 50px rgba(16,18,24,.24),0 2px 8px rgba(16,18,24,.08);overflow:hidden;transform-origin:bottom right;animation:hxc-in .22s cubic-bezier(.2,.8,.2,1)}
@keyframes hxc-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.hxc-root .hxc-head{position:relative;display:flex;align-items:flex-start;gap:12px;padding:18px 18px 16px;background:var(--hxc-brand);color:var(--hxc-on-brand)}
.hxc-root .hxc-head-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.18);font-weight:700;font-size:16px;flex:none;position:relative}
.hxc-root.on-light-brand .hxc-head-mark{background:rgba(0,0,0,.1)}
.hxc-root .hxc-head-mark::after{content:"";position:absolute;right:0;bottom:0;width:11px;height:11px;border-radius:50%;background:var(--hxc-faint);box-shadow:0 0 0 2px var(--hxc-brand)}
.hxc-root.is-online .hxc-head-mark::after{background:var(--hxc-ok)}
.hxc-root .hxc-head-text{flex:1;min-width:0}
.hxc-root .hxc-title{display:block;font-weight:700;font-size:16.5px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hxc-root .hxc-status{display:block;margin-top:2px;font-size:13px;opacity:.88;line-height:1.4}
.hxc-root .hxc-close{display:grid;place-items:center;width:44px;height:44px;margin:-10px -10px -10px 0;border-radius:50%;color:inherit;flex:none}
.hxc-root .hxc-close:hover{background:rgba(255,255,255,.14)}
.hxc-root.on-light-brand .hxc-close:hover{background:rgba(0,0,0,.08)}
.hxc-root .hxc-close svg{width:20px;height:20px}

.hxc-root .hxc-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px 8px;background:var(--hxc-soft);display:flex;flex-direction:column}
.hxc-root .hxc-list{list-style:none;display:flex;flex-direction:column;margin-top:auto}
.hxc-root .hxc-day{align-self:center;margin:14px 0 8px;font-size:11.5px;font-weight:600;color:var(--hxc-faint)}
.hxc-root .hxc-sys{align-self:center;max-width:92%;margin:8px 0;padding:6px 12px;border-radius:999px;background:rgba(0,0,0,.05);color:var(--hxc-muted);font-size:12.5px;text-align:center}
.hxc-root .hxc-msg{display:flex;flex-direction:column;max-width:82%;margin-top:3px}
.hxc-root .hxc-msg.is-first{margin-top:12px}
.hxc-root .hxc-msg.from-visitor{align-self:flex-end;align-items:flex-end}
.hxc-root .hxc-msg.from-staff{align-self:flex-start;align-items:flex-start}
.hxc-root .hxc-who{margin:0 0 3px 12px;font-size:12px;font-weight:600;color:var(--hxc-muted)}
.hxc-root .hxc-bubble{padding:9px 13px;border-radius:18px;font-size:14.5px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.hxc-root .from-visitor .hxc-bubble{background:var(--hxc-brand);color:var(--hxc-on-brand);border-bottom-right-radius:6px}
.hxc-root .from-staff .hxc-bubble{background:var(--hxc-bg);border:1px solid var(--hxc-line);border-bottom-left-radius:6px}
.hxc-root .hxc-bubble a{text-decoration:underline;text-underline-offset:2px}
.hxc-root .hxc-bubble.has-img{padding:4px}
.hxc-root .hxc-bubble.img-only{padding:0;background:none !important;border:0 !important}
.hxc-root .hxc-bubble.has-img .hxc-text{display:block;padding:5px 9px 4px}
.hxc-root .hxc-img{display:block;border-radius:14px;overflow:hidden;max-width:240px;cursor:zoom-in;background:rgba(0,0,0,.05)}
.hxc-root .hxc-img img{display:block;width:100%;height:auto;max-height:260px;object-fit:cover}
.hxc-root .hxc-meta{margin:3px 6px 0;font-size:11px;color:var(--hxc-faint)}
.hxc-root .hxc-msg.is-failed .hxc-meta{color:#c9353f}
.hxc-root .hxc-msg.is-pending .hxc-bubble{opacity:.65}
.hxc-root .hxc-retry{margin:4px 6px 0;font-size:12px;font-weight:600;color:var(--hxc-brand);text-decoration:underline}
.hxc-root .hxc-welcome{align-self:flex-start;max-width:86%;margin-top:4px}
.hxc-root .hxc-typing{display:flex;align-items:center;gap:8px;margin:10px 0 2px;font-size:12px;color:var(--hxc-muted)}
.hxc-root .hxc-dots{display:inline-flex;gap:4px;padding:10px 12px;border-radius:16px;background:var(--hxc-bg);border:1px solid var(--hxc-line)}
.hxc-root .hxc-dots i{width:6px;height:6px;border-radius:50%;background:var(--hxc-faint);animation:hxc-dot 1.2s infinite ease-in-out}
.hxc-root .hxc-dots i:nth-child(2){animation-delay:.15s}.hxc-root .hxc-dots i:nth-child(3){animation-delay:.3s}
@keyframes hxc-dot{0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-3px);opacity:1}}

/* Email card */
.hxc-root .hxc-ask{margin:12px 0 4px;padding:14px;border-radius:14px;background:var(--hxc-bg);border:1px solid var(--hxc-line)}
.hxc-root .hxc-ask p{font-size:13.5px;color:var(--hxc-ink);margin-bottom:10px}
.hxc-root .hxc-ask label{display:block;font-size:12px;font-weight:600;color:var(--hxc-muted);margin:8px 0 4px}
.hxc-root .hxc-ask input{display:block;width:100%;height:44px;padding:0 12px;border:1px solid var(--hxc-line);border-radius:10px;background:#fff;font-size:16px;color:var(--hxc-ink)}
.hxc-root .hxc-ask input:focus{border-color:var(--hxc-brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--hxc-brand) 25%,transparent)}
.hxc-root .hxc-ask-row{display:flex;gap:8px;align-items:center;margin-top:12px}
.hxc-root .hxc-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border-radius:10px;background:var(--hxc-brand);color:var(--hxc-on-brand);font-weight:600;font-size:14px}
.hxc-root .hxc-btn-quiet{background:none;color:var(--hxc-muted)}
.hxc-root .hxc-ask-err{margin-top:8px;font-size:12.5px;color:#c9353f}
.hxc-root .hxc-ask-done{font-size:13px;color:var(--hxc-muted)}

/* Composer */
.hxc-root .hxc-foot{border-top:1px solid var(--hxc-line);background:var(--hxc-bg);padding:8px 8px 8px 6px}
.hxc-root .hxc-attach{display:flex;align-items:center;gap:10px;margin:0 4px 8px 8px;padding:6px;border-radius:10px;background:var(--hxc-soft);font-size:12.5px;color:var(--hxc-muted)}
.hxc-root .hxc-attach img{width:40px;height:40px;border-radius:7px;object-fit:cover}
.hxc-root .hxc-attach span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hxc-root .hxc-row{display:flex;align-items:flex-end;gap:2px}
.hxc-root .hxc-input{flex:1;display:block;min-height:44px;max-height:140px;padding:11px 8px;resize:none;background:none;font-size:15px;line-height:1.45;color:var(--hxc-ink);overflow-y:auto}
.hxc-root .hxc-input:focus-visible{outline:none}
.hxc-root .hxc-foot:focus-within{border-top-color:var(--hxc-brand)}
.hxc-root .hxc-input::placeholder{color:var(--hxc-faint);opacity:1}
.hxc-root .hxc-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;color:var(--hxc-muted);flex:none;position:relative}
.hxc-root .hxc-icon:hover{background:var(--hxc-soft);color:var(--hxc-ink)}
.hxc-root .hxc-icon svg{width:21px;height:21px}
.hxc-root .hxc-icon input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.hxc-root .hxc-icon:focus-within{outline:2px solid var(--hxc-brand);outline-offset:2px}
.hxc-root .hxc-send{background:var(--hxc-brand);color:var(--hxc-on-brand);transition:opacity .15s}
.hxc-root .hxc-send:hover{background:var(--hxc-brand);color:var(--hxc-on-brand);opacity:.9}
.hxc-root .hxc-send:disabled{opacity:.35;cursor:default}
.hxc-root .hxc-send svg{width:19px;height:19px}
.hxc-root .hxc-err{margin:4px 10px 2px;font-size:12.5px;color:#c9353f}
.hxc-root .hxc-credit{padding:6px 0 0;text-align:center;font-size:11px;color:var(--hxc-faint)}

.hxc-root .hxc-zoom{position:fixed;inset:0;display:grid;place-items:center;padding:24px;background:rgba(10,12,16,.88);z-index:2}
.hxc-root .hxc-zoom img{max-width:100%;max-height:100%;border-radius:10px}
.hxc-root .hxc-zoom .hxc-close{position:absolute;top:14px;right:14px;margin:0;color:#fff;background:rgba(255,255,255,.14)}

.hxc-root .hxc-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Phones: a full-screen sheet */
@media (max-width:540px){
  .hxc-root{right:14px;bottom:calc(14px + env(safe-area-inset-bottom))}
  .hxc-root.is-open{inset:0;right:0;bottom:0}
  .hxc-root.is-open .hxc-launcher,.hxc-root.is-open .hxc-nudge{display:none}
  .hxc-root .hxc-panel{position:fixed;inset:0;width:auto;height:100%;height:100dvh;border-radius:0;animation-name:hxc-up}
  .hxc-root .hxc-head{padding:calc(14px + env(safe-area-inset-top)) 16px 14px}
  .hxc-root .hxc-foot{padding-bottom:calc(8px + env(safe-area-inset-bottom))}
  .hxc-root .hxc-nudge{width:min(260px,calc(100vw - 28px))}
  .hxc-root .hxc-input{font-size:16px}
}
@keyframes hxc-up{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){
  .hxc-root *,.hxc-root *::before,.hxc-root *::after{animation:none !important;transition:none !important}
}
@media print{.hxc-root{display:none !important}}
