/* InkDot WhatsApp Chatbot */
.inkdot-chat{--ic-header:#0F0F10;--ic-accent:#F5B800;--ic-launcher:#25D366;--ic-bottom:20px;--ic-side:20px;
  position:fixed;bottom:calc(var(--ic-bottom) + env(safe-area-inset-bottom,0px));z-index:9990;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:15px;line-height:1.45;color:#18181b}
.inkdot-chat[data-pos="right"]{right:var(--ic-side)}
.inkdot-chat[data-pos="left"]{left:var(--ic-side)}
.inkdot-chat *,.inkdot-chat *::before,.inkdot-chat *::after{box-sizing:border-box}
.inkdot-chat button,.inkdot-chat input,.inkdot-chat textarea{font:inherit}
.inkdot-chat [hidden]{display:none!important}

/* who sees it */
@media(max-width:767px){.inkdot-chat[data-devices="desktop"]{display:none}}
@media(min-width:768px){.inkdot-chat[data-devices="mobile"]{display:none}}

/* chat button */
.ic-launcher{width:58px;height:58px;border:0;border-radius:50%;background:var(--ic-launcher);display:grid;place-items:center;cursor:pointer;
  box-shadow:0 10px 24px -6px rgba(0,0,0,.45);transition:transform .2s;position:relative}
.ic-launcher:hover{transform:scale(1.06)}
.ic-launcher:focus-visible,.ic-close:focus-visible,.ic-qbtn:focus-visible,.ic-send:focus-visible,.ic-link:focus-visible,.ic-tip-text:focus-visible,.ic-tip-close:focus-visible{outline:3px solid var(--ic-accent);outline-offset:2px}
.ic-launcher::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid var(--ic-launcher);opacity:0;animation:ic-pulse 2.8s ease-out infinite}
.is-open .ic-launcher::after{display:none}
@keyframes ic-pulse{0%{transform:scale(.9);opacity:.7}70%,100%{transform:scale(1.35);opacity:0}}

/* small message next to the button */
.ic-tip{position:absolute;bottom:68px;display:flex;align-items:center;gap:.25rem;background:#fff;border-radius:14px;padding:.35rem .35rem .35rem .85rem;
  box-shadow:0 12px 28px -10px rgba(0,0,0,.4);max-width:min(260px,calc(100vw - 40px));animation:ic-pop .35s ease}
