/* AI gift assistant — red & white to match the storefront */
.aja-launcher, .aja-panel, .aja-panel *{ box-sizing:border-box; }
.aja-launcher{
  position:fixed; left:20px; bottom:22px; z-index:640; height:54px; padding:0 20px 0 16px; border:0; border-radius:999px; cursor:pointer;
  display:inline-flex; align-items:center; gap:10px; color:#fff; font:700 14.5px/1 var(--font-body,"Manrope",system-ui,sans-serif); letter-spacing:.01em;
  background:linear-gradient(135deg,#e11d3a,#b30d27); box-shadow:0 16px 32px -12px rgba(163,13,36,.75),0 2px 0 rgba(255,255,255,.18) inset;
  transition:transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s;
}
.aja-launcher:hover{ transform:translateY(-3px); box-shadow:0 22px 38px -14px rgba(163,13,36,.85); }
.aja-launcher svg{ width:24px; height:24px; flex:none; }
.aja-launcher .aja-dot{ position:absolute; top:7px; right:9px; width:11px; height:11px; border-radius:50%; background:#ffd34d; border:2px solid #fff; animation:aja-pulse 2.4s ease-in-out infinite; }
body.aja-open .aja-launcher{ opacity:0; pointer-events:none; transform:scale(.9); }
@keyframes aja-pulse{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.25); } }

/* keep the "recent purchase" toast clear of the launcher; hide it while chatting */
.social-proof-container{ bottom:92px !important; left:20px !important; }
body.aja-open .social-proof-container{ display:none !important; }

.aja-panel{
  position:fixed; left:20px; bottom:22px; z-index:960; width:min(396px,calc(100vw - 24px)); height:min(640px,calc(100vh - 44px));
  display:flex; flex-direction:column; background:#fff; border-radius:22px; overflow:hidden; border:1px solid #f0e2e5;
  box-shadow:0 40px 80px -28px rgba(80,6,20,.55),0 0 0 1px rgba(255,255,255,.6) inset;
  font-family:var(--font-body,"Manrope",system-ui,sans-serif); color:#1d1517;
  transform-origin:left bottom; animation:aja-in .28s cubic-bezier(.2,.7,.2,1);
}
.aja-panel[hidden]{ display:none; }
@keyframes aja-in{ from{ opacity:0; transform:translateY(14px) scale(.97); } to{ opacity:1; transform:none; } }

