/* Actprovia Chat — cores por variáveis: --apc-a (principal), --apc-grad (principal ou degradê), --apc-on (texto sobre a principal).
   Tudo prefixado com #apvchat para vencer estilos globais de botão do tema (ex.: Hello Elementor). */
#apvchat,#apvchat *{box-sizing:border-box}
#apvchat{--apc-a:#25D366;--apc-grad:#25D366;--apc-on:#fff;
  --bg:#fff;--bg2:#f7f7f8;--head:#fff;--line:rgba(16,17,20,.1);--txt:#1d2127;--mut:#6b6f7a;--bot:#f1f2f4;--bot-line:rgba(16,17,20,.06);--chip:#fff;--field:#f5f6f7;--shadow:0 30px 80px -24px rgba(16,17,20,.35);
  position:fixed;bottom:calc(24px + env(safe-area-inset-bottom,0px));width:0;height:0;z-index:99990;
  font-family:inherit;font-size:15px;line-height:1.45;font-weight:400;color:var(--txt);-webkit-font-smoothing:antialiased}
#apvchat.apvchat--right{right:24px}
#apvchat.apvchat--left{left:24px}
#apvchat.apvchat--dark{--bg:#0f1014;--bg2:#17181d;--head:#15161b;--line:rgba(255,255,255,.09);--txt:#f4f4f6;--mut:#a1a3ad;--bot:rgba(255,255,255,.07);--bot-line:rgba(255,255,255,.09);--chip:rgba(255,255,255,.04);--field:rgba(255,255,255,.05);--shadow:0 40px 90px -24px rgba(0,0,0,.85)}
#apvchat button,#apvchat input{font:inherit;margin:0;text-transform:none;letter-spacing:normal;text-shadow:none;box-shadow:none;-webkit-appearance:none;appearance:none;min-height:0}
#apvchat button{color:inherit;cursor:pointer;line-height:1.2;-webkit-tap-highlight-color:transparent}
#apvchat a{text-decoration:none}
#apvchat svg{display:block}

/* botão flutuante */
#apvchat .apvchat__launcher{position:absolute;bottom:0;width:62px;height:62px;border-radius:50%;border:0;padding:0;background:var(--apc-grad);color:var(--apc-on);
  box-shadow:0 14px 36px -10px color-mix(in srgb,var(--apc-a) 70%,transparent),0 2px 0 rgba(255,255,255,.25) inset;display:grid;place-items:center;transition:transform .25s,box-shadow .25s}
#apvchat.apvchat--right .apvchat__launcher{right:0}
#apvchat.apvchat--left .apvchat__launcher{left:0}
#apvchat .apvchat__launcher:hover{transform:translateY(-3px) scale(1.03)}
#apvchat .apvchat__launcher::before{content:"";position:absolute;inset:0;border-radius:50%;background:var(--apc-grad);z-index:-1;animation:apvchatPulse 2.8s ease-out infinite}
#apvchat .apvchat__launcher .apvchat__i-chat,#apvchat .apvchat__launcher .apvchat__i-close{grid-area:1/1;transition:transform .3s,opacity .3s}
#apvchat .apvchat__launcher .apvchat__i-close{opacity:0;transform:rotate(-70deg) scale(.6)}
#apvchat[data-open] .apvchat__launcher .apvchat__i-chat{opacity:0;transform:rotate(70deg) scale(.6)}
#apvchat[data-open] .apvchat__launcher .apvchat__i-close{opacity:1;transform:none}
#apvchat[data-open] .apvchat__launcher::before{animation:none;opacity:0}
#apvchat .apvchat__badge{position:absolute;top:-2px;right:-2px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:#e5484d;color:#fff;font-size:12px;font-weight:600;line-height:18px;text-align:center;
  border:2px solid #fff;transform:scale(0);transition:transform .35s cubic-bezier(.34,1.56,.64,1)}
#apvchat .apvchat__badge[data-on]{transform:scale(1)}
#apvchat :focus-visible{outline:2px solid var(--apc-a);outline-offset:3px}

