/* AI live chat widget (inc/ai-chat.php, assets/js/ai-chat.js). Uses tokens.css. */
.bxc-fab { position: relative; width: 50px; height: 50px; border-radius: 50%; border: 0; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; background: var(--b-navy, #0f1f3d); box-shadow: 0 6px 18px rgba(15, 23, 42, .22); transition: transform .15s ease, box-shadow .15s ease; }
.bxc-fab:hover { transform: translateY(-2px); background: var(--b-navy, #0f1f3d); color: #fff; box-shadow: 0 10px 22px rgba(15, 23, 42, .28); }
.bxc-fab:focus-visible { outline: 3px solid #f2a62b; outline-offset: 2px; }
.bxc-fab.solo { position: fixed; right: 20px; bottom: 82px; z-index: 351; }
.bxc-fab .bc-float-tip { position: absolute; right: 60px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--b-ink, #0f172a); color: #fff; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: var(--b-r, 6px); opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.bxc-fab:hover .bc-float-tip { opacity: 1; }
.bxc-dot { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: #e5484d; border: 2px solid #fff; }
.bxc-dot[hidden] { display: none !important; }

.bxc { position: fixed; right: 20px; bottom: 20px; z-index: 100002; width: min(390px, calc(100vw - 24px)); height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column; background: #fff; color: var(--b-ink, #0f172a); border-radius: 14px; box-shadow: 0 18px 50px rgba(15, 23, 42, .28); overflow: hidden; font-size: 15px; line-height: 1.5; }
.bxc[hidden], .bxc [hidden] { display: none !important; }
.bxc *, .bxc *::before, .bxc *::after { box-sizing: border-box; }
.bxc-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 12px 16px; background: var(--b-navy, #0f1f3d); color: #fff; }
.bxc-head > div { flex: 1; min-width: 0; }
.bxc-head b { display: block; font-size: 16px; }
.bxc-head small { display: block; font-size: 12px; color: #c9d6ee; }
.bxc .bxc-person { font: inherit; font-size: 13px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); border-radius: var(--b-r, 6px); padding: 6px 10px; min-height: 36px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.bxc .bxc-person:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.bxc .bxc-x { width: 40px; height: 40px; border: 0; padding: 0; background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 50%; }
.bxc .bxc-x:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.bxc-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--b-grey-50, #f8fafc); overscroll-behavior: contain; }
.bxc-m { max-width: 85%; padding: 9px 12px; border-radius: 12px; word-wrap: break-word; overflow-wrap: anywhere; }
.bxc-m.ai, .bxc-m.staff { align-self: flex-start; background: #fff; border: 1px solid var(--b-grey-200, #e2e8f0); border-bottom-left-radius: 4px; }
.bxc-m.staff { border-color: #a7e3b9; background: #f0fbf3; }
.bxc-m.staff small { display: block; font-size: 12px; font-weight: 600; color: #067647; }
.bxc-m.user { align-self: flex-end; background: var(--b-blue, #0077ff); color: #fff; border-bottom-right-radius: 4px; }
.bxc-m.user a { color: #fff; }
.bxc-m.pending { opacity: .75; }
.bxc-m.err { border-color: #f3c3c0; background: #fef3f2; }
.bxc-m a { color: var(--b-blue, #0077ff); font-weight: 600; text-decoration: underline; }
.bxc-typing { display: flex; gap: 4px; padding: 13px 14px; }
.bxc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--b-grey-400, #94a3b8); animation: bxc-b 1s infinite ease-in-out; }
.bxc-typing i:nth-child(2) { animation-delay: .15s; } .bxc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bxc-b { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
.bxc-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.bxc .bxc-quick button { font: inherit; font-size: 14px; color: var(--b-blue, #0077ff); background: #fff; border: 1px solid var(--b-blue, #0077ff); border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 600; }
.bxc .bxc-quick button:hover { background: var(--b-blue-50, #eef5ff); color: var(--b-blue, #0077ff); }
.bxc-wa { padding: 12px 14px; background: #f0fbf3; border-top: 1px solid #a7e3b9; font-size: 14px; }
.bxc-wa p { margin: 0 0 8px; }
.bxc-wa div { display: flex; gap: 8px; flex-wrap: wrap; }
.bxc .bxc-btn { font: inherit; font-size: 14px; font-weight: 600; border-radius: var(--b-r, 6px); padding: 0 14px; height: 40px; display: inline-flex; align-items: center; cursor: pointer; text-decoration: none; border: 1px solid var(--b-blue, #0077ff); background: #fff; color: var(--b-blue, #0077ff); text-transform: none; }
.bxc .bxc-btn.wa { background: var(--b-whatsapp, #25d366); border-color: var(--b-whatsapp, #25d366); color: #fff; }
.bxc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--b-grey-200, #e2e8f0); background: #fff; }
.bxc .bxc-form textarea { flex: 1; font: inherit; font-size: 16px; color: inherit; resize: none; border: 1px solid var(--b-grey-200, #e2e8f0); border-radius: 10px; padding: 9px 12px; min-height: 44px; max-height: 120px; line-height: 1.4; background: #fff; margin: 0; box-shadow: none; }
.bxc .bxc-form textarea:focus { border-color: var(--b-blue, #0077ff); outline: none; box-shadow: 0 0 0 3px rgba(0, 119, 255, .15); }
.bxc .bxc-send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; padding: 0; background: var(--b-blue, #0077ff); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.bxc .bxc-send:hover { background: var(--b-navy, #0f1f3d); color: #fff; }
.bxc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.bxc-foot { margin: 0; padding: 0 12px 8px; font-size: 11px; color: var(--b-grey-500, #64748b); background: #fff; }

@media (max-width: 1024px) { .bxc-fab { width: 44px; height: 44px; } .bxc-fab.solo { right: 12px; bottom: 64px; } }
@media (max-width: 767px) {
	.bxc-fab.solo { bottom: 76px; }
	.single-product .bxc-fab.solo { bottom: 84px; }
	.bxc-fab .bc-float-tip { display: none; }
	.bxc { right: 0; bottom: 0; width: 100vw; height: 100%; height: 100dvh; border-radius: 0; }
	html.bxc-open, html.bxc-open body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .bxc-typing i { animation: none; } .bxc-fab { transition: none; } }

/* pre-chat steps: language, then name / mobile / email (2026-12-05) */
.bxc:lang(bn), .bxc :lang(bn), .bxc[lang=bn] button, .bxc[lang=bn] textarea, .bxc[lang=bn] input { font-family: "Noto Sans Bengali", var(--wd-text-font, sans-serif); }
.bxc-step { flex: 1; overflow-y: auto; padding: 20px 18px; background: var(--b-grey-50, #f8fafc); }
.bxc-hi { margin: 0 0 16px; font-size: 16px; font-weight: 600; line-height: 1.6; }
.bxc-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bxc .bxc-langs button { font-size: 17px; font-weight: 700; min-height: 56px; border-radius: 10px; border: 2px solid var(--b-blue, #0077ff); background: #fff; color: var(--b-blue, #0077ff); cursor: pointer; text-transform: none; letter-spacing: 0; }
.bxc .bxc-langs button[lang=bn] { font-family: "Noto Sans Bengali", var(--wd-text-font, sans-serif); }
.bxc .bxc-langs button:hover { background: var(--b-blue, #0077ff); color: #fff; }
.bxc-start p { margin: 0 0 12px; font-weight: 600; }
.bxc-start label { display: block; margin-bottom: 12px; }
.bxc-start label span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.bxc .bxc-start input { width: 100%; font: inherit; font-size: 16px; height: 46px; padding: 0 12px; border: 1px solid var(--b-grey-300, #cbd5e1); border-radius: 8px; background: #fff; color: inherit; margin: 0; box-shadow: none; }
.bxc .bxc-start input:focus { border-color: var(--b-blue, #0077ff); outline: none; box-shadow: 0 0 0 3px rgba(0, 119, 255, .15); }
.bxc-ferr { color: #b42318; font-size: 14px; font-weight: 400 !important; }
.bxc .bxc-btn.go { width: 100%; justify-content: center; height: 48px; background: var(--b-blue, #0077ff); color: #fff; font-size: 16px; }
.bxc .bxc-btn.go:disabled { opacity: .6; }
.bxc .bxc-back { display: block; margin: 12px auto 0; border: 0; background: none; color: var(--b-grey-600, #475569); font-size: 13px; cursor: pointer; text-decoration: underline; padding: 6px; }

/* theme button styles were overriding the chat button (square, blue, tiny icon) — lock it (2026-12-05) */
button.bxc-fab, .bc-float button.bxc-fab { width: 50px !important; height: 50px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 50% !important; background: var(--b-navy, #0f1f3d) !important; color: #fff !important; line-height: 1 !important; font-size: 0 !important; box-shadow: 0 6px 18px rgba(15, 23, 42, .22) !important; display: flex !important; align-items: center !important; justify-content: center !important; }
button.bxc-fab:hover { background: var(--b-blue, #0077ff) !important; }
button.bxc-fab > svg { width: 26px !important; height: 26px !important; flex: none; display: block; }
@media (max-width: 1024px) { button.bxc-fab, .bc-float button.bxc-fab { width: 44px !important; height: 44px !important; } button.bxc-fab > svg { width: 23px !important; height: 23px !important; } }

/* side message next to the chat button */
.bxc-nudge { position: fixed; z-index: 352; width: 250px; padding: 12px 34px 12px 14px; background: #fff; color: var(--b-ink, #0f172a); border: 1px solid var(--b-grey-200, #e2e8f0); border-radius: 12px; box-shadow: 0 10px 30px rgba(15, 23, 42, .16); cursor: pointer; font-size: 14px; line-height: 1.45; opacity: 0; transform: translateX(8px); transition: opacity .25s ease, transform .25s ease; }
.bxc-nudge.on { opacity: 1; transform: none; }
.bxc-nudge[hidden] { display: none !important; }
.bxc-nudge::after { content: ""; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: #fff; border-right: 1px solid var(--b-grey-200, #e2e8f0); border-top: 1px solid var(--b-grey-200, #e2e8f0); transform: rotate(45deg); }
.bxc-nudge b { display: block; font-size: 15px; margin-bottom: 2px; }
.bxc-nudge span { display: block; color: var(--b-grey-600, #475569); }
.bxc-nudge span[lang=bn] { font-family: "Noto Sans Bengali", var(--wd-text-font, sans-serif); margin-top: 2px; }
.bxc-nudge .bxc-nx { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: 0; padding: 0; background: none; color: var(--b-grey-500, #64748b); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 50%; }
.bxc-nudge .bxc-nx:hover { background: var(--b-grey-100, #f1f5f9); color: var(--b-ink, #0f172a); }
@media (max-width: 767px) { .bxc-nudge { width: 210px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .bxc-nudge { transition: none; } }

/* product cards under a reply (2026-12-05) */
.bxc-m.has-cards { max-width: 92%; }
.bxc-cards { display: grid; gap: 8px; margin-top: 10px; }
.bxc a.bxc-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--b-grey-200, #e2e8f0); border-radius: 10px; background: #fff; color: var(--b-ink, #0f172a); text-decoration: none; font-weight: 400; transition: border-color .15s ease, box-shadow .15s ease; }
.bxc a.bxc-card:hover { border-color: var(--b-blue, #0077ff); box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }
.bxc-card img { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; background: #fff; display: block; }
.bxc-cd { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bxc-cd b { font-size: 13px; line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bxc-cp { font-size: 14px; font-weight: 700; color: var(--b-ink, #0f172a); }
.bxc-cp s { font-size: 12px; font-weight: 400; color: var(--b-grey-500, #64748b); margin-left: 4px; }
.bxc-cs { font-size: 11px; font-weight: 600; align-self: flex-start; padding: 1px 6px; border-radius: 4px; }
.bxc-cs.in { background: #ecfdf3; color: #067647; }
.bxc-cs.pre { background: #fff7ed; color: #b54708; }
.bxc-cv { font-size: 13px; font-weight: 600; color: var(--b-blue, #0077ff); white-space: nowrap; padding-right: 2px; }

/* WhatsApp button under replies that mention WhatsApp / the sales number (2026-12-05) */
.bxc a.bxc-wabtn { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: var(--b-whatsapp, #25d366); color: #fff; text-decoration: none; font-weight: 400; box-shadow: 0 4px 12px rgba(37, 211, 102, .3); transition: transform .15s ease, box-shadow .15s ease; }
.bxc a.bxc-wabtn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 211, 102, .4); }
.bxc a.bxc-wabtn svg { width: 26px; height: 26px; flex: none; }
.bxc a.bxc-wabtn span { display: flex; flex-direction: column; line-height: 1.3; }
.bxc a.bxc-wabtn b { font-size: 15px; font-weight: 700; color: #fff; }
.bxc a.bxc-wabtn small { font-size: 12px; opacity: .92; color: #fff; }
.bxc a.bxc-wa-num { color: #128c4a; font-weight: 700; white-space: nowrap; }
