/* TradeX AI chat panel */
.ai-wrap{display:flex;flex-direction:column;height:100vh;height:100dvh;background:linear-gradient(180deg,#F3F6F4,#F4F2EC);max-width:480px;margin:0 auto}
.ai-head{display:flex;align-items:center;gap:10px;padding:calc(12px + env(safe-area-inset-top)) 14px 14px;background:linear-gradient(135deg,#0B3A31,#06201B);color:#fff;border-radius:0 0 24px 24px;box-shadow:0 10px 30px rgba(6,32,27,.25)}
.ai-head b{display:block;font-size:16px}.ai-head small{color:#A9C2BB;font-size:12px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-x,.ai-new{border:0;background:rgba(255,255,255,.1);color:#fff;border-radius:12px;min-height:38px;padding:0 12px;font:700 12.5px Sora,sans-serif;cursor:pointer}
.ai-x{width:38px;padding:0;font-size:16px}
.ai-orb{width:58px;height:58px;border-radius:20px;display:grid;place-items:center;font-size:28px;background:conic-gradient(from 200deg,#D9B061,#F0D597,#5FD3B4,#0F5C4D,#D9B061);box-shadow:0 10px 30px rgba(217,176,97,.35);animation:orb 6s linear infinite}
.ai-orb.sm{width:40px;height:40px;border-radius:14px;font-size:20px;flex:none}
@keyframes orb{50%{filter:hue-rotate(25deg)}}
.ai-list{flex:1;overflow-y:auto;padding:16px 14px;display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth}
.ai-hello{margin:auto;text-align:center;color:#5D6A66;padding:20px;display:grid;justify-items:center;gap:6px}.ai-hello b{color:#101C19;font-size:18px;margin-top:8px}.ai-hello p{margin:0;font-size:14px;max-width:300px}
.ai-msg{max-width:86%;padding:11px 14px;border-radius:18px;font-size:14.5px;line-height:1.5;word-wrap:break-word;animation:aiIn .25s ease}
@keyframes aiIn{from{transform:translateY(6px);opacity:0}}
.ai-msg.me{align-self:flex-end;background:linear-gradient(135deg,#0F5C4D,#0B4A3E);color:#fff;border-bottom-right-radius:6px}
.ai-msg.bot{align-self:flex-start;background:#fff;color:#101C19;border-bottom-left-radius:6px;box-shadow:0 4px 14px rgba(16,28,25,.07)}
.ai-msg.bot a{color:#0F5C4D;font-weight:700}
.ai-copy{display:block;margin-top:8px;border:0;background:#F2EFE7;border-radius:10px;padding:6px 10px;font:700 12px Sora,sans-serif;cursor:pointer;color:#101C19}
.typing{display:flex;gap:4px;padding:14px 16px}.typing i{width:7px;height:7px;border-radius:50%;background:#9AA7A2;animation:dot 1.2s infinite}.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes dot{30%{transform:translateY(-5px);background:#0F5C4D}}
.ai-foot{padding:8px 12px calc(12px + env(safe-area-inset-bottom));background:linear-gradient(180deg,rgba(244,242,236,0),#F4F2EC 25%)}
.ai-chips{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 10px;scrollbar-width:none}.ai-chips::-webkit-scrollbar{display:none}
.ai-chips button{flex:none;border:1.5px solid #E6E1D6;background:#fff;border-radius:99px;padding:8px 13px;font:600 13px Sora,sans-serif;color:#101C19;cursor:pointer}
.ai-bar{display:flex;gap:8px;align-items:flex-end;background:#fff;border-radius:22px;padding:6px 6px 6px 14px;box-shadow:0 8px 24px rgba(16,28,25,.1)}
.ai-bar textarea{flex:1;border:0;outline:0;resize:none;font:500 15px Sora,sans-serif;padding:10px 0;min-height:24px;max-height:120px;background:none;color:#101C19}
.ai-send{width:44px;height:44px;border-radius:16px;border:0;background:linear-gradient(135deg,#D9B061,#F0D597);color:#06201B;display:grid;place-items:center;cursor:pointer;flex:none}
.ai-note{display:block;text-align:center;color:#8A9692;font-size:11px;margin-top:6px}
.ai-overlay{position:fixed;inset:0;z-index:200;background:rgba(6,32,27,.6);animation:fade .2s}
.ai-fab{position:fixed;z-index:28;right:max(16px,calc(50% - 224px));bottom:calc(var(--tab,66px) + 16px + env(safe-area-inset-bottom));width:58px;height:58px;border-radius:20px;border:0;cursor:pointer;display:grid;place-items:center;font-size:26px;
  background:conic-gradient(from 200deg,#D9B061,#F0D597,#5FD3B4,#0F5C4D,#D9B061);box-shadow:0 14px 30px rgba(6,32,27,.35);animation:orb 6s linear infinite;text-decoration:none}
.ai-fab::after{content:"AI";position:absolute;top:-6px;right:-6px;background:#06201B;color:#F0D597;font:800 10px Sora,sans-serif;border-radius:99px;padding:3px 6px}
body.hascart .ai-fab{bottom:calc(var(--tab,66px) + 90px + env(safe-area-inset-bottom))}
html[dir=rtl] .ai-fab{right:auto;left:max(16px,calc(50% - 224px))}
html[dir=rtl] .ai-send svg{transform:scaleX(-1)}
