/* AI support widget — gold/glass, bottom-left (RTL-safe), above sticky CTA */
.akh-ai{position:fixed;inset-inline-start:max(.75rem,env(safe-area-inset-left));bottom:calc(.85rem + env(safe-area-inset-bottom));z-index:60;font-family:dana,Tahoma,sans-serif;font-feature-settings:"ss02";pointer-events:none}
.akh-ai > *{pointer-events:auto}
.akh-ai-fab{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:.2rem;padding:.15rem .35rem .35rem;border:none;border-radius:16px;color:#ffe3a3;background:transparent;box-shadow:none;cursor:pointer;font:inherit;font-weight:800;font-size:.72rem;line-height:1.15;letter-spacing:.01em;transition:transform .2s var(--ease,cubic-bezier(.2,.8,.2,1)),filter .2s;text-shadow:0 2px 10px rgba(0,0,0,.65)}
.akh-ai-fab:hover{transform:translateY(-2px);filter:brightness(1.06)}
.akh-ai-fab:focus-visible{outline:2px solid var(--cyan,#55d3ff);outline-offset:3px}
.akh-ai-fab-ic{flex:none;width:58px;height:58px;object-fit:contain;display:block;filter:drop-shadow(0 6px 14px rgba(0,0,0,.45))}
.akh-ai-fab-txt{white-space:nowrap;color:#ffe3a3}
.akh-ai[data-open="1"] .akh-ai-fab{opacity:.92}

.akh-ai-panel{position:absolute;inset-inline-start:0;bottom:calc(100% + .65rem);width:min(92vw,380px);height:min(72vh,520px);display:flex;flex-direction:column;border-radius:20px;border:1px solid rgba(242,196,109,.28);background:linear-gradient(165deg,rgba(12,18,48,.97),rgba(6,10,24,.98));backdrop-filter:blur(16px);box-shadow:0 24px 60px -16px rgba(0,0,0,.75),inset 0 1px 0 rgba(255,255,255,.06);overflow:hidden}
.akh-ai-panel[hidden]{display:none!important}

.akh-ai-avatar{flex:none;width:40px;height:40px;object-fit:contain;display:block}
.akh-ai-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.85rem 1rem;border-bottom:1px solid rgba(255,255,255,.09);background:rgba(242,196,109,.06)}
.akh-ai-head-txt{display:flex;flex-direction:column;gap:.15rem;min-width:0}
.akh-ai-head-txt strong{color:var(--gold2,#ffe3a3);font-size:.98rem}
.akh-ai-head-txt span{color:var(--muted,#a3adc9);font-size:.75rem}
.akh-ai-close{width:36px;height:36px;border:0;border-radius:10px;background:rgba(255,255,255,.06);color:#eef2ff;font-size:1.4rem;line-height:1;cursor:pointer}
.akh-ai-close:hover{background:rgba(255,255,255,.12)}

.akh-ai-msgs{flex:1;overflow:auto;padding:1rem .9rem;display:flex;flex-direction:column;gap:.65rem;scroll-behavior:smooth}
.akh-ai-bubble{max-width:92%;padding:.7rem .9rem;border-radius:14px;font-size:.9rem;line-height:1.7;word-wrap:break-word}
.akh-ai-bubble a{color:var(--cyan,#55d3ff);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.akh-ai-bubble--assistant{align-self:flex-start;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);color:var(--ink,#eef2ff)}
.akh-ai-bubble--user{align-self:flex-end;color:#1a1206;background:linear-gradient(135deg,var(--gold2,#ffe3a3),var(--gold,#f2c46d));border:1px solid rgba(242,196,109,.5)}
.akh-ai-bubble.is-pending{min-height:2.4rem;display:inline-flex;align-items:center}

.akh-ai-dots{display:inline-flex;gap:5px;padding:.15rem .1rem}
.akh-ai-dots i{width:6px;height:6px;border-radius:50%;background:var(--gold,#f2c46d);opacity:.35;animation:akh-ai-bounce 1.2s infinite ease-in-out}
.akh-ai-dots i:nth-child(2){animation-delay:.15s}
.akh-ai-dots i:nth-child(3){animation-delay:.3s}
@keyframes akh-ai-bounce{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

.akh-ai-form{display:flex;align-items:flex-end;gap:.5rem;padding:.7rem .75rem calc(.75rem + env(safe-area-inset-bottom));border-top:1px solid rgba(255,255,255,.09);background:rgba(0,0,0,.2)}
.akh-ai-form textarea{flex:1;resize:none;min-height:42px;max-height:120px;padding:.65rem .8rem;border-radius:12px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:#eef2ff;font:inherit;font-size:.9rem;line-height:1.5}
.akh-ai-form textarea::placeholder{color:rgba(163,173,201,.75)}
.akh-ai-form textarea:focus{outline:none;border-color:rgba(242,196,109,.55);box-shadow:0 0 0 3px rgba(242,196,109,.15)}
.akh-ai-send{flex:none;width:42px;height:42px;display:grid;place-items:center;border:0;border-radius:12px;cursor:pointer;color:#1a1206;background:linear-gradient(135deg,var(--gold2,#ffe3a3),var(--gold,#f2c46d))}
.akh-ai-send:disabled{opacity:.5;cursor:wait}
.akh-ai-send:hover:not(:disabled){filter:brightness(1.05)}

.akh-ai .screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Lift above sticky CTA on product/home mobile bars */
@media (max-width:899px){
  body:has(.sticky-cta.is-on) .akh-ai,
  body:has(.c-sticky) .akh-ai{bottom:calc(4.6rem + env(safe-area-inset-bottom))}
}
@media (max-width:420px){
  .akh-ai-fab-ic{width:56px;height:56px}
  .akh-ai-fab-txt{display:block;font-size:.7rem}
  .akh-ai-panel{width:min(94vw,380px);height:min(70vh,500px)}
}
/* Ali sticker (v2) */
.akh-ai-fab-ic{width:64px;height:64px;transition:transform .25s ease;animation:akhAiPulse 3.2s ease-in-out infinite}
.akh-ai-fab:hover .akh-ai-fab-ic{transform:scale(1.08) rotate(-3deg)}
@keyframes akhAiPulse{0%,100%{filter:drop-shadow(0 6px 14px rgba(0,0,0,.45)) drop-shadow(0 0 0 rgba(85,160,255,0))}50%{filter:drop-shadow(0 6px 14px rgba(0,0,0,.45)) drop-shadow(0 0 10px rgba(85,160,255,.75))}}
@media (max-width:640px){.akh-ai-fab-ic{width:58px;height:58px}}
@media (prefers-reduced-motion:reduce){.akh-ai-fab-ic{animation:none;transition:none}}
