.hx-chat-launcher { --hx-chat-launcher-text:#475a87; --hx-chat-launcher-border:#d9ddfb; position:fixed; top:50%; right:16px; right:max(16px,env(safe-area-inset-right)); z-index:85; display:inline-flex; min-width:54px; min-height:54px; align-items:center; gap:10px; border:1px solid var(--hx-chat-launcher-border); border-radius:18px; padding:9px 14px 9px 9px; color:var(--hx-chat-launcher-text); background:linear-gradient(135deg,rgba(249,251,255,.98),rgba(239,242,255,.96)); box-shadow:0 14px 30px rgb(92 108 164 / 18%),0 2px 6px rgb(103 115 170 / 10%); backdrop-filter:blur(12px); cursor:pointer; font-family:Inter,Arial,sans-serif; touch-action:manipulation; transform:translate3d(0,-50%,0); transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease; }
@media(hover:hover){.hx-chat-launcher:hover { border-color:#bac3fa; box-shadow:0 18px 34px rgb(92 108 164 / 24%),0 3px 8px rgb(103 115 170 / 12%); transform:translate3d(-2px,-50%,0); }}
.hx-chat-launcher:active { transform:translate3d(0,-50%,0) scale(.97); }
.hx-chat-launcher:focus-visible { outline:3px solid #7587f1; outline-offset:3px; }
.hx-chat-launcher__mark { position:relative; display:grid; width:36px; height:36px; flex:0 0 auto; place-items:center; border-radius:13px; color:#fff; background:linear-gradient(135deg,#7c96fb,#9b82ed); box-shadow:0 6px 12px rgb(112 126 222 / 28%); }
.hx-chat-launcher__mark::after { position:absolute; top:-3px; right:-3px; width:9px; height:9px; border:2px solid #f8faff; border-radius:50%; background:#63cfbd; box-shadow:0 1px 4px rgb(55 112 117 / 24%); content:""; }
.hx-chat-launcher__mark svg,.hx-chat__signal svg { display:block; width:21px; height:21px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.9; }
.hx-chat-launcher__label { display:grid; gap:3px; text-align:left; white-space:nowrap; }
.hx-chat-launcher__label strong { display:block; color:#40527d; font-size:13px; font-weight:800; letter-spacing:-.01em; line-height:1.05; }
.hx-chat-launcher__label small { display:block; color:#8190b2; font-size:9px; font-weight:800; letter-spacing:.1em; line-height:1; text-transform:uppercase; }
.hx-chat { position:fixed; top:50%; right:16px; right:max(16px,env(safe-area-inset-right)); z-index:90; width:min(390px,calc(100vw - 28px)); height:min(620px,calc(100vh - 35px)); height:min(620px,calc(100dvh - 35px)); overflow:hidden; border:1px solid rgb(255 255 255 / 26%); border-radius:22px; color:#20304a; background:#f6f8fc; box-shadow:0 28px 90px rgb(4 12 32 / 35%); font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif; transform:translate3d(0,-50%,0); }
.hx-chat[hidden],.hx-chat-launcher[hidden] { display:none!important; }
.hx-chat__head { position:relative; display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:82px; padding:17px 18px; color:#fff; background:linear-gradient(120deg,#111a32,#29395f 73%,#8d2b3b); }
.hx-chat__head::after { position:absolute; right:-26px; bottom:-63px; width:137px; height:137px; border:1px solid rgb(255 255 255 / 18%); border-radius:50%; content:""; }
.hx-chat__identity { position:relative; z-index:1; display:flex; align-items:center; gap:10px; }
.hx-chat__signal { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:#e3343d; box-shadow:0 7px 16px rgb(0 0 0 / 20%); }
.hx-chat__identity p { margin:0 0 3px; color:#bfc9e0; font-size:9px; font-weight:800; letter-spacing:.13em; }
.hx-chat__identity strong { display:block; font-size:15px; letter-spacing:-.02em; }
.hx-chat__close { position:relative; z-index:1; width:31px; height:31px; border:0; border-radius:9px; color:#fff; background:rgb(255 255 255 / 10%); cursor:pointer; font-size:20px; }
.hx-chat__screen { display:flex; height:calc(100% - 82px); flex-direction:column; }
.hx-chat__welcome { padding:27px 25px; overflow:auto; }
.hx-chat__eyebrow { margin:0 0 9px; color:#db3641; font-size:10px; font-weight:850; letter-spacing:.14em; }
.hx-chat__welcome h2 { margin:0; color:#19243d; font-size:27px; letter-spacing:-.05em; line-height:1.08; }
.hx-chat__welcome > p { margin:13px 0 23px; color:#68758d; font-size:13px; line-height:1.7; }
.hx-chat__field { display:grid; gap:7px; margin:15px 0; }
.hx-chat__field label { color:#46536c; font-size:12px; font-weight:750; }
.hx-chat__field input { width:100%; height:43px; border:1px solid #d5ddea; border-radius:10px; padding:0 12px; outline:none; color:#24304a; background:#fff; font:inherit; font-size:13px; }
.hx-chat__field input:focus { border-color:#7388c6; box-shadow:0 0 0 3px rgb(115 136 198 / 13%); }
.hx-chat__primary,.hx-chat__secondary { width:100%; min-height:43px; border:0; border-radius:10px; cursor:pointer; font:750 13px/1 inherit; }
.hx-chat__primary { color:#fff; background:#df3540; box-shadow:0 8px 17px rgb(217 48 61 / 22%); }
.hx-chat__primary:disabled { opacity:.55; cursor:not-allowed; }
.hx-chat__secondary { margin-top:10px; color:#52617d; background:#edf1f8; }
.hx-chat__turnstile { margin:10px 0 2px; overflow:hidden; }
.hx-chat__restore { margin:17px auto 0; display:block; border:0; color:#536baf; background:transparent; cursor:pointer; font:650 12px/1 inherit; text-decoration:underline; text-underline-offset:3px; }
.hx-chat__notice { min-height:18px; margin:12px 0 0; color:#6f7d96; font-size:11px; line-height:1.45; }
.hx-chat__notice.error { color:#bd2431; }
.hx-chat__privacy { margin:22px 0 0; padding:11px 12px; border-left:3px solid #d8e0ef; color:#7c8799; background:#f1f4f9; font-size:10px; line-height:1.55; }
.hx-chat__history { display:flex; min-height:0; flex:1; flex-direction:column; }
.hx-chat__historybar { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:46px; padding:8px 13px; border-bottom:1px solid #e6ebf3; background:#fff; }
.hx-chat__select { max-width:270px; overflow:hidden; color:#53607a; font-size:11px; font-weight:700; white-space:nowrap; text-overflow:ellipsis; }
.hx-chat__new { border:0; color:#c72f3a; background:transparent; cursor:pointer; font:800 11px/1 inherit; white-space:nowrap; }
.hx-chat__messages { min-height:0; flex:1; overflow:auto; padding:16px 13px 12px; background:linear-gradient(180deg,#f6f8fc,#eef2f8); }
.hx-chat__system { margin:3px auto 15px; max-width:280px; color:#77849b; font-size:10px; line-height:1.5; text-align:center; }
.hx-chat__message { display:flex; margin:9px 0; }
.hx-chat__message--visitor { justify-content:flex-end; }
.hx-chat__bubble { max-width:82%; overflow:hidden; border-radius:14px; padding:9px 11px; color:#3a4861; background:#fff; box-shadow:0 3px 8px rgb(35 51 85 / 6%); font-size:12px; line-height:1.52; white-space:pre-wrap; word-break:break-word; }
.hx-chat__message--visitor .hx-chat__bubble { color:#fff; background:#df3540; box-shadow:0 5px 12px rgb(217 48 61 / 19%); }
.hx-chat__meta { display:block; margin-bottom:3px; color:#8f9bb0; font-size:9px; font-weight:750; }
.hx-chat__message--visitor .hx-chat__meta { color:#ffd4d7; }
.hx-chat__attachment { display:block; margin-top:7px; overflow:hidden; color:inherit; text-decoration:none; }
.hx-chat__attachment img,.hx-chat__attachment video { display:block; width:100%; max-height:190px; border-radius:8px; object-fit:cover; background:#101827; }
.hx-chat__attachment-file { display:flex; align-items:center; gap:8px; min-width:190px; padding:8px; border:1px solid rgb(93 109 141 / 16%); border-radius:8px; background:rgb(255 255 255 / 14%); }
.hx-chat__attachment-file b { overflow:hidden; font-size:11px; white-space:nowrap; text-overflow:ellipsis; }
.hx-chat__composer { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:8px; align-items:end; padding:10px 11px; border-top:1px solid #e2e8f2; background:#fff; }
.hx-chat__attach { display:grid; width:31px; height:34px; place-items:center; border:0; border-radius:8px; color:#63718a; background:#eff3f8; cursor:pointer; font-size:16px; }
.hx-chat__attach input { display:none; }
.hx-chat__composer textarea { min-height:36px; max-height:84px; resize:none; border:1px solid #d9e1ed; border-radius:9px; padding:8px 9px; outline:none; color:#283650; font:inherit; font-size:12px; line-height:1.4; }
.hx-chat__send { min-width:52px; height:34px; border:0; border-radius:8px; color:#fff; background:#202d4a; cursor:pointer; font:750 11px/1 inherit; }
.hx-chat__sending { padding:4px 13px 8px; color:#7f8ca1; background:#fff; font-size:10px; }
.hx-chat__paste-hint { margin:0; padding:0 12px 9px; color:#8a96a8; background:#fff; font-size:9px; line-height:1.45; }

/* Desktop customer chat: aligned with the MODTEKPRIME navigation and product UI. */
@media (min-width:1025px) {
  .hx-chat-launcher { top:50%; right:max(30px,env(safe-area-inset-right)); gap:11px; min-width:176px; min-height:58px; padding:10px 17px 10px 10px; border-color:#d9ddfb; background:linear-gradient(135deg,#fbfcff,#edf0ff); box-shadow:0 18px 38px rgb(91 106 163 / 20%),0 3px 8px rgb(98 112 169 / 9%); }
  .hx-chat-launcher__mark { width:38px; height:38px; border-radius:14px; background:linear-gradient(135deg,#7793fb,#9f83ee); }
  .hx-chat { top:50%; right:max(30px,env(safe-area-inset-right)); width:420px; height:min(660px,calc(100vh - 44px)); height:min(660px,calc(100dvh - 44px)); border:1px solid rgba(30,48,70,.18); border-radius:20px; box-shadow:0 32px 86px rgba(11,26,43,.3); }
  .hx-chat__head { min-height:92px; padding:19px 21px; background:linear-gradient(120deg,#102339,#1d3d59 65%,#df6a31); }
  .hx-chat__signal { background:#e76b2f; }
  .hx-chat__identity strong { font-size:16px; }
  .hx-chat__welcome { padding:30px 28px; }
  .hx-chat__welcome h2 { color:#14273d; font-size:31px; }
  .hx-chat__eyebrow { color:#d65e26; }
  .hx-chat__primary { background:#e76b2f; box-shadow:0 10px 20px rgba(213,89,35,.2); }
  .hx-chat__secondary { color:#2b415a; background:#eaf0f5; }
  .hx-chat__historybar { min-height:52px; padding:9px 16px; }
  .hx-chat__messages { padding:20px 17px 14px; background:linear-gradient(180deg,#f5f8fa,#edf2f5); }
  .hx-chat__bubble { border:1px solid rgba(209,221,231,.9); border-radius:14px 14px 14px 4px; box-shadow:0 5px 14px rgba(31,52,73,.06); }
  .hx-chat__message--visitor .hx-chat__bubble { border:0; border-radius:14px 14px 4px 14px; background:#1a334d; box-shadow:0 7px 16px rgba(26,51,77,.15); }
  .hx-chat__composer { padding:13px 14px; }
  .hx-chat__send { height:38px; padding:0 14px; background:#e76b2f; }
  .hx-chat__attach { width:34px; height:38px; color:#36516b; background:#e9eff4; }
}
@media(max-width:560px){.hx-chat-launcher{right:max(10px,env(safe-area-inset-right));width:72px;min-width:72px;height:72px;min-height:72px;flex-direction:column;justify-content:center;gap:4px;padding:7px 4px 6px;border-radius:19px}.hx-chat-launcher__mark{width:34px;height:34px;border-radius:12px}.hx-chat-launcher__mark::after{top:-4px;right:-4px;width:10px;height:10px}.hx-chat-launcher__mark svg{width:20px;height:20px}.hx-chat-launcher__label{display:block;text-align:center}.hx-chat-launcher__label strong{font-size:10px;line-height:1.1}.hx-chat-launcher__label small{display:none}.hx-chat{top:50%;right:max(9px,env(safe-area-inset-right));width:calc(100vw - 18px);height:calc(100vh - 18px);height:calc(100dvh - 18px);border-radius:18px}.hx-chat__welcome{padding:24px 19px}.hx-chat__historybar{padding:8px 10px}.hx-chat__select{max-width:205px}.hx-chat__bubble{max-width:87%}}

@media(prefers-reduced-motion:reduce){.hx-chat-launcher{transition:none}}

/* Global language selector: fixed companion below Chat and a focused dialog for longer language lists. */
.hx-language-launcher.language-switcher {
  position:fixed !important;
  top:calc(50% + 76px) !important;
  right:max(16px,env(safe-area-inset-right)) !important;
  left:auto !important;
  z-index:84;
  display:grid !important;
  grid-template-columns:36px minmax(0,1fr) 14px;
  align-items:center;
  gap:10px;
  width:176px !important;
  min-width:176px !important;
  min-height:54px !important;
  margin:0 !important;
  padding:9px 15px 9px 9px !important;
  overflow:hidden;
  border:1px solid #c8e7e7 !important;
  border-radius:18px !important;
  color:#275d74 !important;
  background:linear-gradient(135deg,rgba(251,255,255,.98),rgba(232,248,249,.96)) !important;
  box-shadow:0 14px 30px rgba(40,119,137,.18),0 2px 6px rgba(38,105,126,.10) !important;
  cursor:pointer;
  touch-action:manipulation;
  transform:translate3d(0,-50%,0);
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.hx-language-launcher.language-switcher::before { position:absolute; inset:0; border-radius:inherit; background:linear-gradient(120deg,rgba(255,255,255,.48),transparent 58%); content:""; pointer-events:none; }
.hx-language-launcher .language-switcher__mark { position:relative; z-index:1; display:grid; width:36px; height:36px; place-items:center; border-radius:13px; color:#fff; background:linear-gradient(135deg,#13a59c,#367ed2); box-shadow:0 6px 12px rgba(32,130,151,.27),inset 0 1px 0 rgba(255,255,255,.24); }
.hx-language-launcher .language-switcher__globe { display:block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.85; }
.hx-language-launcher .language-switcher__chevron { position:static !important; z-index:1; width:14px; height:14px; fill:none; color:#3b7890; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; }
.hx-language-launcher .language-switcher__current { z-index:1; overflow:hidden; color:#275d74; font:800 13px/1 Inter,"Noto Sans SC","PingFang SC","Segoe UI","Microsoft YaHei",Arial,sans-serif; letter-spacing:.01em; text-align:start; text-overflow:ellipsis; white-space:nowrap; }
@media(hover:hover){.hx-language-launcher.language-switcher:hover { border-color:#9ed6d7 !important; box-shadow:0 18px 34px rgba(40,119,137,.24),0 3px 8px rgba(38,105,126,.12) !important; transform:translate3d(-2px,-50%,0); }}
.hx-language-launcher.language-switcher:active { transform:translate3d(0,-50%,0) scale(.97); }
.hx-language-launcher.language-switcher:focus-visible { outline:3px solid #35a9a1; outline-offset:3px; border-color:#8fced0 !important; }
.hx-chat-open .hx-language-launcher { display:none !important; }

.hx-language-dialog-backdrop { position:fixed; z-index:220; inset:0; display:grid; place-items:center; padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); overflow:auto; background:rgba(7,24,40,.54); backdrop-filter:blur(5px); opacity:0; transition:opacity .2s ease-out; }
.hx-language-dialog-backdrop.is-open { opacity:1; }
.hx-language-dialog { width:min(100%,720px); max-height:min(760px,calc(100dvh - 32px)); display:flex; flex-direction:column; gap:16px; padding:24px; overflow:hidden; border:1px solid rgba(214,229,240,.9); border-radius:22px; color:#17344b; background:#fff; box-shadow:0 28px 72px rgba(1,19,33,.3); transform:translateY(10px) scale(.985); transition:transform .2s ease-out; }
.hx-language-dialog-backdrop.is-open .hx-language-dialog { transform:translateY(0) scale(1); }
.hx-language-dialog__header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.hx-language-dialog__eyebrow { margin:0 0 4px; color:#117d78; font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.hx-language-dialog__header h2 { margin:0; color:#11364f; font-size:clamp(22px,3vw,28px); line-height:1.2; }
.hx-language-dialog__header p:not(.hx-language-dialog__eyebrow) { max-width:560px; margin:8px 0 0; color:#5e7183; font-size:14px; line-height:1.55; }
.hx-language-dialog__close { flex:0 0 44px; display:grid; width:44px; min-height:44px; place-items:center; padding:0; border:1px solid #d7e4ec; border-radius:12px; color:#315066; background:#f8fbfc; cursor:pointer; touch-action:manipulation; transition:background-color .18s ease,border-color .18s ease,transform .18s ease; }
.hx-language-dialog__close:hover { border-color:#97c4c7; background:#eaf8f7; }
.hx-language-dialog__close:active { transform:scale(.96); }
.hx-language-dialog__close svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-width:1.8; }
.hx-language-dialog :is(button,input):focus-visible { outline:3px solid rgba(13,137,131,.36); outline-offset:2px; }
.hx-language-dialog__search { position:relative; display:block; }
.hx-language-dialog__search svg { position:absolute; top:50%; left:15px; width:19px; height:19px; fill:none; stroke:#527186; stroke-linecap:round; stroke-width:1.9; transform:translateY(-50%); pointer-events:none; }
.hx-language-dialog__search input { box-sizing:border-box; width:100%; min-height:48px; padding:0 16px 0 45px; border:1px solid #cbdce7; border-radius:13px; color:#17344b; background:#fbfdfe; font:500 16px/1.3 Inter,"Noto Sans SC","PingFang SC","Segoe UI","Microsoft YaHei",Arial,sans-serif; }
.hx-language-dialog__search input::placeholder { color:#7d91a2; }
.hx-language-dialog__list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; min-height:0; overflow:auto; padding:4px; border:1px solid #e1ebf1; border-radius:14px; background:#f8fbfc; }
.hx-language-option { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:64px; padding:10px 12px; border:1px solid #dbe6ed; border-radius:12px; color:#17344b; background:#fff; cursor:pointer; text-align:start; touch-action:manipulation; transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.hx-language-option:hover { border-color:#89bebc; background:#f1fbfa; box-shadow:0 5px 14px rgba(23,82,94,.09); }
.hx-language-option:active { transform:scale(.985); }
.hx-language-option[aria-selected="true"] { border-color:#0b8b83; background:#e9f8f6; box-shadow:inset 0 0 0 1px rgba(11,139,131,.12); }
.hx-language-option[hidden] { display:none; }
.hx-language-option__copy { min-width:0; display:grid; gap:4px; }
.hx-language-option__copy strong { overflow:hidden; color:#183b52; font-size:15px; font-weight:800; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.hx-language-option__copy small { overflow:hidden; color:#6b8193; font-size:12px; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.hx-language-option__check { flex:0 0 auto; width:18px; height:18px; fill:none; stroke:#087d73; stroke-linecap:round; stroke-linejoin:round; stroke-width:2.1; }
.hx-language-dialog__empty { margin:0; color:#5d7183; font-size:14px; text-align:center; }

@media (min-width:1025px) { .hx-language-launcher.language-switcher { top:calc(50% + 88px) !important; right:max(30px,env(safe-area-inset-right)) !important; min-height:58px !important; padding:10px 17px 10px 10px !important; } .hx-language-launcher .language-switcher__mark { width:38px; height:38px; border-radius:14px; } }
@media (max-width:560px) { .hx-language-launcher.language-switcher { top:calc(50% + 83px) !important; right:max(10px,env(safe-area-inset-right)) !important; width:168px !important; min-width:168px !important; min-height:54px !important; padding:9px 13px 9px 9px !important; border-radius:18px !important; } .hx-language-launcher .language-switcher__mark { width:34px; height:34px; border-radius:12px; } .hx-language-launcher .language-switcher__globe { width:18px; height:18px; } .hx-language-launcher .language-switcher__current { font-size:12px; } .hx-language-dialog-backdrop { align-items:end; padding:8px; } .hx-language-dialog { width:100%; max-height:calc(100dvh - 16px); padding:20px 16px max(20px,env(safe-area-inset-bottom)); border-radius:20px; } .hx-language-dialog__list { grid-template-columns:1fr; } }
@media (prefers-reduced-motion:reduce) { .hx-language-launcher.language-switcher,.hx-language-dialog-backdrop,.hx-language-dialog,.hx-language-option,.hx-language-dialog__close { transition:none; } }
