.afc{position:fixed;right:24px;bottom:24px;z-index:9999;font-family:"Poppins",system-ui,sans-serif;color:#fff;display:flex;flex-direction:column;align-items:flex-end;gap:14px}
.afc *{box-sizing:border-box}

.afc-bubble{width:60px;height:60px;border-radius:50%;border:0;background:#3DE89E;color:#141E30;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 10px 30px rgba(0,0,0,.4),0 0 0 6px rgba(61,232,158,.14);transition:transform .15s}
.afc-bubble:hover{transform:translateY(-2px)}
.afc-hint{position:absolute;right:74px;bottom:17px;white-space:nowrap;font-family:"JetBrains Mono",monospace;font-size:11px;letter-spacing:.08em;text-transform:uppercase;background:#1c2942;border:1px solid rgba(255,255,255,.12);padding:7px 12px;border-radius:999px;color:#b8c2cc}
.afc-panel{width:380px;height:580px;background:#1c2942;border:1px solid rgba(255,255,255,.12);border-radius:18px;box-shadow:0 24px 60px rgba(0,0,0,.5);display:flex;flex-direction:column;overflow:hidden}

.afc-head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;border-bottom:1px solid rgba(255,255,255,.1);background:#141E30}
.afc-avatar{width:36px;height:36px;border-radius:50%;background:#3DE89E;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.afc-id{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.afc-id strong{font-size:14px;font-weight:600;line-height:1.2}
.afc-id span{font-family:"JetBrains Mono",monospace;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#7a8693;display:flex;align-items:center;gap:6px}
.afc-live{width:6px;height:6px;border-radius:50%;background:#3DE89E;display:inline-block}
.afc-wa-mini{font-size:11px;font-weight:600;color:#3DE89E;border:1px solid rgba(61,232,158,.5);padding:6px 10px;border-radius:999px;text-decoration:none}
.afc-wa-mini:hover{background:rgba(61,232,158,.1);color:#3DE89E}
.afc-x{width:30px;height:30px;border-radius:50%;border:0;background:transparent;color:#b8c2cc;cursor:pointer;display:flex;align-items:center;justify-content:center}
.afc-x:hover{background:rgba(255,255,255,.08);color:#fff}
.afc-body{flex:1;overflow-y:auto;padding:18px 16px;display:flex;flex-direction:column;gap:12px}
.afc-msg{max-width:88%;display:flex;flex-direction:column;gap:10px}
.afc-msg p{margin:0;font-size:13.5px;line-height:1.55;padding:11px 14px;border-radius:14px;text-wrap:pretty;white-space:pre-wrap}
.afc-assistant{align-self:flex-start}
.afc-assistant p{background:rgba(255,255,255,.07);border-bottom-left-radius:4px;color:#e6eaee}
.afc-user{align-self:flex-end}
.afc-user p{background:#3DE89E;color:#0b2a1e;border-bottom-right-radius:4px;font-weight:500}
.afc-typing{flex-direction:row;gap:5px;padding:14px 16px;background:rgba(255,255,255,.07);border-radius:14px;border-bottom-left-radius:4px}
.afc-typing span{width:6px;height:6px;border-radius:50%;background:#b8c2cc;animation:afc-dot 1s infinite ease-in-out}
.afc-typing span:nth-child(2){animation-delay:.15s}.afc-typing span:nth-child(3){animation-delay:.3s}
@keyframes afc-dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.afc-sugg{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.afc-sugg button{font:inherit;font-size:12px;color:#3DE89E;background:transparent;border:1px solid rgba(61,232,158,.45);padding:7px 12px;border-radius:999px;cursor:pointer}
.afc-sugg button:hover{background:rgba(61,232,158,.1)}
.afc-wa-card{display:flex;flex-direction:column;gap:8px;padding:14px;border:1px solid #3DE89E;border-radius:12px;background:rgba(61,232,158,.07);text-decoration:none;color:#fff}
.afc-wa-card:hover{background:rgba(61,232,158,.13);color:#fff}
.afc-wa-label{font-family:"JetBrains Mono",monospace;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#3DE89E}
.afc-wa-text{font-size:12.5px;line-height:1.5;color:#b8c2cc;font-style:italic}
.afc-wa-cta{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;font-weight:600;color:#3DE89E}
.afc-input{display:flex;gap:8px;padding:12px;border-top:1px solid rgba(255,255,255,.1);background:#141E30}
.afc-input input{flex:1;min-width:0;font:inherit;font-size:13.5px;color:#fff;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:999px;padding:11px 16px;outline:none}
.afc-input input:focus{border-color:#3DE89E}
.afc-input input::placeholder{color:#7a8693}
.afc-input button{width:44px;height:44px;border-radius:50%;border:0;background:#3DE89E;color:#141E30;display:flex;align-items:center;justify-content:center;cursor:pointer;flex:0 0 auto}
.afc-input button:disabled{opacity:.35;cursor:default}
.afc-note{margin:0;padding:0 16px 12px;background:#141E30;font-size:10.5px;line-height:1.45;color:#7a8693}


.afc.is-open .afc-hint{display:none}
.afc-panel[hidden]{display:none}
.afc-panel{max-height:calc(100vh - 120px)}
@media(max-width:560px){
.afc{right:12px;bottom:12px;left:12px}
.afc-panel{width:100%;height:calc(100vh - 100px);max-height:640px}
.afc-hint{display:none}
}
@media(prefers-reduced-motion:reduce){.afc-typing span{animation:none}}
.afc-note a{color:#b8c2cc;text-decoration:underline}.afc-note a:hover{color:#3DE89E}

/* iPhone/Android: sotto i 16px il browser fa zoom sul campo. */
.afc-input input{font-size:16px}
.afc-input button{width:46px;height:46px}
.afc .afc-input button svg{width:26px!important;height:26px!important;min-width:26px;flex:0 0 26px;display:block}
.afc .afc-input button{padding:0!important;line-height:0}
.afc-avatar{background:#141E30!important;border:1px solid rgba(61,232,158,.45)}.afc-avatar img{width:16px;height:auto;display:block}
