/* AD2SIZE V14.6 — Adi assistant */
.adi{--adi-lift:0px;position:fixed;right:20px;bottom:calc(20px + var(--adi-lift));z-index:19000;font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;color:#111f38;transition:bottom .25s ease}
.adi *{box-sizing:border-box}
/* launcher */
.adi-launch{position:relative;width:60px;height:60px;border-radius:20px;border:0;padding:0;cursor:pointer;display:grid;place-items:center;background:#fff;box-shadow:0 10px 30px rgba(17,31,56,.18),0 0 0 1px rgba(17,31,56,.06);transition:transform .2s ease,box-shadow .2s ease}
.adi-launch::before{content:'';position:absolute;inset:-2px;border-radius:22px;padding:2px;background:linear-gradient(135deg,#8b35f5,#5bc4f9);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.85}
.adi-launch:hover{transform:translateY(-2px);box-shadow:0 14px 36px rgba(139,53,245,.28),0 0 0 1px rgba(139,53,245,.2)}
.adi.open .adi-launch{transform:scale(.92)}
.adi-hello{position:absolute;right:72px;top:50%;transform:translate(8px,-50%);opacity:0;pointer-events:none;white-space:nowrap;background:#111f38;color:#fff;font-size:12.5px;font-weight:500;padding:9px 13px;border-radius:12px 12px 4px 12px;box-shadow:0 10px 24px rgba(17,31,56,.25);transition:all .3s ease}
.adi-hello b{color:#9fdcff}
.adi.hello .adi-hello{opacity:1;transform:translate(0,-50%)}
/* character motion (subtle) */
.adi-bot{display:block;overflow:visible}
.adi-bob{display:grid;place-items:center}
.adi.wave .adi-bob,.adi-launch:hover .adi-bob{animation:adiFloat 2.1s ease-in-out 2}
@keyframes adiFloat{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(0,-2px,0)}}
.adi-eye{transform-box:fill-box;transform-origin:center;transition:transform .07s ease}
.adi.blink .adi-live .adi-eye{transform:scaleY(.12)}
@keyframes adiAnt{0%,100%{opacity:.75}50%{opacity:1}}
.adi-flow{stroke-dasharray:6 4;opacity:.75}
.adi.thinking .adi-live .adi-eyes{animation:adiScan 1.1s ease-in-out infinite}
@keyframes adiScan{0%,100%{transform:translateX(-2px)}50%{transform:translateX(2px)}}
.adi.thinking .adi-live .adi-flow{animation:adiFlow .7s linear infinite;opacity:1}
@keyframes adiFlow{to{stroke-dashoffset:-20}}
.adi.thinking .adi-live .adi-ant{animation:adiAntFast .6s ease-in-out infinite}
@keyframes adiAntFast{0%,100%{opacity:.45;r:3}50%{opacity:1;r:3.8}}
.adi.thinking .adi-live .adi-smile{opacity:.4}
@media(prefers-reduced-motion:reduce){.adi-bob,.adi.thinking .adi-live .adi-eyes,.adi.thinking .adi-live .adi-flow,.adi.thinking .adi-live .adi-ant{animation:none}}
/* panel */
.adi-panel{position:absolute;right:0;bottom:74px;width:min(392px,calc(100vw - 24px));height:min(600px,calc(100vh - 110px - var(--adi-lift)));display:flex;flex-direction:column;background:#fff;border-radius:22px;box-shadow:0 30px 80px rgba(17,31,56,.22),0 0 0 1px rgba(17,31,56,.06);overflow:hidden;animation:adiIn .22s cubic-bezier(.2,.9,.3,1.2) both}
.adi-panel[hidden]{display:none}
@keyframes adiIn{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.adi-head{display:flex;align-items:center;gap:10px;padding:14px 12px 14px 14px;background:linear-gradient(135deg,#8b35f5 0%,#6b6ef7 55%,#5bc4f9 100%);color:#fff}
.adi-avatar{width:46px;height:46px;border-radius:15px;background:rgba(255,255,255,.18);display:grid;place-items:center;backdrop-filter:blur(4px)}
.adi-who{display:grid;gap:2px;flex:1;min-width:0}
.adi-who b{font-size:16px;letter-spacing:-.01em}
.adi-who span{display:flex;align-items:center;gap:6px;font-size:11.5px;opacity:.92}
.adi-who em{font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.adi-dot{width:7px;height:7px;border-radius:50%;background:#9effc2;box-shadow:0 0 0 3px rgba(158,255,194,.25)}
.adi.thinking .adi-dot{background:#fff;animation:adiAnt .6s ease-in-out infinite}
.adi-x{width:32px;height:32px;border-radius:10px;border:0;background:rgba(255,255,255,.14);color:#fff;cursor:pointer;display:grid;place-items:center}
.adi-x:hover{background:rgba(255,255,255,.26)}
.adi-x svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.adi-list{flex:1;overflow:auto;padding:16px 14px 6px;display:flex;flex-direction:column;gap:12px;background:#f7f8fb}
.adi-msg{display:flex;gap:8px;align-items:flex-end;max-width:100%}
.adi-msg.user{justify-content:flex-end}
.adi-mini{flex:0 0 auto;width:28px;height:28px;border-radius:9px;background:#fff;display:grid;place-items:center;box-shadow:0 1px 3px rgba(17,31,56,.1)}
.adi-bubble{max-width:86%;padding:10px 13px;border-radius:16px 16px 16px 5px;background:#fff;border:1px solid #e6e9f0;font-size:13.3px;line-height:1.5;box-shadow:0 1px 2px rgba(17,31,56,.04);overflow-wrap:anywhere}
.adi-msg.user .adi-bubble{background:linear-gradient(135deg,#8b35f5,#6f6cf7);color:#fff;border:0;border-radius:16px 16px 5px 16px}
.adi-bubble p{margin:0 0 6px}.adi-bubble p:last-child{margin-bottom:0}
.adi-bubble ol{margin:4px 0 6px;padding-left:20px}
.adi-bubble li{margin:3px 0;padding-left:2px}
.adi-bubble li::marker{color:#8b35f5;font-weight:800}
.adi-bubble b{font-weight:700;color:#111f38}
.adi-msg.user .adi-bubble b{color:#fff}
.adi-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;font-size:11.5px;color:#69738a;align-items:center}
.adi-show{display:inline-flex;align-items:center;gap:6px;border:1px solid #e3d2fd;background:#f4eefe;color:#7a26e6;border-radius:99px;padding:6px 11px;font:700 12px Inter,system-ui,sans-serif;cursor:pointer;text-align:left}
.adi-show svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;flex:0 0 auto}
.adi-show:hover{background:linear-gradient(135deg,#8b35f5,#5bc4f9);color:#fff;border-color:transparent}
.adi-msg.local .adi-bubble{border-style:solid}
.adi-typing{display:inline-flex;gap:4px;padding:3px 0}
.adi-typing i{width:7px;height:7px;border-radius:50%;background:linear-gradient(135deg,#8b35f5,#5bc4f9);animation:adiDots 1s infinite}
.adi-typing i:nth-child(2){animation-delay:.15s}.adi-typing i:nth-child(3){animation-delay:.3s}
@keyframes adiDots{0%,80%,100%{transform:translateY(0);opacity:.5}40%{transform:translateY(-4px);opacity:1}}
.adi-chips{display:flex;gap:6px;overflow-x:auto;padding:8px 12px 2px;background:#f7f8fb;scrollbar-width:none}
.adi-chips::-webkit-scrollbar{display:none}
.adi-chips button,.adi-chip{flex:0 0 auto;border:1px solid #e1e5ec;background:#fff;color:#2a3752;border-radius:99px;padding:6px 11px;font:600 12px Inter,system-ui,sans-serif;cursor:pointer;white-space:nowrap}
.adi-chips button:hover,.adi-chip:hover{border-color:#8b35f5;color:#7a26e6}
.adi-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;background:#f7f8fb}
.adi-form textarea{flex:1;resize:none;border:1px solid #dfe3ea;border-radius:14px;padding:10px 12px;font:13.5px/1.4 Inter,system-ui,sans-serif;color:#111f38;background:#fff;max-height:120px;outline:none}
.adi-form textarea:focus{border-color:#8b35f5;box-shadow:0 0 0 3px rgba(139,53,245,.16)}
.adi-send{width:42px;height:42px;border-radius:13px;border:0;background:linear-gradient(135deg,#8b35f5,#5bc4f9);color:#fff;cursor:pointer;display:grid;place-items:center;box-shadow:0 6px 16px rgba(139,53,245,.3)}
.adi-send svg{width:18px;height:18px;fill:currentColor}
.adi-send:disabled{opacity:.5}
.adi-foot{font-size:10.5px;color:#8b93a6;text-align:center;padding:0 12px 10px;background:#f7f8fb}
/* spotlight */
#adi-spot{position:fixed;inset:0;z-index:19500;cursor:pointer}
#adi-spot[hidden]{display:none}
.adi-ring{position:fixed;border-radius:12px;box-shadow:0 0 0 9999px rgba(17,31,56,.42);transition:all .25s ease;pointer-events:none}
.adi-ring::after{content:'';position:absolute;inset:-3px;border-radius:14px;padding:3px;background:linear-gradient(135deg,#8b35f5,#5bc4f9);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;animation:adiPulse 1.4s ease-in-out infinite}
@keyframes adiPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.03)}}
.adi-callout{position:fixed;display:flex;align-items:center;gap:10px;max-width:330px;background:#fff;color:#111f38;border-radius:16px;padding:10px 10px 10px 12px;box-shadow:0 18px 44px rgba(17,31,56,.3);font:600 13px/1.4 Inter,system-ui,sans-serif;cursor:default}
#adi-spot.in .adi-callout{animation:adiIn .25s ease both}
.adi-callout span{flex:1}
.adi-callout button{border:0;border-radius:10px;padding:8px 12px;background:linear-gradient(135deg,#8b35f5,#5bc4f9);color:#fff;font:700 12px Inter,system-ui,sans-serif;cursor:pointer;white-space:nowrap}
@media(max-width:640px){.adi{right:12px;bottom:calc(12px + var(--adi-lift))}.adi-launch{width:54px;height:54px}.adi-panel{bottom:66px}}
