/* ===== Chat de atendimento (fluxo guiado) ===== */
.fly-chat{position:fixed;right:48px;bottom:56px;z-index:9990;font-family:inherit}
.fly-chat *{box-sizing:border-box}

/* botão redondo com robozinho */
.fly-chat-abrir{position:relative;display:flex;align-items:center;justify-content:center;width:68px;height:68px;padding:0;border:3px solid #fff;border-radius:50%;background:linear-gradient(145deg,#F26A2E,#D94A12);cursor:pointer;box-shadow:0 8px 22px rgba(217,74,18,.55),0 2px 6px rgba(0,0,0,.25);transition:transform .2s,box-shadow .2s}
.fly-chat-abrir::before{content:"";position:absolute;inset:-9px;border-radius:50%;border:2px solid rgba(234,88,28,.55);animation:fly-chat-onda 2.6s ease-out infinite}
.fly-chat-abrir:hover,.fly-chat-abrir:focus-visible{transform:translateY(-3px) scale(1.06);box-shadow:0 12px 28px rgba(217,74,18,.65),0 3px 8px rgba(0,0,0,.3)}
.fly-chat.aberto .fly-chat-abrir{display:none}
.fly-robo{width:44px;height:44px;display:block}
.fly-robo-led{animation:fly-robo-led 2s ease-in-out infinite}
.fly-robo-olho{transform-box:fill-box;transform-origin:center;animation:fly-robo-piscar 5s infinite}

/* painel */
.fly-chat-painel{width:372px;max-width:calc(100vw - 40px);height:min(580px,calc(100vh - 40px));display:flex;flex-direction:column;background:#fff;border-radius:24px;overflow:hidden;box-shadow:0 24px 60px rgba(60,20,0,.38),0 4px 14px rgba(0,0,0,.18);transform-origin:bottom right;animation:fly-chat-abre .28s cubic-bezier(.2,.9,.3,1.1)}
.fly-chat-painel[hidden]{display:none}

/* cabeçalho */
.fly-chat-topo{position:relative;display:flex;align-items:center;gap:12px;padding:16px 18px;color:#fff;background:linear-gradient(135deg,#C94610 0%,#EA581C 55%,#F58A52 100%);overflow:hidden}
.fly-chat-topo::after{content:"";position:absolute;right:-30px;top:-40px;width:130px;height:130px;border-radius:50%;background:rgba(255,255,255,.12)}
.fly-chat-titulo{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.fly-chat-titulo strong{font-size:18px;line-height:1.1;letter-spacing:.2px}
.fly-chat-status{display:flex;align-items:center;gap:6px;font-size:12.5px;opacity:.92}
.fly-chat-ponto{width:8px;height:8px;border-radius:50%;background:#4ADE80;box-shadow:0 0 0 3px rgba(74,222,128,.3)}
.fly-chat-fechar{position:relative;z-index:1;width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.22) url("../imagens/icones/fechar.svg") center/14px no-repeat;cursor:pointer;transition:background-color .15s}
.fly-chat-fechar:hover{background-color:rgba(255,255,255,.38)}

/* avatar do robô */
.fly-chat-avatar{flex:none;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:linear-gradient(145deg,#F26A2E,#D94A12)}
.fly-chat-avatar .fly-robo{width:22px;height:22px}
.fly-chat-avatar.grande{position:relative;z-index:1;width:46px;height:46px;border:2px solid rgba(255,255,255,.85);box-shadow:0 3px 10px rgba(0,0,0,.25)}
.fly-chat-avatar.grande .fly-robo{width:32px;height:32px}

/* conversa */
.fly-chat-corpo{flex:1;overflow-y:auto;padding:18px 14px;display:flex;flex-direction:column;gap:12px;background:#FFF7F1 radial-gradient(rgba(234,88,28,.07) 1px,transparent 1.5px) 0 0/16px 16px;scrollbar-width:thin;scrollbar-color:#F3B590 transparent}
.fly-chat-linha{display:flex;align-items:flex-end;gap:8px;max-width:92%;animation:fly-chat-entra .3s ease-out}
.fly-chat-msg{margin:0;padding:10px 14px;font-size:14.5px;line-height:1.45;color:#2b2b2b;animation:fly-chat-entra .3s ease-out}
.fly-chat-msg.bot{background:#fff;border-radius:18px 18px 18px 5px;box-shadow:0 2px 8px rgba(90,40,10,.1)}
.fly-chat-linha .fly-chat-msg{animation:none}
.fly-chat-msg.eu{align-self:flex-end;max-width:82%;color:#fff;background:linear-gradient(135deg,#EA581C,#D94A12);border-radius:18px 18px 5px 18px;box-shadow:0 3px 10px rgba(217,74,18,.35)}

/* respostas rápidas: flutuam e mudam de cor ao passar o mouse */
.fly-chat-acoes{display:flex;flex-direction:column;gap:10px;padding:14px;background:#fff;border-top:1px solid #F3E4DA;box-shadow:0 -6px 16px rgba(90,40,10,.05)}
.fly-chat-opcao{position:relative;display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;text-align:left;text-decoration:none;border:1.5px solid #F3B590;border-radius:14px;padding:11px 14px;background:#FFF7F1;color:#B83E0B;font:inherit;font-weight:700;font-size:14.5px;cursor:pointer;box-shadow:0 1px 2px rgba(90,40,10,.08);animation:fly-chat-entra .28s ease-out both;transition:background-color .2s,color .2s,border-color .2s,transform .2s cubic-bezier(.2,.9,.3,1.3),box-shadow .2s}
.fly-chat-opcao::after{content:"›";font-size:22px;line-height:1;font-weight:400;transition:transform .2s}
.fly-chat-opcao:nth-child(2){animation-delay:.06s}.fly-chat-opcao:nth-child(3){animation-delay:.12s}
.fly-chat-opcao:hover,.fly-chat-opcao:focus-visible{background:linear-gradient(135deg,#F26A2E,#D94A12);border-color:#D94A12;color:#fff;transform:translateY(-4px) scale(1.02);box-shadow:0 10px 20px rgba(217,74,18,.42)}
.fly-chat-opcao:hover::after{transform:translateX(4px)}
.fly-chat-opcao:active{transform:translateY(-1px) scale(.99);box-shadow:0 4px 10px rgba(217,74,18,.35)}
.fly-chat-destaque{justify-content:center;gap:10px;padding:13px 14px;border-color:#1FAF54;background:#25D366;color:#fff;font-size:15px;box-shadow:0 5px 14px rgba(31,175,84,.4)}
.fly-chat-destaque::before{content:"";width:22px;height:22px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm5.2 14.1c-.2.6-1.3 1.2-1.8 1.2-.5.1-1 .2-3.3-.7-2.8-1.2-4.6-4-4.7-4.2-.1-.2-1.1-1.5-1.1-2.8 0-1.3.7-2 .9-2.2.2-.3.5-.3.7-.3h.5c.2 0 .4 0 .6.5l.8 2c.1.2.1.4 0 .5l-.3.5-.4.4c-.1.2-.3.3-.1.6.2.3.8 1.3 1.7 2.1 1.2 1 2.1 1.3 2.4 1.5.3.1.5.1.6-.1l.9-1c.2-.3.4-.2.6-.1l1.9.9c.3.1.5.2.5.3.1.2.1.8-.1 1.4z'/%3E%3C/svg%3E") center/contain no-repeat}
.fly-chat-destaque::after{content:none}
.fly-chat-destaque:hover,.fly-chat-destaque:focus-visible{background:#1A9F4C;border-color:#1A9F4C;box-shadow:0 12px 22px rgba(31,175,84,.5)}
.fly-chat-form{display:flex;gap:8px;animation:fly-chat-entra .28s ease-out}
.fly-chat-form input{flex:1;min-width:0;border:1.5px solid #E7D5C9;border-radius:14px;padding:12px 14px;background:#FFFBF8;font:inherit;font-size:15px;color:#2b2b2b;transition:border-color .15s,box-shadow .15s}
.fly-chat-form input:focus{outline:none;border-color:#EA581C;box-shadow:0 0 0 4px rgba(234,88,28,.16)}
.fly-chat-enviar{flex:none;width:46px;height:46px;font-size:0;border:0;border-radius:50%;background:#EA581C url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/22px no-repeat;cursor:pointer;box-shadow:0 4px 10px rgba(217,74,18,.4);transition:transform .15s,background-color .15s}
.fly-chat-enviar:hover{background-color:#D94A12;transform:translateY(-2px) scale(1.07)}

/* botão Voltar (corrigir uma resposta) */
.fly-chat-voltar{align-self:center;display:inline-flex;align-items:center;gap:4px;border:0;border-radius:999px;padding:6px 14px 6px 10px;background:transparent;color:#8a6a58;font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:background-color .2s,color .2s,transform .2s cubic-bezier(.2,.9,.3,1.3),box-shadow .2s}
.fly-chat-voltar::before{content:"\2039";font-size:20px;line-height:1;font-weight:400}
.fly-chat-voltar:hover,.fly-chat-voltar:focus-visible{background:#FFF1E8;color:#D94A12;transform:translateY(-3px);box-shadow:0 6px 12px rgba(217,74,18,.22)}

.fly-chat-abrir:focus-visible,.fly-chat-opcao:focus-visible,.fly-chat-voltar:focus-visible,.fly-chat-fechar:focus-visible,.fly-chat-enviar:focus-visible{outline:3px solid #fff;outline-offset:2px}

@keyframes fly-chat-abre{from{opacity:0;transform:translateY(14px) scale(.92)}to{opacity:1;transform:none}}
@keyframes fly-chat-entra{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes fly-chat-onda{0%{transform:scale(.85);opacity:.9}70%,100%{transform:scale(1.25);opacity:0}}
@keyframes fly-robo-led{0%,100%{opacity:1}50%{opacity:.35}}
@keyframes fly-robo-piscar{0%,92%,100%{transform:scaleY(1)}96%{transform:scaleY(.1)}}
@media (max-width:480px){
  .fly-chat{right:20px;bottom:40px}
  .fly-chat-abrir{width:60px;height:60px}.fly-chat-abrir .fly-robo{width:38px;height:38px}
  .fly-chat-painel{width:calc(100vw - 24px);height:min(78vh,560px);border-radius:20px}
}
@media (prefers-reduced-motion:reduce){
  .fly-chat-abrir::before,.fly-robo-led,.fly-robo-olho,.fly-chat-painel,.fly-chat-linha,.fly-chat-msg,.fly-chat-opcao,.fly-chat-form{animation:none}
  .fly-chat-abrir,.fly-chat-opcao,.fly-chat-enviar{transition:none}
  .fly-chat-opcao:hover,.fly-chat-opcao:focus-visible{transform:none}
}

/* robozinho em imagem */
.fly-robo{object-fit:contain;user-select:none;-webkit-user-drag:none}
.fly-chat-abrir{overflow:visible}
.fly-chat-abrir .fly-robo{width:62px;height:62px;margin-top:2px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.25))}
.fly-chat-avatar{overflow:hidden}
.fly-chat-avatar .fly-robo{width:100%;height:100%;margin:0}
.fly-chat-avatar.grande .fly-robo{width:100%;height:100%}
@media (max-width:480px){.fly-chat-abrir .fly-robo{width:54px;height:54px}}

/* O tema do site pinta botões de rosa no hover/foco: aqui forçamos as cores da Fly (alta especificidade) */
.fly-chat button.fly-chat-opcao,.fly-chat a.fly-chat-opcao{background-color:#FFF7F1;background-image:none;color:#B83E0B;border-color:#F3B590}
.fly-chat button.fly-chat-opcao:hover,.fly-chat button.fly-chat-opcao:focus,.fly-chat button.fly-chat-opcao:focus-visible,.fly-chat button.fly-chat-opcao:active{background-color:#EA581C;background-image:linear-gradient(135deg,#F7813F,#E0531A);color:#fff;border-color:#E0531A;transform:translateY(-4px) scale(1.02);box-shadow:0 10px 20px rgba(224,83,26,.45)}
.fly-chat a.fly-chat-destaque{background-color:#25D366;color:#fff;border-color:#1FAF54}
.fly-chat a.fly-chat-destaque:hover,.fly-chat a.fly-chat-destaque:focus{background-color:#1A9F4C;color:#fff;border-color:#1A9F4C;transform:translateY(-4px) scale(1.02);box-shadow:0 12px 22px rgba(31,175,84,.5)}
.fly-chat button.fly-chat-voltar{background-color:transparent;color:#8a6a58;border:0}
.fly-chat button.fly-chat-voltar:hover,.fly-chat button.fly-chat-voltar:focus{background-color:#FFF1E8;color:#D94A12}
.fly-chat button.fly-chat-enviar{background-color:#EA581C;border:0}
.fly-chat button.fly-chat-enviar:hover,.fly-chat button.fly-chat-enviar:focus{background-color:#D94A12}
.fly-chat button.fly-chat-fechar{background-color:rgba(255,255,255,.22);border:0}
.fly-chat button.fly-chat-fechar:hover,.fly-chat button.fly-chat-fechar:focus{background-color:rgba(255,255,255,.4)}
.fly-chat button.fly-chat-abrir,.fly-chat button.fly-chat-abrir:hover,.fly-chat button.fly-chat-abrir:focus{background-color:#E8541A;background-image:linear-gradient(145deg,#F26A2E,#D94A12);border-color:#fff}

/* "digitando…" */
.fly-chat-digitando.fly-chat-msg,.fly-chat-linha.fly-chat-digitando .fly-chat-msg{display:flex;align-items:center;gap:5px;padding:14px 16px}
.fly-chat-pingo{width:8px;height:8px;border-radius:50%;background:#EA581C;opacity:.35;animation:fly-chat-pingo 1.1s ease-in-out infinite}
.fly-chat-pingo:nth-child(2){animation-delay:.18s}.fly-chat-pingo:nth-child(3){animation-delay:.36s}
@keyframes fly-chat-pingo{0%,60%,100%{transform:translateY(0);opacity:.35}30%{transform:translateY(-5px);opacity:1}}
@media (prefers-reduced-motion:reduce){.fly-chat-pingo{animation:none;opacity:.7}}

.fly-chat-msg{white-space:pre-line;overflow-wrap:anywhere}

/* O chat assume o lugar do botão flutuante do WhatsApp (plugin Join.chat) */
.joinchat{display:none!important}

/* robozinho SVG: o bracinho levanta e acena de tempos em tempos para chamar a atencao */
.fly-robo-braco{transform-box:view-box;transform-origin:71px 64px}
.fly-chat-abrir .fly-robo-braco{animation:fly-robo-aceno 4.5s ease-in-out infinite}
.fly-chat-abrir .fly-robo{width:60px;height:60px;margin-top:0;filter:drop-shadow(0 2px 3px rgba(0,0,0,.25))}
@keyframes fly-robo-aceno{0%,30%,100%{transform:rotate(0)}4%{transform:rotate(-24deg)}8%{transform:rotate(8deg)}12%{transform:rotate(-24deg)}16%{transform:rotate(8deg)}20%{transform:rotate(-24deg)}24%{transform:rotate(0)}}
@media (prefers-reduced-motion:reduce){.fly-chat-abrir .fly-robo-braco{animation:none}}

/* ondas em volta do botao: mais fortes e visiveis em qualquer fundo (anel branco com borda laranja) */
.fly-chat-abrir::before,.fly-chat-abrir::after{content:"";position:absolute;inset:-4px;border-radius:50%;pointer-events:none;border:3px solid rgba(255,255,255,.95);box-shadow:0 0 0 2px rgba(217,74,18,.85),0 0 16px 3px rgba(217,74,18,.55);animation:fly-chat-onda 2.2s ease-out infinite}
.fly-chat-abrir::after{animation-delay:1.1s}
@keyframes fly-chat-onda{0%{transform:scale(1);opacity:.95}100%{transform:scale(1.75);opacity:0}}
@media (prefers-reduced-motion:reduce){.fly-chat-abrir::before,.fly-chat-abrir::after{animation:none;opacity:0}}

/* ondas: meio-termo (visiveis, sem exagero) */
.fly-chat-abrir::before,.fly-chat-abrir::after{inset:-3px;border:2px solid rgba(255,255,255,.8);box-shadow:0 0 0 1.5px rgba(217,74,18,.6),0 0 8px 1px rgba(217,74,18,.3);animation:fly-chat-onda-suave 3s ease-out infinite}
.fly-chat-abrir::after{animation-delay:1.5s}
@keyframes fly-chat-onda-suave{0%{transform:scale(1);opacity:.75}100%{transform:scale(1.5);opacity:0}}
@media (prefers-reduced-motion:reduce){.fly-chat-abrir::before,.fly-chat-abrir::after{animation:none;opacity:0}}