.inkdot-chat[data-pos="right"] .ic-tip{right:0}
.inkdot-chat[data-pos="left"] .ic-tip{left:0}
.ic-tip-text{border:0;background:none;cursor:pointer;text-align:left;font-weight:600;color:#18181b;padding:.2rem 0}
.ic-tip-close{border:0;background:none;cursor:pointer;color:#71717a;font-size:20px;line-height:1;padding:.2rem .45rem;border-radius:50%}
@keyframes ic-pop{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}

/* window */
.ic-panel{position:absolute;bottom:72px;width:370px;max-width:calc(100vw - 24px);height:560px;max-height:calc(100vh - 120px);background:#fff;border-radius:20px;overflow:hidden;
  display:flex;flex-direction:column;box-shadow:0 30px 70px -20px rgba(0,0,0,.55);animation:ic-pop .25s ease}
.inkdot-chat[data-pos="right"] .ic-panel{right:0}
.inkdot-chat[data-pos="left"] .ic-panel{left:0}
.ic-head{display:flex;align-items:center;gap:.75rem;background:var(--ic-header);color:#fff;padding:.9rem 1rem}
.ic-avatar{flex:none;width:2.4rem;height:2.4rem;border-radius:50%;background:var(--ic-accent);color:#0F0F10;display:grid;place-items:center;font-weight:800}
.ic-who{flex:1;min-width:0;display:flex;flex-direction:column}
.ic-who strong{font-size:.98rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ic-who span{font-size:.76rem;opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ic-close{flex:none;border:0;background:rgba(255,255,255,.12);color:#fff;width:2rem;height:2rem;border-radius:50%;font-size:1.3rem;line-height:1;cursor:pointer}
.ic-close:hover{background:rgba(255,255,255,.25)}
.ic-offline{background:#fff7e0;color:#7a5b00;font-size:.8rem;padding:.55rem 1rem;border-bottom:1px solid #f1e3b5}
.ic-log{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.55rem;background:#f7f7f5;overscroll-behavior:contain}
.ic-msg{display:flex}
.ic-bot{justify-content:flex-start}
.ic-user{justify-content:flex-end}
.ic-bubble{max-width:84%;padding:.6rem .85rem;border-radius:16px;font-size:.92rem;overflow-wrap:anywhere;white-space:pre-wrap}
.ic-bot .ic-bubble{background:#fff;border:1px solid #ececea;border-bottom-left-radius:5px}
.ic-user .ic-bubble{background:var(--ic-accent);color:#0F0F10;border-bottom-right-radius:5px;font-weight:600}
.ic-typing{display:inline-flex;gap:4px;align-items:center;padding:.8rem .9rem}
.ic-typing i{width:6px;height:6px;border-radius:50%;background:#a1a1aa;animation:ic-dot 1s infinite ease-in-out}
.ic-typing i:nth-child(2){animation-delay:.15s}.ic-typing i:nth-child(3){animation-delay:.3s}
@keyframes ic-dot{0%,80%,100%{transform:translateY(0);opacity:.5}40%{transform:translateY(-4px);opacity:1}}

/* answer area */
.ic-foot{background:#fff;border-top:1px solid #ececea;padding:.7rem .8rem;min-height:3.4rem;max-height:46%;overflow-y:auto}
.ic-quick{display:flex;flex-wrap:wrap;gap:.45rem}
.ic-qbtn{display:inline-flex;align-items:center;border:1.5px solid #d4d4d8;background:#fff;color:#18181b;border-radius:9999px;padding:.5rem .95rem;font-size:.86rem;font-weight:600;cursor:pointer;text-decoration:none;transition:all .15s}
.ic-qbtn:hover{border-color:var(--ic-accent);background:#fffaf0}
.ic-primary{background:var(--ic-accent);border-color:var(--ic-accent);color:#0F0F10;font-weight:800}
.ic-primary:hover{filter:brightness(.95);background:var(--ic-accent)}
.ic-formrow{display:flex;gap:.5rem;align-items:flex-end}
.inkdot-chat .ic-input{flex:1;min-width:0;border:1.5px solid #d4d4d8;border-radius:14px;padding:.6rem .8rem;font-size:16px;background:#fff;color:#18181b;resize:none}
.inkdot-chat .ic-input:focus{outline:none;border-color:var(--ic-accent);box-shadow:0 0 0 3px rgba(245,184,0,.25)}
.inkdot-chat .ic-input[aria-invalid="true"]{border-color:#dc2626}
.ic-send{flex:none;border:0;border-radius:14px;background:var(--ic-header);color:#fff;font-weight:700;padding:.65rem 1rem;cursor:pointer}
.ic-error{color:#b91c1c;font-size:.78rem;min-height:1em;margin-top:.3rem}
.ic-tools{display:flex;justify-content:space-between;align-items:center;background:#fff;padding:.35rem .9rem .6rem;font-size:.78rem}
.ic-link{border:0;background:none;color:#52525b;text-decoration:underline;cursor:pointer;padding:.15rem 0;font-size:.78rem}
.ic-link:hover{color:#18181b}
.ic-skip{margin-top:.3rem}
.ic-privacy{display:inline-block;margin-top:.5rem}

/* no JavaScript */
.inkdot-chat-noscript{position:fixed;right:20px;bottom:20px;z-index:9990;background:#25D366;color:#fff;font:600 14px/1 system-ui,sans-serif;padding:.9rem 1.1rem;border-radius:9999px;text-decoration:none;box-shadow:0 10px 24px -6px rgba(0,0,0,.45)}

/* phones: wider window, and keep clear of the theme's "Get a Free Plan" button */
@media(max-width:480px){
  .inkdot-chat{--ic-side:12px}
  .ic-panel{width:calc(100vw - 24px);height:min(560px,calc(100vh - 100px))}
}
@media(max-width:1023px){
  body:has(.sv-sticky) .inkdot-chat{bottom:calc(var(--ic-bottom) + 64px + env(safe-area-inset-bottom,0px))}
}

@media(prefers-reduced-motion:reduce){
  .ic-launcher::after{animation:none;display:none}
  .ic-panel,.ic-tip{animation:none}
  .ic-typing i{animation:none}
  .ic-launcher,.ic-qbtn{transition:none}
}