/* mensagens */
#apvchat .apvchat__msg{display:flex;flex-direction:column;max-width:86%;animation:apvchatIn .38s cubic-bezier(.2,.8,.2,1) both}
#apvchat .apvchat__msg--bot{align-self:flex-start;align-items:flex-start}
#apvchat .apvchat__msg--me{align-self:flex-end;align-items:flex-end}
#apvchat .apvchat__bubble{padding:11px 15px;border-radius:18px;overflow-wrap:anywhere;font-size:14.5px;line-height:1.5}
#apvchat .apvchat__msg--bot .apvchat__bubble{background:var(--bot);border:1px solid var(--bot-line);border-bottom-left-radius:6px;color:var(--txt)}
#apvchat .apvchat__msg--me .apvchat__bubble{background:var(--apc-grad);color:var(--apc-on);border-bottom-right-radius:6px}
#apvchat .apvchat__time{margin:4px 6px 0;font-size:11px;color:var(--mut)}
#apvchat .apvchat__typing{display:inline-flex;gap:5px;padding:14px 16px}
#apvchat .apvchat__typing i{width:7px;height:7px;border-radius:50%;background:var(--mut);opacity:.5;animation:apvchatDot 1.2s infinite ease-in-out}
#apvchat .apvchat__typing i:nth-child(2){animation-delay:.18s}
#apvchat .apvchat__typing i:nth-child(3){animation-delay:.36s}

/* prévia (puxa conversa) */
#apvchat .apvchat__teaser{position:absolute;bottom:78px;width:min(300px,calc(100vw - 32px));display:none;flex-direction:column;gap:6px;cursor:pointer}
#apvchat.apvchat--right .apvchat__teaser{right:0;align-items:flex-end}
#apvchat.apvchat--left .apvchat__teaser{left:0;align-items:flex-start}
#apvchat .apvchat__teaser[data-on]{display:flex}
#apvchat[data-open] .apvchat__teaser{display:none}
#apvchat .apvchat__tname{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--mut);padding:0 4px;align-self:flex-start}
#apvchat .apvchat__tbody{display:flex;flex-direction:column;gap:6px;align-items:flex-start;width:100%}
#apvchat .apvchat__teaser .apvchat__msg--bot .apvchat__bubble{background:var(--bg);box-shadow:0 18px 40px -14px rgba(16,17,20,.35)}
#apvchat.apvchat--dark .apvchat__teaser .apvchat__msg--bot .apvchat__bubble{background:#1b1c22;box-shadow:0 18px 40px -14px rgba(0,0,0,.75)}
#apvchat .apvchat__teaser .apvchat__tname{background:var(--bg);border-radius:999px;padding:4px 10px 4px 4px;box-shadow:0 6px 18px -8px rgba(16,17,20,.3)}
#apvchat.apvchat--dark .apvchat__teaser .apvchat__tname{background:#1b1c22}
#apvchat .apvchat__tclose{position:absolute;top:-10px;right:-6px;width:26px;height:26px;border-radius:50%;border:1px solid var(--line);background:var(--bg);color:var(--mut);display:grid;place-items:center;padding:0}
#apvchat .apvchat__tclose::after{content:"";position:absolute;inset:-9px}
#apvchat .apvchat__tclose:hover{color:var(--txt)}

/* painel */
#apvchat .apvchat__panel{position:absolute;bottom:78px;width:380px;height:min(590px,calc(100vh - 130px));height:min(590px,calc(100dvh - 130px));display:flex;flex-direction:column;overflow:hidden;
  border-radius:24px;background:var(--bg);border:1px solid var(--line);box-shadow:var(--shadow);
  visibility:hidden;opacity:0;transform:translateY(16px) scale(.97);pointer-events:none;transition:opacity .28s,transform .32s cubic-bezier(.2,.8,.2,1),visibility 0s .32s;outline:0}
