/* ══════ Estilo del asistente ApexVisionShop ══════ */
#apbot{position:fixed;right:18px;bottom:18px;z-index:150;font-family:-apple-system,'Segoe UI',Roboto,sans-serif}

/* botón flotante con el logo */
#apbot-btn{position:relative;width:62px;height:62px;border-radius:50%;border:2px solid #E8C46A;padding:0;
  background:#0A1220;cursor:pointer;box-shadow:0 10px 28px rgba(10,18,32,.45),0 0 0 6px rgba(232,196,106,.10);
  transition:transform .22s cubic-bezier(.2,.7,.2,1),box-shadow .28s;animation:apbFloat 5.5s ease-in-out infinite}
#apbot-btn:hover{transform:translateY(-3px) scale(1.05);box-shadow:0 16px 34px rgba(10,18,32,.55),0 0 0 10px rgba(232,196,106,.16)}
#apbot-btn img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block;background:#0A1220}
#apbot-btn .pt{position:absolute;right:1px;top:1px;width:13px;height:13px;border-radius:50%;
  background:#12A150;border:2px solid #0A1220;animation:apbDot 2.2s ease-in-out infinite}
@keyframes apbFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes apbDot{0%,100%{box-shadow:0 0 0 0 rgba(18,161,80,.55)}50%{box-shadow:0 0 0 6px rgba(18,161,80,0)}}

/* panel del chat */
#apbot-panel{position:absolute;right:0;bottom:76px;width:min(92vw,352px);height:min(74vh,520px);
  background:#0E1626;border:1px solid #1E2C44;border-radius:18px;overflow:hidden;display:none;
  flex-direction:column;box-shadow:0 26px 60px rgba(0,0,0,.55)}
#apbot.abierto #apbot-panel{display:flex;animation:apbIn .28s cubic-bezier(.2,.7,.2,1)}
@keyframes apbIn{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}

#apbot-panel header{display:flex;align-items:center;gap:9px;padding:10px 11px;background:#0A1220;
  border-bottom:1px solid #1E2C44;position:relative}
#apbot-panel header:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(232,196,106,.5),transparent)}
#apbot-panel .ava{width:32px;height:32px;border-radius:50%;border:1.5px solid #E8C46A;object-fit:cover;flex:none}
#apbot-panel .tt{display:flex;flex-direction:column;min-width:0;flex:1}
#apbot-panel .tt b{color:#fff;font-size:12.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#apbot-panel .tt .st{color:#12A150;font-size:10px;font-weight:600;display:flex;align-items:center;gap:4px}
#apbot-panel .tt .st:before{content:"";width:6px;height:6px;border-radius:50%;background:#12A150}

/* banderas de idioma */
#apbot-flags{display:flex;gap:2px;flex:none}
#apbot-flags button{background:none;border:1px solid transparent;border-radius:7px;font-size:15px;
  padding:3px 4px;cursor:pointer;opacity:.5;transition:.2s;line-height:1}
#apbot-flags button:hover{opacity:.9}
#apbot-flags button.on{opacity:1;border-color:rgba(232,196,106,.6);background:rgba(232,196,106,.12)}
#apbot-x{background:none;border:0;color:#8FA3BD;font-size:14px;cursor:pointer;padding:4px 6px;flex:none}
#apbot-x:hover{color:#fff}

/* mensajes */
#apbot-msgs{flex:1;overflow-y:auto;padding:14px 12px;display:flex;flex-direction:column;gap:9px}
#apbot-msgs::-webkit-scrollbar{width:5px}
#apbot-msgs::-webkit-scrollbar-thumb{background:#22334F;border-radius:5px}
#apbot-msgs .m{max-width:84%;padding:9px 12px;border-radius:14px;font-size:13.5px;line-height:1.5;
  white-space:pre-wrap;word-wrap:break-word;animation:apbMsg .25s ease}
@keyframes apbMsg{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
#apbot-msgs .bot{background:#16233A;color:#E4ECF7;border:1px solid #1E2C44;border-bottom-left-radius:5px;align-self:flex-start}
#apbot-msgs .yo{background:linear-gradient(92deg,#FFB020,#FF8A00);color:#2A1B00;font-weight:600;
  border-bottom-right-radius:5px;align-self:flex-end}

/* sugerencias */
#apbot-chips{display:flex;gap:6px;padding:0 12px 8px;flex-wrap:wrap}
#apbot-chips button{background:#16233A;border:1px solid #22334F;color:#C9D6E8;font-size:11.5px;
  padding:6px 10px;border-radius:999px;cursor:pointer;transition:.2s}
#apbot-chips button:hover{border-color:#E8C46A;color:#FFD79A}

/* entrada */
#apbot-form{display:flex;gap:7px;padding:9px 11px;border-top:1px solid #1E2C44;background:#0B1322}
#apbot-in{flex:1;background:#111C2E;border:1px solid #22334F;border-radius:11px;padding:10px 12px;
  color:#fff;font-size:13.5px;font-family:inherit;outline:none}
#apbot-in:focus{border-color:#E8C46A}
#apbot-in::placeholder{color:#63758E}
#apbot-form button{background:linear-gradient(92deg,#FFB020,#FF8A00);border:0;color:#2A1B00;
  width:42px;border-radius:11px;font-size:16px;cursor:pointer;font-weight:800}
#apbot-form button:hover{filter:brightness(1.07)}

/* pie con el aviso y el contacto */
#apbot-pie{padding:7px 12px 10px;font-size:10.5px;color:#63758E;line-height:1.5;background:#0B1322;text-align:center}

@media (max-width:520px){
  #apbot{right:12px;bottom:12px}
  #apbot-panel{width:calc(100vw - 24px);height:min(72vh,500px)}
}
@media (prefers-reduced-motion: reduce){
  #apbot-btn{animation:none}
  #apbot-btn .pt{animation:none}
}
