/* Kailvex Assistant: floating launcher + guided chat panel (public/assets/kx-assistant.js). Replaces the old
   WhatsApp-only button (.kv-contact-float, still created by legacy scripts, hidden here). */
.kv-contact-float{display:none!important}
.kxa{--kxa-ink:#0b1220;--kxa-body:#475467;--kxa-soft:#667085;--kxa-line:#e6eaf0;--kxa-bg:#f6f8fc;--kxa-brand:#0b5cd5;--kxa-brand2:#2f80ff;--kxa-wa:#16a34a;font-family:inherit;-webkit-font-smoothing:antialiased}
.kxa *{box-sizing:border-box}
.kxa svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* Launcher */
.kxa-launcher{position:fixed;right:20px;bottom:20px;z-index:1100;display:inline-flex;align-items:center;gap:10px;height:56px;padding:0 20px 0 8px;border:0;border-radius:999px;background:linear-gradient(135deg,var(--kxa-brand),var(--kxa-brand2));color:#fff;font:inherit;font-size:.92rem;font-weight:750;cursor:pointer;box-shadow:0 18px 40px -14px rgba(11,92,213,.75),0 0 0 1px rgba(255,255,255,.18) inset;transition:transform .2s,box-shadow .2s,opacity .2s;-webkit-tap-highlight-color:transparent}
.kxa-launcher:hover{transform:translateY(-2px);box-shadow:0 24px 48px -14px rgba(11,92,213,.85),0 0 0 1px rgba(255,255,255,.18) inset}
.kxa-launcher__face{position:relative;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#fff;color:var(--kxa-brand)}
.kxa-launcher__face img{width:24px;height:24px}
.kxa-launcher__face:after{content:"";position:absolute;right:0;bottom:1px;width:10px;height:10px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 2px #fff}
.kxa-launcher__badge{position:absolute;top:-4px;right:-2px;display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#ef4444;color:#fff;font-size:.7rem;font-weight:800;box-shadow:0 0 0 2px #fff}
.kxa-launcher[aria-expanded="true"]{opacity:0;pointer-events:none;transform:scale(.9)}
.kxa-teaser{position:fixed;right:20px;bottom:88px;z-index:1100;max-width:270px;padding:14px 38px 14px 16px;border-radius:16px 16px 4px 16px;background:#fff;color:var(--kxa-ink);font-size:.9rem;line-height:1.45;box-shadow:0 20px 44px -18px rgba(16,24,40,.45);border:1px solid var(--kxa-line);cursor:pointer;animation:kxaIn .35s cubic-bezier(.2,.8,.2,1) both}
.kxa-teaser b{display:block;margin-bottom:2px}
.kxa-teaser button{position:absolute;top:8px;right:8px;width:24px;height:24px;border:0;border-radius:50%;background:var(--kxa-bg);color:var(--kxa-soft);font-size:15px;line-height:1;cursor:pointer}

/* Panel */
.kxa-panel{position:fixed;right:20px;bottom:20px;z-index:1101;display:flex;flex-direction:column;width:380px;height:min(640px,calc(100vh - 120px));height:min(640px,calc(100dvh - 120px));border-radius:22px;background:#fff;box-shadow:0 40px 90px -30px rgba(16,24,40,.55),0 0 0 1px rgba(16,24,40,.06);overflow:hidden;transform-origin:bottom right;animation:kxaPop .28s cubic-bezier(.2,.8,.2,1) both}
.kxa-panel[hidden]{display:none}
.kxa-head{position:relative;display:flex;align-items:center;gap:12px;padding:16px 16px 16px 18px;color:#fff;background:radial-gradient(120% 140% at 100% 0,rgba(47,128,255,.55),transparent 60%),linear-gradient(150deg,#0a1a3f,#0b3d9c)}
.kxa-head__logo{position:relative;display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#fff;flex:none}
.kxa-head__logo img{width:26px;height:26px}
.kxa-head__logo:after{content:"";position:absolute;right:-2px;bottom:-2px;width:11px;height:11px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 2px #0b2a6e}
.kxa-head__text{display:flex;flex-direction:column;min-width:0}
.kxa-head__text strong{font-size:1rem;letter-spacing:-.01em}
.kxa-head__text small{font-size:.76rem;color:rgba(255,255,255,.78)}
.kxa-head__btns{margin-left:auto;display:flex;gap:6px}
.kxa-icon-btn{display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:10px;background:rgba(255,255,255,.12);color:#fff;cursor:pointer}
.kxa-icon-btn:hover{background:rgba(255,255,255,.22)}
.kxa-icon-btn svg{width:18px;height:18px}
.kxa-quick{display:flex;gap:6px;padding:10px 12px;border-bottom:1px solid var(--kxa-line);background:#fff;overflow-x:auto;scrollbar-width:none}
.kxa-quick::-webkit-scrollbar{display:none}
.kxa-quick a{display:inline-flex;align-items:center;gap:6px;flex:none;padding:7px 11px;border-radius:999px;background:var(--kxa-bg);border:1px solid var(--kxa-line);color:var(--kxa-ink);font-size:.78rem;font-weight:700;text-decoration:none}
.kxa-quick a:hover{border-color:#b9cdf4}
.kxa-quick svg{width:15px;height:15px}
.kxa-quick a.is-wa svg{color:var(--kxa-wa)}

.kxa-body{outline:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px 10px;background:linear-gradient(180deg,#f8fafd,#fff 40%);scroll-behavior:smooth}
.kxa-msg{display:flex;gap:8px;margin:0 0 10px;animation:kxaIn .3s cubic-bezier(.2,.8,.2,1) both}
.kxa-msg__av{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#fff;border:1px solid var(--kxa-line);flex:none;align-self:flex-end}
.kxa-msg__av img{width:17px;height:17px}
.kxa-bubble{max-width:82%;padding:10px 13px;border-radius:16px 16px 16px 4px;background:#fff;border:1px solid var(--kxa-line);color:var(--kxa-ink);font-size:.9rem;line-height:1.5;box-shadow:0 4px 14px -10px rgba(16,24,40,.3)}
.kxa-msg--me{justify-content:flex-end}
.kxa-msg--me .kxa-bubble{border-radius:16px 16px 4px 16px;background:linear-gradient(135deg,var(--kxa-brand),var(--kxa-brand2));border-color:transparent;color:#fff}
.kxa-typing{display:inline-flex;gap:4px;padding:13px 14px}
.kxa-typing i{width:7px;height:7px;border-radius:50%;background:#9aa8bd;animation:kxaDot 1s infinite}
.kxa-typing i:nth-child(2){animation-delay:.15s}
.kxa-typing i:nth-child(3){animation-delay:.3s}
.kxa-chips{display:flex;flex-wrap:wrap;gap:7px;margin:4px 0 12px 36px;animation:kxaIn .3s cubic-bezier(.2,.8,.2,1) both}
.kxa-chip{display:inline-flex;align-items:center;gap:7px;padding:8px 13px;border-radius:999px;border:1px solid #c9d8f2;background:#fff;color:var(--kxa-brand);font:inherit;font-size:.84rem;font-weight:700;cursor:pointer;transition:background .15s,color .15s,border-color .15s}
.kxa-chip:hover,.kxa-chip:focus-visible{background:var(--kxa-brand);border-color:var(--kxa-brand);color:#fff}
.kxa-chip svg{width:16px;height:16px}
.kxa-actions{display:grid;gap:8px;margin:2px 0 12px 36px;animation:kxaIn .3s cubic-bezier(.2,.8,.2,1) both}
.kxa-action{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;border:1px solid var(--kxa-line);background:#fff;color:var(--kxa-ink);text-decoration:none;transition:border-color .15s,transform .15s,box-shadow .15s}
.kxa-action:hover{border-color:#b9cdf4;transform:translateY(-1px);box-shadow:0 12px 24px -18px rgba(16,24,40,.5)}
.kxa-action__ic{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#eef4ff;color:var(--kxa-brand);flex:none}
.kxa-action span:last-child{display:flex;flex-direction:column;min-width:0}
.kxa-action strong{font-size:.9rem}
.kxa-action small{font-size:.76rem;color:var(--kxa-soft);line-height:1.35}
.kxa-action--wa{background:linear-gradient(135deg,#16a34a,#22c55e);border-color:transparent;color:#fff}
.kxa-action--wa .kxa-action__ic{background:rgba(255,255,255,.2);color:#fff}
.kxa-action--wa small{color:rgba(255,255,255,.88)}
.kxa-links{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 12px 36px;font-size:.82rem}
.kxa-links a{color:var(--kxa-brand);font-weight:700;text-decoration:none}
.kxa-links a:hover{text-decoration:underline}
.kxa-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border-top:1px solid var(--kxa-line);background:#fff;font-size:.72rem;color:var(--kxa-soft)}
.kxa-foot button{border:0;background:none;color:var(--kxa-brand);font:inherit;font-weight:700;cursor:pointer;padding:4px}
.kxa :focus-visible{outline:2px solid var(--kxa-brand2);outline-offset:2px}

@media (max-width:640px){
  .kxa-launcher{right:14px;bottom:14px;width:56px;padding:0;justify-content:center}
  .kxa-launcher__label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .kxa-teaser{right:14px;bottom:80px;max-width:min(270px,calc(100vw - 28px))}
  .kxa-panel{right:0;left:0;bottom:0;width:auto;height:min(88vh,680px);height:min(88dvh,680px);border-radius:22px 22px 0 0;transform-origin:bottom center}
  body.kxa-open{overflow:hidden}
}
@keyframes kxaIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes kxaPop{from{opacity:0;transform:translateY(16px) scale(.97)}to{opacity:1;transform:none}}
@keyframes kxaDot{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-4px);opacity:1}}
@media (prefers-reduced-motion:reduce){.kxa *,.kxa-panel,.kxa-teaser{animation:none!important;transition:none!important}}
@media print{.kxa{display:none!important}}