#apvchat.apvchat--right .apvchat__panel{right:0;transform-origin:bottom right}
#apvchat.apvchat--left .apvchat__panel{left:0;transform-origin:bottom left}
#apvchat[data-open] .apvchat__panel{visibility:visible;opacity:1;transform:none;pointer-events:auto;transition:opacity .28s,transform .32s cubic-bezier(.2,.8,.2,1),visibility 0s}
#apvchat .apvchat__head{display:flex;align-items:center;gap:12px;padding:16px 14px 16px 16px;background:var(--apc-grad);color:var(--apc-on)}
#apvchat .apvchat__av{flex:0 0 auto;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.22);display:grid;place-items:center;overflow:hidden;font-weight:700;font-size:18px;color:var(--apc-on);box-shadow:0 0 0 2px rgba(255,255,255,.35)}
#apvchat .apvchat__av img{width:100%;height:100%;object-fit:cover}
#apvchat .apvchat__av--sm{width:22px;height:22px;font-size:11px;background:var(--apc-grad);box-shadow:none}
#apvchat .apvchat__ttl{flex:1;min-width:0}
#apvchat .apvchat__ttl strong{display:block;font-weight:700;font-size:15.5px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#apvchat .apvchat__ttl span{display:block;font-size:12.5px;opacity:.85}
#apvchat .apvchat__x{flex:0 0 auto;width:40px;height:40px;border-radius:50%;border:0;background:rgba(255,255,255,.18);color:var(--apc-on);display:grid;place-items:center;padding:0;transition:background .2s}
#apvchat .apvchat__x:hover{background:rgba(255,255,255,.3)}
#apvchat .apvchat__body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:18px 16px 8px;display:flex;flex-direction:column;gap:8px;background:var(--bg2);scrollbar-width:thin}
#apvchat .apvchat__chips{display:flex;flex-wrap:wrap;gap:8px;padding:8px 16px 12px;background:var(--bg2)}
#apvchat .apvchat__chips[hidden]{display:none}
#apvchat .apvchat__chip{padding:10px 15px;min-height:42px;border-radius:999px;border:1.5px solid color-mix(in srgb,var(--apc-a) 45%,transparent);background:var(--chip);color:var(--txt);font-size:13.5px;transition:border-color .2s,background .2s,transform .2s;animation:apvchatIn .4s both}
#apvchat .apvchat__chip:hover{border-color:var(--apc-a);background:color-mix(in srgb,var(--apc-a) 12%,transparent);transform:translateY(-1px)}
#apvchat .apvchat__cta{display:inline-flex;align-items:center;gap:10px;align-self:flex-start;margin-top:2px;padding:12px 20px;min-height:46px;border-radius:999px;background:#25D366;color:#fff;font-weight:600;font-size:14.5px;
  box-shadow:0 10px 26px -12px rgba(37,211,102,.8);transition:transform .2s,filter .2s;animation:apvchatIn .4s both}
#apvchat .apvchat__cta svg{width:20px;height:20px}
#apvchat .apvchat__cta:hover{transform:translateY(-2px);filter:brightness(1.05);color:#fff}
#apvchat .apvchat__form{display:flex;align-items:center;gap:8px;padding:12px 14px 6px;border-top:1px solid var(--line);background:var(--bg)}
#apvchat .apvchat__input{flex:1;min-width:0;height:46px;padding:0 18px;border-radius:999px;border:1px solid var(--line);background:var(--field);color:var(--txt);font-size:14.5px;outline:0}
#apvchat .apvchat__input::placeholder{color:var(--mut)}
#apvchat .apvchat__input:focus{border-color:var(--apc-a)}
#apvchat .apvchat__send{flex:0 0 auto;width:46px;height:46px;border-radius:50%;border:0;background:var(--apc-grad);color:var(--apc-on);display:grid;place-items:center;padding:0;transition:transform .2s,opacity .2s}
#apvchat .apvchat__send:hover{transform:scale(1.06)}
#apvchat .apvchat__send[disabled]{opacity:.45;cursor:default;transform:none}
#apvchat .apvchat__note{margin:0;padding:4px 16px 12px;text-align:center;font-size:11.5px;color:var(--mut);background:var(--bg)}

@keyframes apvchatPulse{0%{transform:scale(1);opacity:.5}70%,100%{transform:scale(1.7);opacity:0}}
@keyframes apvchatIn{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@keyframes apvchatDot{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-4px);opacity:1}}

@media(min-width:521px){#apvchat.apvchat--no-desktop{display:none}}
@media(max-width:520px){
  #apvchat.apvchat--no-mobile{display:none}
  #apvchat.apvchat--right{right:16px}#apvchat.apvchat--left{left:16px}
  #apvchat{bottom:calc(16px + env(safe-area-inset-bottom,0px))}
  #apvchat .apvchat__launcher{width:58px;height:58px}
  #apvchat .apvchat__teaser{bottom:72px}
  #apvchat .apvchat__panel{position:fixed;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom,0px));width:auto;height:min(78vh,640px);height:min(78dvh,640px);border-radius:22px}
  #apvchat[data-open] .apvchat__launcher{opacity:0;pointer-events:none;transform:scale(.6)}
  #apvchat .apvchat__input{font-size:16px}
}
@media(prefers-reduced-motion:reduce){#apvchat *,#apvchat *::before{animation:none!important;transition-duration:.01ms!important}}
@media print{#apvchat{display:none!important}}
