/* Story Core chat widget */
.bdcs-chat{--chat:var(--sb-ink);--chat-ink:var(--sb-porcelain);--c-bg:var(--sb-porcelain);--c-card:var(--sb-card);--c-text:var(--sb-ink);--c-muted:var(--sb-taupe-deep);--c-line:var(--sb-line);--c-accent:var(--sb-copper);--c-blush:var(--sb-blush);position:fixed;bottom:22px;z-index:99990;font:calc(15px*var(--sb-fs,1))/1.5 var(--sb-body,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans Bengali","Kohinoor Bangla",sans-serif);color:var(--c-text);-webkit-font-smoothing:antialiased}
.bdcs-chat-right{right:22px}.bdcs-chat-left{left:22px}
.bdcs-chat *{box-sizing:border-box}
.bdcs-chat [hidden]{display:none!important}
.bdcs-chat button{font:inherit;margin:0}

/* launcher */
.bdcs-chat-btn{position:relative;width:60px;height:60px;border-radius:50%;border:0;padding:0;cursor:pointer;background:var(--chat);color:var(--chat-ink);box-shadow:0 10px 30px -6px color-mix(in srgb,var(--chat) 60%,transparent),0 4px 12px rgba(17,24,39,.18);display:grid;place-items:center;transition:transform .2s ease,box-shadow .2s ease}
.bdcs-chat-btn:hover{transform:translateY(-2px) scale(1.04)}
.bdcs-chat-btn:focus-visible{outline:3px solid color-mix(in srgb,var(--chat) 45%,#fff);outline-offset:3px}
.bdcs-chat-btn span{grid-area:1/1;display:grid;place-items:center;transition:transform .25s ease,opacity .2s ease}
.bdcs-chat-btn svg{width:28px;height:28px}
.bdcs-chat-btn .i-x{opacity:0;transform:rotate(-90deg) scale(.6)}
.bdcs-chat.is-open .bdcs-chat-btn .i-chat{opacity:0;transform:rotate(90deg) scale(.6)}
.bdcs-chat.is-open .bdcs-chat-btn .i-x{opacity:1;transform:none}
.bdcs-chat-btn .i-x svg{width:24px;height:24px}
.bdcs-chat-badge{position:absolute;top:-3px;right:-3px;min-width:22px;height:22px;padding:0 calc(6px*var(--sb-sp,1));border-radius:calc(var(--sb-radius,14px)*0.786);background:var(--c-accent);color:var(--sb-on-copper,#fff);font-size:calc(12px*var(--sb-fs,1));font-weight:700;line-height:22px;text-align:center;border:2px solid #fff;animation:bdcs-pop .3s ease}

/* teaser bubble */
.bdcs-chat-teaser{position:absolute;bottom:74px;width:max-content;max-width:260px;background:var(--c-card);border-radius:calc(var(--sb-radius,14px)*1.143);box-shadow:0 12px 32px rgba(17,24,39,.16);padding:calc(12px*var(--sb-sp,1)) calc(34px*var(--sb-sp,1)) calc(12px*var(--sb-sp,1)) calc(14px*var(--sb-sp,1));animation:bdcs-up .3s ease}
.bdcs-chat-right .bdcs-chat-teaser{right:0}.bdcs-chat-left .bdcs-chat-teaser{left:0}
.bdcs-chat-teaser-txt{all:unset;cursor:pointer;display:block;font-size:calc(14px*var(--sb-fs,1));color:var(--c-text);line-height:1.4}
.bdcs-chat-teaser-x{position:absolute;top:6px;right:6px;width:22px;height:22px;border:0;border-radius:50%;background:transparent;color:var(--c-muted);cursor:pointer;display:grid;place-items:center;padding:0}
.bdcs-chat-teaser-x svg{width:13px;height:13px}
.bdcs-chat-teaser-x:hover{background:var(--c-bg)}

/* panel */
.bdcs-chat-panel{position:absolute;bottom:76px;width:380px;height:620px;max-height:calc(100vh - 120px);background:var(--c-bg);border-radius:calc(var(--sb-radius,14px)*1.571);box-shadow:0 24px 60px -12px rgba(17,24,39,.35),0 0 0 1px rgba(17,24,39,.05);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:bdcs-open .22s cubic-bezier(.2,.8,.3,1)}
.bdcs-chat-left .bdcs-chat-panel{left:0;transform-origin:bottom left}.bdcs-chat-right .bdcs-chat-panel{right:0}
.bdcs-chat-head{position:relative;display:flex;align-items:center;gap:calc(12px*var(--sb-sp,1));padding:calc(18px*var(--sb-sp,1)) calc(16px*var(--sb-sp,1)) calc(18px*var(--sb-sp,1)) calc(18px*var(--sb-sp,1));background:radial-gradient(120% 160% at 100% 0%,color-mix(in srgb,var(--c-accent) 45%,transparent),transparent 55%),var(--chat);color:var(--chat-ink)}
.bdcs-chat-head::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:linear-gradient(90deg,transparent,var(--c-accent),transparent)}
.bdcs-chat-team{display:flex;flex:none}
.bdcs-chat-team .bdcs-cav{width:38px;height:38px;font-size:calc(14px*var(--sb-fs,1));border:2px solid color-mix(in srgb,var(--chat) 80%,#000)}
.bdcs-chat-team .bdcs-cav+.bdcs-cav{margin-left:calc(-12px*var(--sb-sp,1))}
.bdcs-chat-ttl{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.bdcs-chat-ttl strong{font-family:var(--sb-head,inherit);font-size:calc(22px*var(--sb-fs,1));font-weight:600;letter-spacing:.005em;line-height:1.1}
.bdcs-chat-status{display:flex;align-items:center;gap:calc(6px*var(--sb-sp,1));font-size:calc(13px*var(--sb-fs,1));opacity:.9}
.bdcs-chat-dot{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.55);flex:none}
.bdcs-chat.is-online .bdcs-chat-dot{background:color-mix(in srgb,var(--sb-sage) 70%,#fff);box-shadow:0 0 0 3px color-mix(in srgb,var(--sb-sage) 25%,transparent)}
.bdcs-chat-min{width:34px;height:34px;border:0;border-radius:calc(var(--sb-radius,14px)*0.714);background:rgba(255,255,255,.14);color:inherit;cursor:pointer;display:grid;place-items:center;padding:0;flex:none}
.bdcs-chat-min:hover{background:rgba(255,255,255,.24)}
.bdcs-chat-min svg{width:20px;height:20px}

/* messages */
.bdcs-chat-body{flex:1;overflow-y:auto;padding:calc(16px*var(--sb-sp,1)) calc(14px*var(--sb-sp,1)) calc(8px*var(--sb-sp,1));scroll-behavior:smooth;overscroll-behavior:contain}
.bdcs-chat-msgs{display:flex;flex-direction:column;gap:2px}
.bdcs-chat-day{align-self:center;margin:calc(12px*var(--sb-sp,1)) 0 calc(8px*var(--sb-sp,1));padding:calc(3px*var(--sb-sp,1)) calc(10px*var(--sb-sp,1));border-radius:var(--sb-pill,999px);background:rgba(17,24,39,.06);color:var(--c-muted);font-size:calc(12px*var(--sb-fs,1));font-weight:600}
.bdcs-chat-row{display:flex;align-items:flex-end;gap:calc(8px*var(--sb-sp,1));margin-top:calc(10px*var(--sb-sp,1));animation:bdcs-up .18s ease}
.bdcs-chat-row.cont{margin-top:calc(3px*var(--sb-sp,1))}
.bdcs-chat-row.me{justify-content:flex-end}
.bdcs-chat-col{display:flex;flex-direction:column;max-width:78%;min-width:0}
.bdcs-chat-row.me .bdcs-chat-col{align-items:flex-end}
.bdcs-chat-name{font-size:calc(12px*var(--sb-fs,1));color:var(--c-muted);font-weight:600;margin:0 0 calc(3px*var(--sb-sp,1)) calc(4px*var(--sb-sp,1))}
.bdcs-chat-bub{padding:calc(9px*var(--sb-sp,1)) calc(13px*var(--sb-sp,1)) calc(7px*var(--sb-sp,1));border-radius:calc(var(--sb-radius,14px)*1.286);background:var(--c-card);color:var(--c-text);box-shadow:0 1px 2px rgba(17,24,39,.06);white-space:pre-wrap;overflow-wrap:anywhere;border-bottom-left-radius:calc(var(--sb-radius,14px)*0.429)}
.bdcs-chat-row.cont.them .bdcs-chat-bub{border-top-left-radius:calc(var(--sb-radius,14px)*0.429)}
.bdcs-chat-row.me .bdcs-chat-bub{background:var(--chat);color:var(--chat-ink);border-bottom-left-radius:calc(var(--sb-radius,14px)*1.286);border-bottom-right-radius:calc(var(--sb-radius,14px)*0.429)}
.bdcs-chat-row.cont.me .bdcs-chat-bub{border-top-right-radius:calc(var(--sb-radius,14px)*0.429)}
.bdcs-chat-bub a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.bdcs-chat-bub time{display:block;margin-top:2px;font-size:calc(11px*var(--sb-fs,1));opacity:.6;text-align:right}
.bdcs-chat-seen{font-size:calc(11px*var(--sb-fs,1));color:var(--c-muted);margin:calc(3px*var(--sb-sp,1)) calc(4px*var(--sb-sp,1)) 0}
.bdcs-cav,.bdcs-cav-slot{width:28px;height:28px;flex:none}
.bdcs-cav{border-radius:50%;display:grid;place-items:center;overflow:hidden;color:#fff;font-size:calc(11px*var(--sb-fs,1));font-weight:700;letter-spacing:.02em}
.bdcs-cav img{width:100%;height:100%;object-fit:cover;display:block}
.bdcs-chat-typing .bdcs-chat-bub{display:flex;gap:calc(4px*var(--sb-sp,1));padding:calc(13px*var(--sb-sp,1)) calc(14px*var(--sb-sp,1))}
.bdcs-chat-typing i{width:7px;height:7px;border-radius:50%;background:var(--c-muted);opacity:.5;animation:bdcs-dot 1.2s infinite}
.bdcs-chat-typing i:nth-child(2){animation-delay:.15s}.bdcs-chat-typing i:nth-child(3){animation-delay:.3s}

/* pre-chat card */
.bdcs-chat-start{margin:calc(14px*var(--sb-sp,1)) 0 calc(6px*var(--sb-sp,1));padding:calc(16px*var(--sb-sp,1));border-radius:calc(var(--sb-radius,14px)*1.143);background:var(--c-card);box-shadow:0 1px 3px rgba(17,24,39,.08);display:flex;flex-direction:column;gap:calc(9px*var(--sb-sp,1))}
.bdcs-chat-start strong{font-family:var(--sb-head,inherit);font-size:calc(19px*var(--sb-fs,1));font-weight:600}
.bdcs-chat-start p{margin:calc(-4px*var(--sb-sp,1)) 0 calc(4px*var(--sb-sp,1));font-size:calc(13px*var(--sb-fs,1));color:var(--c-muted)}
.bdcs-chat input,.bdcs-chat textarea{width:100%;margin:0;padding:calc(11px*var(--sb-sp,1)) calc(13px*var(--sb-sp,1));border:1px solid var(--c-line);border-radius:calc(var(--sb-radius,14px)*0.857);background:var(--c-card,var(--sb-card));color:var(--c-text);font:inherit;font-size:calc(15px*var(--sb-fs,1));box-shadow:none;outline:0;transition:border-color .15s,box-shadow .15s}
.bdcs-chat input:focus,.bdcs-chat textarea:focus{border-color:var(--c-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--sb-copper) 20%,transparent)}
.bdcs-chat-go{border:0;border-radius:var(--sb-pill,999px);padding:calc(12px*var(--sb-sp,1));background:var(--chat);color:var(--chat-ink);font-weight:500;letter-spacing:.05em;cursor:pointer;transition:background .2s}
.bdcs-chat-go:hover{background:var(--c-accent);color:var(--sb-on-copper,#fff)}

/* composer */
.bdcs-chat-err{color:var(--sb-brick);font-size:calc(13px*var(--sb-fs,1));padding:0 calc(16px*var(--sb-sp,1))}
.bdcs-chat-err:not(:empty){padding:calc(6px*var(--sb-sp,1)) calc(16px*var(--sb-sp,1))}
.bdcs-chat-form{display:flex;align-items:flex-end;gap:calc(8px*var(--sb-sp,1));margin:0;padding:calc(10px*var(--sb-sp,1)) calc(12px*var(--sb-sp,1));background:var(--c-card);border-top:1px solid var(--c-line)}
.bdcs-chat .bdcs-chat-form textarea{resize:none;height:44px;min-height:44px!important;max-height:120px;border-radius:calc(var(--sb-radius,14px)*1.571);padding:calc(11px*var(--sb-sp,1)) calc(16px*var(--sb-sp,1));background:var(--c-bg);border-color:transparent;line-height:1.4}
.bdcs-chat-send{width:44px;height:44px;flex:none;border:0;border-radius:50%;padding:0;background:var(--c-line);color:var(--c-muted);cursor:pointer;display:grid;place-items:center;transition:background .15s,color .15s,transform .15s}
.bdcs-chat-send.ready{background:var(--chat);color:var(--chat-ink)}
.bdcs-chat-send.ready:hover{transform:scale(1.06);background:var(--c-accent);color:var(--sb-on-copper,#fff)}
.bdcs-chat-send:disabled{opacity:.6}
.bdcs-chat-send svg{width:20px;height:20px;margin-left:2px}
.bdcs-chat-foot{padding:0 calc(16px*var(--sb-sp,1)) calc(10px*var(--sb-sp,1));background:var(--c-card);color:var(--c-muted);font-size:calc(12px*var(--sb-fs,1));text-align:center}

@keyframes bdcs-open{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}
@keyframes bdcs-up{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes bdcs-pop{from{transform:scale(.4)}to{transform:scale(1)}}
@keyframes bdcs-dot{0%,60%,100%{transform:none;opacity:.45}30%{transform:translateY(-4px);opacity:.9}}
@media(prefers-reduced-motion:reduce){.bdcs-chat *{animation:none!important;transition:none!important}}
@media(max-width:520px){
	.bdcs-chat{bottom:16px}.bdcs-chat-right{right:16px}.bdcs-chat-left{left:16px}
	.bdcs-chat-panel{position:fixed;inset:0;width:auto;height:auto;max-height:none;border-radius:0}
	.bdcs-chat.is-open .bdcs-chat-btn,.bdcs-chat.is-open .bdcs-chat-teaser{display:none}
	.bdcs-chat-head{padding-top:max(calc(18px*var(--sb-sp,1)),env(safe-area-inset-top))}
	.bdcs-chat-foot{padding-bottom:max(calc(10px*var(--sb-sp,1)),env(safe-area-inset-bottom))}
}

/* above the theme's mobile bottom navigation */
@media(max-width:1024px){.bdcs-chat{bottom:calc(16px + var(--bdcs-bottom-nav,0px))!important}}
/* quick menu: Chat · Call · WhatsApp */
.bdcs-chat-sheet{position:absolute;bottom:74px;display:flex;flex-direction:column;gap:calc(10px*var(--sb-sp,1));align-items:flex-end;animation:bdcs-up .2s ease}
.bdcs-chat-left .bdcs-chat-sheet{align-items:flex-start;left:0}
.bdcs-chat-right .bdcs-chat-sheet{right:0}
.bdcs-chat-sheet[hidden]{display:none}
.bdcs-chat-opt{display:inline-flex;align-items:center;gap:calc(10px*var(--sb-sp,1));min-height:48px;padding:calc(6px*var(--sb-sp,1)) calc(18px*var(--sb-sp,1)) calc(6px*var(--sb-sp,1)) calc(6px*var(--sb-sp,1));border:0;border-radius:var(--sb-pill,999px);background:var(--c-card);color:var(--c-text)!important;font:600 calc(15px*var(--sb-fs,1))/1 inherit;text-decoration:none!important;white-space:nowrap;box-shadow:0 12px 30px -10px rgba(17,24,39,.35);cursor:pointer}
.bdcs-chat-opt-i{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;flex:none;color:#fff}
.bdcs-chat-opt-i svg{width:19px;height:19px}
.bdcs-chat-opt.is-chat .bdcs-chat-opt-i{background:var(--chat)}
.bdcs-chat-opt.is-call .bdcs-chat-opt-i{background:var(--c-accent)}
.bdcs-chat-opt.is-wa .bdcs-chat-opt-i{background:#1DA851}
.bdcs-chat.sheet-open .bdcs-chat-btn .i-chat{opacity:0;transform:rotate(90deg) scale(.6)}.bdcs-chat.sheet-open .bdcs-chat-btn .i-x{opacity:1;transform:none}
/* desktop: no "Call us" (it only makes sense on a phone); hide the launcher if Call was the only option */
@media(min-width:1025px){.bdcs-chat-opt.is-call{display:none!important}.bdcs-chat.no-desktop{display:none!important}}
