/* Ahmad Ecom Solution — isolated responsive AI assistant widget */
.ae-chat-root{position:fixed;z-index:5000;right:24px;bottom:24px;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#eaf1ff;text-align:left;line-height:1.45;pointer-events:none}
.ae-chat-root *{box-sizing:border-box}
.ae-chat-root button,.ae-chat-root textarea,.ae-chat-root select{font:inherit}
.ae-chat-root button{cursor:pointer}
.ae-chat-root button:focus-visible,.ae-chat-root textarea:focus-visible,.ae-chat-root select:focus-visible{outline:2px solid #86b8ff;outline-offset:3px}
.ae-chat-launcher{pointer-events:auto;display:flex;align-items:center;gap:12px;margin-left:auto;padding:10px 17px 10px 10px;min-height:64px;background:linear-gradient(120deg,#2469ff 0%,#1452cf 100%);border:1px solid rgba(184,212,255,.45);border-radius:19px;color:#fff;box-shadow:0 15px 42px rgba(18,71,192,.42),0 12px 36px rgba(0,0,0,.38);font-size:13px;font-weight:800;transition:transform .22s,box-shadow .22s}
.ae-chat-launcher:hover{transform:translateY(-3px);box-shadow:0 18px 50px rgba(28,92,235,.48),0 14px 36px rgba(0,0,0,.38)}
.ae-chat-launcher-icon{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:rgba(255,255,255,.17)}
.ae-chat-launcher svg{width:23px;height:23px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
.ae-chat-launcher-copy{display:flex;flex-direction:column;align-items:flex-start;gap:0}
.ae-chat-launcher-copy small{font-size:10px;line-height:1.6;color:#deebff;font-weight:500}
.ae-chat-panel[hidden],.ae-chat-launcher[hidden]{display:none!important}
.ae-chat-panel{pointer-events:auto;display:flex;flex-direction:column;width:min(395px,calc(100vw - 30px));height:min(630px,calc(100dvh - 110px));min-height:320px;margin:0 0 13px auto;border:1px solid #263c64;border-radius:21px;background:#0a1222;box-shadow:0 25px 85px rgba(0,0,0,.6),0 4px 32px rgba(24,77,196,.18);overflow:hidden;animation:ae-chat-in .25s cubic-bezier(.19,.7,.25,1)}
@keyframes ae-chat-in{from{transform:translateY(12px) scale(.985);opacity:0}to{transform:none;opacity:1}}
.ae-chat-header{padding:17px 17px 15px;background:radial-gradient(circle at 100% -15%,rgba(81,148,255,.36),transparent 56%),linear-gradient(135deg,#122b5a,#0d1b34 75%);border-bottom:1px solid #28416e;display:flex;align-items:center;gap:11px;flex-shrink:0}
.ae-chat-avatar{width:44px;height:44px;flex:0 0 44px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(135deg,#2978ff,#1b4bc2);border:1px solid rgba(187,215,255,.36);box-shadow:0 8px 20px rgba(29,102,225,.32);font-size:22px;font-weight:850;color:#fff;letter-spacing:-.1em}
.ae-chat-brand{display:flex;flex-direction:column;min-width:0;flex:1;gap:3px}
.ae-chat-brand strong{font-size:14px;color:#fff;font-weight:800;letter-spacing:-.02em}
.ae-chat-brand span{display:flex;align-items:center;gap:6px;color:#b9cbe8;font-size:11px}
.ae-chat-dot{display:inline-block;width:7px;height:7px;border-radius:100%;background:#43d19d;box-shadow:0 0 0 3px rgba(67,209,157,.12)}
.ae-chat-actions{display:flex;align-items:center;gap:6px}
.ae-chat-iconbtn{display:grid;place-items:center;width:33px;height:33px;border-radius:10px;border:1px solid rgba(203,220,255,.18);color:#e4eeff;background:rgba(255,255,255,.06);transition:.2s}
.ae-chat-iconbtn:hover{background:rgba(255,255,255,.15)}
.ae-chat-iconbtn[aria-pressed="true"]{background:#2563eb;border-color:#65a7ff}
.ae-chat-iconbtn svg{width:17px;height:17px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
.ae-chat-transcript{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:17px 16px 11px;display:flex;flex-direction:column;gap:13px;background:radial-gradient(circle at 50% 0%,rgba(49,94,183,.08),transparent 56%),#0a1222;scrollbar-width:thin;scrollbar-color:#334c75 transparent}
.ae-chat-day{align-self:center;color:#8195b8;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.065);border-radius:20px;padding:4px 11px;font-size:10px;margin-bottom:3px}
.ae-chat-msg{max-width:92%;font-size:13px;line-height:1.58;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:15px;padding:12px 14px;letter-spacing:.002em}
.ae-chat-msg.ai{align-self:flex-start;background:#17243b;color:#e0ebfb;border:1px solid #293b5b;border-bottom-left-radius:5px}
.ae-chat-msg.user{align-self:flex-end;background:linear-gradient(135deg,#2874ff,#2057ca);color:#fff;border:1px solid rgba(177,211,255,.3);border-bottom-right-radius:5px}
.ae-chat-msg.error{align-self:flex-start;background:#3a1c27;border:1px solid #7e3847;color:#ffccd2;border-bottom-left-radius:5px}
.ae-chat-msg.ai.is-typing{padding:15px 17px}
.ae-chat-typing{display:flex;align-items:center;gap:4px}
.ae-chat-typing i{height:6px;width:6px;border-radius:50%;background:#a8c9ff;animation:ae-typing 1s ease-in-out infinite}
.ae-chat-typing i:nth-child(2){animation-delay:.15s}.ae-chat-typing i:nth-child(3){animation-delay:.3s}
@keyframes ae-typing{0%,70%,100%{opacity:.36;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}
.ae-chat-quick{display:flex;flex-wrap:wrap;gap:7px;padding:6px 16px 12px;flex-shrink:0;background:#0a1222}
.ae-chat-quick button{border:1px solid #2c4b82;color:#cde0ff;border-radius:999px;background:#102445;padding:7px 10px;font-size:11px;font-weight:650;transition:.18s}
.ae-chat-quick button:hover{background:#183969;color:#fff}
.ae-chat-status{font-size:11px;line-height:1.4;color:#a6bce0;min-height:0;padding:0 17px;text-align:left}
.ae-chat-status:not(:empty){padding-top:7px;padding-bottom:5px}
.ae-chat-controls{display:flex;align-items:center;gap:6px;padding:12px 12px 9px;background:#101d34;border-top:1px solid #253858;flex-shrink:0}
.ae-chat-voice-lang{min-width:48px;max-width:53px;border:1px solid #324e80;border-radius:10px;padding:8px 3px;background:#162944;color:#cfe1ff;font-size:11px;outline:none}
.ae-chat-input{flex:1;min-width:0;max-height:100px;min-height:42px;resize:none;line-height:1.35!important;background:#19283f;border:1px solid #2c4160;border-radius:11px;color:#fff;padding:11px 12px;font-size:12px!important;outline:none}
.ae-chat-input::placeholder{color:#8da4c6}
.ae-chat-input:focus{border-color:#4f91f3}
.ae-chat-mic{width:40px;height:42px;flex:0 0 40px;border:1px solid #2b4b7c;border-radius:10px;background:#182e51;color:#bddeff;display:grid;place-items:center}
.ae-chat-mic[aria-pressed="true"]{background:#a3314a;color:#fff;border-color:#df5b78;animation:ae-pulse 1.1s infinite}
@keyframes ae-pulse{50%{box-shadow:0 0 0 5px rgba(214,64,102,.15)}}
.ae-chat-send{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(140deg,#327eff,#1754d0);border:1px solid rgba(188,218,255,.35);color:#fff}
.ae-chat-send:disabled{opacity:.4;cursor:not-allowed}
.ae-chat-mic svg,.ae-chat-send svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ae-chat-foot{padding:2px 14px 12px;background:#101d34;color:#8296b6;font-size:10px;text-align:center;flex-shrink:0}
.ae-chat-foot a{color:#9fc5ff;text-decoration:underline;text-underline-offset:2px}
@media(max-width:680px){.ae-chat-root{right:14px;bottom:15px}.ae-chat-panel{height:min(660px,calc(100dvh - 90px));width:calc(100vw - 28px);border-radius:18px;margin-bottom:10px}.ae-chat-launcher{min-height:60px}.ae-chat-launcher-copy strong{font-size:12px}}
@media(max-width:375px){.ae-chat-controls{gap:4px;padding:9px 8px}.ae-chat-input{padding:9px 8px}.ae-chat-voice-lang{max-width:45px;min-width:44px}}
@media(prefers-reduced-motion:reduce){.ae-chat-root *{animation-duration:.01ms!important;transition-duration:.01ms!important}}
.ae-chat-quick[hidden]{display:none!important}
.ae-chat-quick button:disabled{opacity:.5;cursor:wait}