.aja-head{ flex:none; display:flex; align-items:center; gap:12px; padding:14px 14px 14px 16px; color:#fff;
  background:radial-gradient(120% 140% at 0% 0%,#e8273f 0%,transparent 60%),linear-gradient(135deg,#c8102e,#8f0b21); }
.aja-head img{ width:38px; height:38px; padding:4px; border-radius:12px; background:#fff; object-fit:contain; flex:none; }
.aja-head b{ display:block; font-size:15.5px; font-weight:800; letter-spacing:-.01em; }
.aja-head small{ display:block; font-size:11.5px; opacity:.85; margin-top:2px; }
.aja-close{ margin-left:auto; width:36px; height:36px; border:0; border-radius:50%; background:rgba(255,255,255,.16); color:#fff; font-size:20px; line-height:1; cursor:pointer; display:grid; place-items:center; }
.aja-close:hover{ background:rgba(255,255,255,.28); }

.aja-body{ flex:1; min-height:0; overflow-y:auto; padding:16px 14px 8px; display:flex; flex-direction:column; gap:10px; background:linear-gradient(180deg,#fff7f8,#fff 120px); scroll-behavior:smooth; overscroll-behavior:contain; }
.aja-msg{ max-width:88%; padding:10px 13px; border-radius:16px; font-size:14.5px; line-height:1.5; word-wrap:break-word; overflow-wrap:anywhere; white-space:pre-wrap; animation:aja-pop .22s ease; }
.aja-msg.bot{ align-self:flex-start; background:#fff; border:1px solid #f1e4e7; border-top-left-radius:6px; box-shadow:0 6px 16px -12px rgba(122,10,27,.4); }
.aja-msg.user{ align-self:flex-end; color:#fff; background:linear-gradient(135deg,#d4132f,#aa0d25); border-bottom-right-radius:6px; }
.aja-msg.err{ background:#fff0f2; border-color:#f5c6ce; color:#8f0b21; }
@keyframes aja-pop{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }

.aja-typing{ align-self:flex-start; display:flex; gap:5px; padding:13px 15px; background:#fff; border:1px solid #f1e4e7; border-radius:16px; border-top-left-radius:6px; }
.aja-typing i{ width:7px; height:7px; border-radius:50%; background:#c8102e; opacity:.35; animation:aja-bounce 1.1s ease-in-out infinite; }
.aja-typing i:nth-child(2){ animation-delay:.15s; } .aja-typing i:nth-child(3){ animation-delay:.3s; }
@keyframes aja-bounce{ 0%,80%,100%{ transform:translateY(0); opacity:.35; } 40%{ transform:translateY(-5px); opacity:1; } }

.aja-cards{ display:flex; flex-direction:column; gap:9px; align-self:stretch; }
.aja-card{ display:grid; grid-template-columns:76px minmax(0,1fr); gap:11px; padding:10px; background:#fff; border:1px solid #f1e4e7; border-radius:16px; box-shadow:0 8px 20px -16px rgba(122,10,27,.55); animation:aja-pop .25s ease; }
.aja-card img{ width:76px; height:76px; object-fit:cover; border-radius:12px; background:#fbeff1; }
.aja-card h4{ margin:0; font-size:14px; font-weight:800; line-height:1.3; letter-spacing:-.01em; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.aja-meta{ display:flex; align-items:baseline; flex-wrap:wrap; gap:3px 8px; margin-top:3px; }
.aja-price{ font-weight:800; font-size:15px; color:#b30d27; }
.aja-mrp{ font-size:12px; color:#8b7e81; text-decoration:line-through; }
.aja-off{ font-size:11px; font-weight:800; color:#12855a; background:#e5f7ef; padding:1px 7px; border-radius:99px; }
.aja-tag{ font-size:11.5px; color:#76696c; margin-top:2px; }
.aja-low{ font-size:11px; font-weight:700; color:#a56f00; }
.aja-actions{ display:flex; gap:7px; margin-top:8px; flex-wrap:wrap; }
.aja-btn{ flex:1 1 auto; min-height:34px; padding:0 12px; border-radius:10px; font-family:inherit; font-weight:700; font-size:12.5px; line-height:1; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; white-space:nowrap; transition:background .2s,color .2s,border-color .2s; }
.aja-btn.ghost{ color:#b30d27; background:#fff; border:1.5px solid #f0c9d0; }
.aja-btn.ghost:hover{ border-color:#c8102e; background:#fff5f6; }
.aja-btn.solid{ color:#fff; background:#c8102e; border:1.5px solid #c8102e; }
.aja-btn.solid:hover{ background:#a30d24; }
.aja-btn.done{ background:#12855a; border-color:#12855a; color:#fff; }
.aja-btn[disabled]{ opacity:.55; cursor:not-allowed; }
.aja-cta{ align-self:flex-start; }
.aja-cta .aja-btn{ min-height:38px; padding:0 16px; }
.aja-links{ display:flex; flex-wrap:wrap; gap:8px; }

.aja-chips{ flex:none; display:flex; gap:7px; padding:6px 14px 10px; overflow-x:auto; scrollbar-width:none; }
.aja-chips::-webkit-scrollbar{ display:none; }
.aja-chip{ flex:none; border:1.5px solid #f0c9d0; background:#fff; color:#a30d24; border-radius:999px; padding:7px 13px; font-family:inherit; font-weight:700; font-size:12.5px; line-height:1; cursor:pointer; white-space:nowrap; transition:all .2s; }
.aja-chip:hover{ background:#c8102e; border-color:#c8102e; color:#fff; }

.aja-form{ flex:none; display:flex; align-items:flex-end; gap:8px; padding:10px 12px 8px; border-top:1px solid #f4e9eb; background:#fff; }
.aja-form textarea{ flex:1; min-width:0; resize:none; border:1.5px solid #ead9dd; border-radius:14px; padding:11px 13px; font-family:inherit; font-weight:500; font-size:14.5px; line-height:1.4; color:#1d1517; background:#fffafa; max-height:96px; outline:0; transition:border-color .2s, box-shadow .2s; }
.aja-form textarea:focus{ border-color:#c8102e; box-shadow:0 0 0 4px rgba(200,16,46,.12); background:#fff; }
.aja-send{ flex:none; width:44px; height:44px; border:0; border-radius:14px; color:#fff; cursor:pointer; display:grid; place-items:center; background:linear-gradient(135deg,#e11d3a,#b30d27); box-shadow:0 10px 20px -10px rgba(200,16,46,.8); transition:transform .2s; }
.aja-send:hover{ transform:translateY(-2px); }
.aja-send svg{ width:20px; height:20px; }
.aja-send[disabled]{ opacity:.5; cursor:progress; transform:none; }
.aja-foot{ flex:none; margin:0; padding:0 14px 10px; text-align:center; font-size:11px; color:#9a8d90; background:#fff; }

@media (max-width:600px){
  .aja-launcher{ left:14px; bottom:16px; width:54px; padding:0; justify-content:center; }
  .aja-launcher .aja-label{ display:none; }
  .social-proof-container{ bottom:82px !important; left:14px !important; }
  .aja-panel{ left:0; right:0; bottom:0; width:100%; height:min(88vh,720px); border-radius:22px 22px 0 0; transform-origin:bottom; }
  .aja-form textarea{ font-size:16px; }
  .aja-form{ padding-bottom:calc(8px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion:reduce){ .aja-panel,.aja-msg,.aja-card,.aja-launcher .aja-dot,.aja-typing i{ animation:none !important; } }
@media print{ .aja-launcher,.aja-panel{ display:none !important; } }
