/* ==========================================================================
   BOTS — Asistente guiado · Logosímbolo animado
   Serenidad (respiración lenta), sabiduría (anillo de luz que orbita con calma),
   fuerza y seguridad (núcleo firme con brillo verde BOTS).
   ========================================================================== */
#asis { --g: 109, 179, 63; }

/* ---------- Orbe del logosímbolo ---------- */
.asis-orb { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; }
.asis-orb img { position: relative; z-index: 2; width: 74%; height: 74%; object-fit: contain; filter: drop-shadow(0 0 8px rgba(var(--g), .45)); animation: asisBreath 5.5s ease-in-out infinite; }
.asis-glow { position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle, rgba(var(--g), .32), rgba(var(--g), 0) 70%); filter: blur(4px); animation: asisGlow 5.5s ease-in-out infinite; }
.asis-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(var(--g), 0) 0deg, rgba(var(--g), .0) 200deg, rgba(150, 220, 105, .9) 300deg, rgba(var(--g), 0) 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    animation: asisSpin 9s linear infinite; }
.asis-orb::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(var(--g), .28); }
.asis-orb.sm { width: 44px; height: 44px; flex-shrink: 0; }
.asis-orb.thinking .asis-ring { animation-duration: 2.2s; }
.asis-orb.thinking .asis-glow { animation: asisGlow 1.1s ease-in-out infinite; }
@keyframes asisBreath { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 7px rgba(109,179,63,.4)); } 50% { transform: scale(1.045); filter: drop-shadow(0 0 14px rgba(109,179,63,.7)); } }
@keyframes asisGlow { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes asisSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .asis-orb img, .asis-glow, .asis-ring { animation: none !important; } }

/* ---------- Botón flotante ---------- */
.asis-fab { position: fixed; right: 26px; bottom: 26px; z-index: 70; padding: 0; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #121812, #050505 70%); border: 1px solid rgba(var(--g), .35);
    box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 24px rgba(var(--g), .18); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.asis-fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 36px rgba(0,0,0,.6), 0 0 34px rgba(var(--g), .32); }
.asis-fab.active { transform: scale(.92); }
.asis-fab.hidden { display: none; }

/* ---------- Burbuja de saludo ---------- */
.asis-bubble { position: fixed; right: 102px; bottom: 40px; z-index: 70; max-width: 270px; padding: 12px 16px; border-radius: 14px 14px 4px 14px; background: rgba(6, 10, 6, .95); border: 1px solid rgba(var(--g), .35);
    color: rgba(236,236,236,.9); font-size: 14px; line-height: 1.45; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: asisPop .45s cubic-bezier(.2,.8,.2,1) both; }
.asis-bubble b { color: rgb(150, 220, 105); }
.asis-bubble.hidden { display: none; }
@keyframes asisPop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Panel ---------- */
.asis-panel { position: fixed; right: 26px; bottom: 104px; z-index: 71; width: min(410px, calc(100vw - 32px)); height: min(640px, calc(100vh - 140px)); display: flex; flex-direction: column;
    background: #070907; border: 1px solid rgba(var(--g), .3); border-radius: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.75), 0 0 40px rgba(var(--g), .08);
    opacity: 0; transform: translateY(14px) scale(.98); pointer-events: none; transition: opacity .28s ease, transform .32s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
.asis-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.asis-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid #151a15; background: radial-gradient(ellipse 80% 120% at 0% 0%, rgba(var(--g), .12), transparent 70%); }
.asis-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.asis-title b { font-family: 'Orbitron', sans-serif; font-size: 14px; letter-spacing: .08em; }
.asis-title small { font-family: 'Rajdhani', sans-serif; font-size: 13.5px; color: rgba(150, 220, 105, .9); font-weight: 600; letter-spacing: .03em; }
.asis-x { width: 36px; height: 36px; }

.asis-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.asis-msg { display: flex; flex-direction: column; max-width: 92%; animation: asisPop .35s ease both; }
.asis-msg.bot { align-self: flex-start; }
.asis-msg.user { align-self: flex-end; }
.asis-b { padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; }
.asis-msg.bot .asis-b { background: #0e120e; border: 1px solid #1a221a; color: rgba(236,236,236,.9); border-top-left-radius: 5px; }
.asis-msg.bot .asis-b b { color: #f2f2f2; }
.asis-msg.bot .asis-b i { color: rgba(207, 230, 190, .9); }
.asis-msg.user .asis-b { background: rgba(var(--g), .16); border: 1px solid rgba(var(--g), .35); color: #f2f2f2; border-top-right-radius: 5px; }
.asis-step { font-family: 'Rajdhani', sans-serif; font-size: 12.5px; letter-spacing: .16em; color: rgb(150, 220, 105); font-weight: 700; }
.asis-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.asis-act { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 10px; border: 1px solid rgba(var(--g), .4); background: rgba(var(--g), .06); color: rgb(170, 230, 125);
    font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .03em; text-decoration: none; transition: background .2s, border-color .2s; }
.asis-act:hover { background: rgba(var(--g), .14); border-color: rgba(var(--g), .8); }
.asis-msg.typing .asis-b { display: flex; gap: 5px; padding: 14px 16px; }
.asis-msg.typing .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(var(--g), .8); animation: asisDot 1.1s ease-in-out infinite; }
.asis-msg.typing .dot:nth-child(2) { animation-delay: .15s; } .asis-msg.typing .dot:nth-child(3) { animation-delay: .3s; }
@keyframes asisDot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.asis-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px 4px; scrollbar-width: none; }
.asis-chips::-webkit-scrollbar { display: none; }
.asis-chip { flex-shrink: 0; padding: 6px 12px; border-radius: 20px; border: 1px solid #243024; background: #0b0e0b; color: rgba(236,236,236,.8); font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 600; letter-spacing: .02em; transition: border-color .2s, color .2s; }
.asis-chip:hover { border-color: rgba(var(--g), .7); color: rgb(170, 230, 125); }
.asis-input { display: flex; gap: 8px; padding: 10px 14px 14px; }
.asis-input input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid #222a22; background: #050605; color: #f2f2f2; font-size: 14.5px; }
.asis-input input:focus { outline: none; border-color: rgba(var(--g), .7); box-shadow: 0 0 0 3px rgba(var(--g), .12); }
.asis-send { width: 46px; border-radius: 12px; background: #5A9E32; color: #fff; border: 1px solid rgba(var(--g), .9); transition: background .2s; }
.asis-send:hover { background: rgb(109, 179, 63); }

/* Resaltado del recorrido guiado */
.tour-glow { position: relative; border-color: rgba(var(--g), .8) !important; box-shadow: 0 0 0 3px rgba(var(--g), .25), 0 0 22px rgba(var(--g), .35) !important; animation: tourPulse 1.6s ease-in-out infinite; }
@keyframes tourPulse { 50% { box-shadow: 0 0 0 5px rgba(var(--g), .15), 0 0 30px rgba(var(--g), .5) !important; } }

/* Celular: panel como hoja inferior */
@media (max-width: 640px) {
    .asis-fab { right: 16px; bottom: 16px; }
    .asis-fab .asis-orb { width: 56px; height: 56px; }
    .asis-bubble { right: 84px; bottom: 26px; max-width: calc(100vw - 110px); }
    .asis-panel { right: 0; left: 0; bottom: 0; width: 100%; height: 86vh; border-radius: 22px 22px 0 0; border-bottom: 0; }
}
@media print { #asis { display: none !important; } }
