/* BFD Chatbot — the chat window. Accent: --bfdc-accent (Chatbot → Appearance, else the site's primary colour). */
.bfdc{
  --bfdc-accent:#1b782a;
  --bfdc-ink:#14211a;--bfdc-muted:#66746b;--bfdc-line:#e3e9e4;--bfdc-bg:#f5f8f5;
  --bfdc-off-m:76px;--bfdc-off-d:24px;
  position:fixed;z-index:99990;bottom:var(--bfdc-off-d);right:24px;
  font-family:inherit;font-size:15px;line-height:1.55;color:var(--bfdc-ink);
  -webkit-font-smoothing:antialiased;
}
.bfdc--left{right:auto;left:24px}
.bfdc *,.bfdc *::before,.bfdc *::after{box-sizing:border-box}
.bfdc button{font-family:inherit;cursor:pointer}
.bfdc svg{display:block}
@media(max-width:859px){.bfdc{bottom:var(--bfdc-off-m);right:16px}.bfdc--left{left:16px;right:auto}}

/* An element marked hidden stays hidden whatever its display. */
.bfdc [hidden]{display:none!important}

/* ── launcher ── */
.bfdc-launch{
  position:relative;width:60px;height:60px;border-radius:50%;border:0;padding:0;
  background:var(--bfdc-accent);color:#fff;
  box-shadow:0 10px 28px rgba(0,0,0,.22),0 0 0 0 color-mix(in srgb,var(--bfdc-accent) 45%,transparent);
  display:flex;align-items:center;justify-content:center;
  transition:transform .25s cubic-bezier(.3,1.4,.5,1),box-shadow .25s;
  animation:bfdc-pulse 2.6s ease-out 1.2s 3;
}
.bfdc-launch:hover{transform:scale(1.06)}
.bfdc-launch:focus-visible{outline:3px solid color-mix(in srgb,var(--bfdc-accent) 40%,#fff);outline-offset:3px}
.bfdc-launch__i{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform .3s cubic-bezier(.3,1.4,.5,1),opacity .2s}
.bfdc-launch__i svg{width:28px;height:28px}
.bfdc-launch__x{opacity:0;transform:rotate(-90deg) scale(.6)}
.bfdc.is-open .bfdc-launch__chat{opacity:0;transform:rotate(90deg) scale(.6)}
.bfdc.is-open .bfdc-launch__x{opacity:1;transform:none}
.bfdc.is-open .bfdc-launch{animation:none}
.bfdc-dot{position:absolute;top:2px;right:2px;width:14px;height:14px;border-radius:50%;background:#ef4444;border:2px solid #fff}
@keyframes bfdc-pulse{0%{box-shadow:0 10px 28px rgba(0,0,0,.22),0 0 0 0 color-mix(in srgb,var(--bfdc-accent) 45%,transparent)}70%,100%{box-shadow:0 10px 28px rgba(0,0,0,.22),0 0 0 16px transparent}}

/* ── teaser ── */
.bfdc-teaser{
  position:absolute;bottom:74px;right:0;width:max-content;max-width:min(290px,calc(100vw - 32px));
  display:flex;align-items:center;gap:10px;padding:12px 34px 12px 12px;
  background:#fff;border-radius:16px 16px 4px 16px;box-shadow:0 14px 40px rgba(0,0,0,.16);border:1px solid var(--bfdc-line);
  cursor:pointer;opacity:0;transform:translateY(8px) scale(.97);transform-origin:bottom right;transition:opacity .25s,transform .25s;
}
.bfdc--left .bfdc-teaser{right:auto;left:0;border-radius:16px 16px 16px 4px;transform-origin:bottom left}
.bfdc-teaser.is-in{opacity:1;transform:none}
.bfdc-teaser__t{font-size:14.5px;font-weight:600;line-height:1.4}
.bfdc-teaser__av{width:36px;height:36px;border-radius:50%;overflow:hidden;flex:none;background:var(--bfdc-bg);display:flex;align-items:center;justify-content:center;color:var(--bfdc-accent)}
.bfdc-teaser__av img{width:100%;height:100%;object-fit:cover}
.bfdc-teaser__av svg{width:20px;height:20px}
.bfdc-teaser__x{position:absolute;top:6px;right:6px;width:22px;height:22px;border:0;border-radius:50%;background:var(--bfdc-bg);color:var(--bfdc-muted);padding:4px}
.bfdc-teaser__x svg{width:100%;height:100%}
.bfdc.is-open .bfdc-teaser{display:none}

/* ── panel ── */
.bfdc-panel{
  position:absolute;bottom:76px;right:0;width:380px;height:min(620px,calc(100vh - 120px));height:min(620px,calc(100dvh - 120px));
  display:flex;flex-direction:column;background:#fff;border-radius:22px;overflow:hidden;
  box-shadow:0 24px 70px rgba(0,0,0,.24),0 2px 6px rgba(0,0,0,.06);
  opacity:0;visibility:hidden;transform:translateY(14px) scale(.97);transform-origin:bottom right;
  transition:opacity .22s ease,transform .26s cubic-bezier(.2,1.1,.4,1),visibility 0s .26s;
}
.bfdc--left .bfdc-panel{right:auto;left:0;transform-origin:bottom left}
.bfdc.is-open .bfdc-panel{opacity:1;visibility:visible;transform:none;transition:opacity .22s ease,transform .26s cubic-bezier(.2,1.1,.4,1),visibility 0s}

.bfdc-head{
  display:flex;align-items:center;gap:12px;padding:16px 14px 16px 18px;color:#fff;
  background:linear-gradient(135deg,var(--bfdc-accent),color-mix(in srgb,var(--bfdc-accent) 70%,#000));
}
.bfdc-av{position:relative;width:44px;height:44px;border-radius:50%;background:#fff;flex:none;display:flex;align-items:center;justify-content:center;color:var(--bfdc-accent);box-shadow:0 0 0 3px rgba(255,255,255,.25)}
.bfdc-av img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.bfdc-av svg{width:24px;height:24px}
.bfdc-online{position:absolute;right:0;bottom:1px;width:12px;height:12px;border-radius:50%;background:#22c55e;border:2px solid #fff}
.bfdc-who{flex:1;min-width:0;line-height:1.3}
.bfdc-who b{display:block;font-size:16.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bfdc-who small{display:block;font-size:12.5px;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bfdc-hbtn{width:34px;height:34px;border-radius:10px;border:0;background:rgba(255,255,255,.12);color:#fff;padding:8px;flex:none;transition:background .15s}
.bfdc-hbtn:hover{background:rgba(255,255,255,.24)}
.bfdc-hbtn svg{width:100%;height:100%}

.bfdc-preview{background:#fff7e6;color:#8a5a00;font-size:12.5px;font-weight:600;text-align:center;padding:6px 10px;border-bottom:1px solid #f3e1b5}
.bfdc-acts{display:flex;gap:8px;padding:10px 14px;border-bottom:1px solid var(--bfdc-line);background:#fff}
.bfdc-act{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;padding:8px 10px;border-radius:12px;background:var(--bfdc-bg);color:var(--bfdc-ink)!important;text-decoration:none!important;font-size:14px;font-weight:600;border:1px solid var(--bfdc-line);transition:background .15s,border-color .15s}
.bfdc-act:hover{border-color:color-mix(in srgb,var(--bfdc-accent) 45%,#fff);background:#fff}
.bfdc-act svg{width:17px;height:17px;color:var(--bfdc-accent)}
.bfdc-act--wa svg{color:#1fa855}

.bfdc-log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:18px 14px 8px;background:var(--bfdc-bg);display:flex;flex-direction:column;gap:12px;scroll-behavior:smooth}
.bfdc-row{display:flex;gap:8px;align-items:flex-end;max-width:100%;animation:bfdc-in .25s ease both}
.bfdc-row--user{justify-content:flex-end}
@keyframes bfdc-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.bfdc-mav{width:28px;height:28px;border-radius:50%;background:#fff;flex:none;overflow:hidden;display:flex;align-items:center;justify-content:center;color:var(--bfdc-accent);border:1px solid var(--bfdc-line)}
.bfdc-mav img{width:100%;height:100%;object-fit:cover}
.bfdc-mav svg{width:16px;height:16px}
.bfdc-mwrap{display:flex;flex-direction:column;max-width:82%;min-width:0}
.bfdc-row--user .bfdc-mwrap{align-items:flex-end}
.bfdc-msg{padding:10px 14px;border-radius:18px;word-wrap:break-word;overflow-wrap:anywhere;font-size:15px}
.bfdc-row--bot .bfdc-msg{background:#fff;border:1px solid var(--bfdc-line);border-bottom-left-radius:6px;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.bfdc-row--user .bfdc-msg{background:var(--bfdc-accent);color:#fff;border-bottom-right-radius:6px}
.bfdc-msg p{margin:0}
.bfdc-msg p+p{margin-top:4px}
.bfdc-msg ul{margin:4px 0;padding-left:18px}
.bfdc-msg li{margin:2px 0}
.bfdc-msg strong{font-weight:700}
.bfdc-msg a{color:var(--bfdc-accent);font-weight:600;text-decoration:underline;text-underline-offset:2px;word-break:break-all}
.bfdc-row--user .bfdc-msg a{color:#fff}
.is-failed .bfdc-msg{background:#fff8f0;border-color:#f6dcc0}
.bfdc-time{font-size:11px;color:var(--bfdc-muted);margin:3px 6px 0}
.bfdc-inline{display:flex;gap:6px;margin-top:6px;flex-wrap:wrap}
.bfdc-inline a{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:999px;background:var(--bfdc-accent);color:#fff!important;text-decoration:none!important;font-size:13.5px;font-weight:600}
.bfdc-inline a.wa{background:#1fa855}
.bfdc-inline svg{width:15px;height:15px}

.bfdc-typing .bfdc-msg{display:flex;gap:4px;padding:14px 16px}
.bfdc-typing i{width:7px;height:7px;border-radius:50%;background:#9aa8a0;animation:bfdc-dot 1.2s infinite ease-in-out}
.bfdc-typing i:nth-child(2){animation-delay:.15s}
.bfdc-typing i:nth-child(3){animation-delay:.3s}
@keyframes bfdc-dot{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-5px);opacity:1}}

.bfdc-chips{display:flex;flex-wrap:wrap;gap:7px;padding:4px 14px 10px;background:var(--bfdc-bg)}
.bfdc-chips[hidden]{display:none}
.bfdc-chip{border:1px solid color-mix(in srgb,var(--bfdc-accent) 40%,#fff);background:#fff;color:var(--bfdc-accent);border-radius:999px;padding:7px 13px;font-size:13.5px;font-weight:600;line-height:1.3;transition:background .15s,color .15s;text-align:left}
.bfdc-chip:hover{background:var(--bfdc-accent);color:#fff}

.bfdc-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;border-top:1px solid var(--bfdc-line);background:#fff}
.bfdc-form textarea{flex:1;resize:none;border:1px solid var(--bfdc-line);border-radius:14px;padding:10px 14px;font:inherit;font-size:15px;line-height:1.45;max-height:120px;background:var(--bfdc-bg);color:var(--bfdc-ink);outline:none;box-shadow:none;margin:0;min-height:44px}
.bfdc-form textarea:focus{border-color:var(--bfdc-accent);background:#fff;box-shadow:0 0 0 3px color-mix(in srgb,var(--bfdc-accent) 15%,transparent)}
.bfdc-send{width:44px;height:44px;border-radius:14px;border:0;background:var(--bfdc-accent);color:#fff;padding:11px;flex:none;transition:transform .15s,opacity .15s}
.bfdc-send:hover:not(:disabled){transform:scale(1.05)}
.bfdc-send:disabled{opacity:.4;cursor:default}
.bfdc-send svg{width:100%;height:100%}
.bfdc-notice{margin:0;padding:0 14px 10px;background:#fff;font-size:11.5px;color:var(--bfdc-muted);text-align:center;line-height:1.4}

/* ── phones: a sheet over the page ── */
@media(max-width:520px){
  .bfdc-panel{position:fixed;inset:auto 0 0 0;width:100%;height:100%;height:100dvh;max-height:none;border-radius:0;transform:translateY(24px)}
  .bfdc.is-open .bfdc-launch,.bfdc.is-open .bfdc-teaser{display:none}
  .bfdc-head{padding-top:max(16px,env(safe-area-inset-top))}
  .bfdc-notice{padding-bottom:max(10px,env(safe-area-inset-bottom))}
  .bfdc-form textarea{font-size:16px} /* No zoom on focus in iOS. */
}
html.bfdc-lock,html.bfdc-lock body{overflow:hidden!important}
@media(prefers-reduced-motion:reduce){.bfdc *{animation:none!important;transition:none!important}}
@media print{.bfdc{display:none!important}}
