/* AIUXQA Cart UI — drawer, items, checkout. Brand-aligned, vanilla CSS. */

/* ── Nav cart trigger + badge ──────────────────────────────────────────────── */
.aiuxqa-cart-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:18px;height:18px;padding:0 5px;
  background:var(--blue,#00AEEF);color:#fff;
  border-radius:100px;
  font-family:var(--font-body,system-ui);font-size:11px;font-weight:700;
  position:relative;top:-8px;left:-4px;
  line-height:1;
}

/* ── Backdrop ──────────────────────────────────────────────────────────────── */
.aiuxqa-cart-backdrop{
  position:fixed;inset:0;background:rgba(0,0,0,0.55);
  opacity:0;pointer-events:none;
  transition:opacity .22s ease;
  z-index:9998;
}
.aiuxqa-cart-backdrop.open{opacity:1;pointer-events:auto}

/* ── Drawer ────────────────────────────────────────────────────────────────── */
.aiuxqa-cart-drawer{
  position:fixed;top:0;right:0;bottom:0;
  width:min(440px, 100vw);
  background:#fff;color:#1a1040;
  box-shadow:-8px 0 32px rgba(0,0,0,0.30);
  transform:translateX(100%);
  transition:transform .26s ease;
  z-index:9999;
  display:flex;flex-direction:column;
  font-family:var(--font-body,system-ui);
}
.aiuxqa-cart-drawer.open{transform:translateX(0)}

body.aiuxqa-cart-open{overflow:hidden}

/* ── Header ────────────────────────────────────────────────────────────────── */
.aiuxqa-cart-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 22px 14px;
  border-bottom:1px solid rgba(0,0,0,0.10);
  flex-shrink:0;
}
.aiuxqa-cart-header h2{
  font-family:var(--font-head,system-ui);
  font-size:20px;font-weight:700;margin:0;
  color:#1a1040;letter-spacing:-0.005em;
}
.aiuxqa-cart-close{
  background:transparent;border:none;cursor:pointer;
  color:#5B4DB0;padding:0 4px;
  display:inline-flex;align-items:center;justify-content:center;
}
.aiuxqa-cart-close img{width:18px;height:18px;display:block}
.aiuxqa-cart-close:hover{color:#1a1040}

/* ── Items list ────────────────────────────────────────────────────────────── */
.aiuxqa-cart-items{
  flex:1;overflow-y:auto;
  padding:14px 22px;
}
.aiuxqa-cart-empty{
  text-align:center;color:#5B4DB0;
  font-size:15px;font-style:italic;
  padding:60px 20px;
}
.aiuxqa-cart-item{
  display:grid;
  grid-template-columns:1fr auto auto auto;
  align-items:center;
  gap:10px;
  padding:12px 0;
  border-bottom:1px solid rgba(0,0,0,0.08);
}
.aiuxqa-cart-item:last-child{border-bottom:none}
.aiuxqa-cart-item-info{min-width:0}
.aiuxqa-cart-item-name{
  font-size:14px;font-weight:700;color:#1a1040;
  line-height:1.25;
  overflow:hidden;text-overflow:ellipsis;
}
.aiuxqa-cart-item-variant{
  font-size:12px;color:#5B4DB0;font-style:italic;
  margin-top:2px;line-height:1.2;
}
.aiuxqa-cart-item-qty{
  display:flex;align-items:center;gap:4px;
  font-size:13px;
}
.aiuxqa-cart-qty-btn{
  width:22px;height:22px;
  background:#F4F2FA;border:1px solid rgba(91,77,176,0.30);
  color:#5B4DB0;border-radius:50%;cursor:pointer;
  font-size:14px;line-height:1;
  display:flex;align-items:center;justify-content:center;
}
.aiuxqa-cart-qty-btn:hover{background:#5B4DB0;color:#fff}
.aiuxqa-cart-qty-val{
  min-width:18px;text-align:center;font-weight:700;color:#1a1040;
}
.aiuxqa-cart-qty-fixed{
  color:#5B4DB0;font-weight:600;font-size:12px;
}
.aiuxqa-cart-item-price{
  font-family:var(--font-head,system-ui);
  font-weight:700;font-size:14px;color:#1a1040;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.aiuxqa-cart-item-remove{
  background:transparent;border:none;cursor:pointer;
  font-size:22px;line-height:1;color:#aaa;
  padding:0 4px;
}
.aiuxqa-cart-item-remove:hover{color:#E53935}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.aiuxqa-cart-footer{
  padding:16px 22px 22px;
  border-top:1px solid rgba(0,0,0,0.10);
  flex-shrink:0;
  background:#fafafa;
}
.aiuxqa-cart-subtotal{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:6px;
}
.aiuxqa-cart-subtotal-label{
  font-size:14px;color:#1a1040;font-weight:600;
}
.aiuxqa-cart-subtotal-val{
  font-family:var(--font-head,system-ui);
  font-size:22px;font-weight:700;color:#1a1040;
  font-variant-numeric:tabular-nums;
}
.aiuxqa-cart-tax-note{
  font-size:11.5px;color:#5B4DB0;font-style:italic;
  text-align:right;margin-bottom:14px;line-height:1.3;
}
.aiuxqa-cart-intake-notice{
  display:flex;align-items:flex-start;gap:8px;
  background:rgba(91,77,176,0.06);
  border-left:3px solid #5B4DB0;
  padding:10px 12px;
  border-radius:4px;
  margin-bottom:14px;
  font-size:12px;
  line-height:1.45;
  color:#1a1040;
}
.aiuxqa-cart-intake-notice strong{font-weight:700;color:#1a1040}
.aiuxqa-cart-intake-notice .aiuxqa-cart-intake-icon{
  flex-shrink:0;
  width:14px;height:14px;
  display:inline-flex;align-items:center;justify-content:center;
  color:#5B4DB0;
  margin-top:1px;
}
.aiuxqa-cart-intake-chip{
  position:relative;
  display:inline-flex;align-items:center;
  background:rgba(91,77,176,0.10);
  color:#5B4DB0;
  font-size:10px;font-weight:700;
  letter-spacing:0.05em;text-transform:uppercase;
  padding:2px 7px;
  border-radius:100px;
  margin-top:4px;
  line-height:1.2;
  cursor:help;
  outline:none;
}
/* Hover/focus tooltip — content is pulled from data-tooltip, which is set in cart.js
   from the INTAKE_TOOLTIP_TEXT constant. Change the constant once and the tooltip,
   the footer notice, and the pill label all stay in sync — no manual duplication. */
.aiuxqa-cart-intake-chip::after,
.aiuxqa-cart-intake-chip::before{
  opacity:0; visibility:hidden;
  transition:opacity .15s ease, visibility .15s ease;
  pointer-events:none;
  z-index:10000;
}
/* Tooltip positioned BELOW the pill, anchored to the pill's left edge so it
   inherits the cart's left gutter — matches the visual rhythm of cart-item-name,
   variant, etc. that sit on the same left baseline. Avoids overflow off the
   drawer's left edge when the pill is near the start of the line. */
.aiuxqa-cart-intake-chip::after{
  content:attr(data-tooltip);
  position:absolute;
  top:calc(100% + 10px);
  left:0;
  transform:none;
  width:260px;
  background:#0A0520;
  color:#fff;
  padding:11px 14px;
  border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,0.30);
  font-family:inherit;
  font-size:12.5px;
  font-weight:400;
  letter-spacing:0;
  text-transform:none;
  text-align:left;
  line-height:1.45;
  white-space:normal;
}
.aiuxqa-cart-intake-chip::before{
  content:'';
  position:absolute;
  top:calc(100% + 4px);
  left:14px;
  transform:none;
  border:6px solid transparent;
  border-bottom-color:#0A0520;
}
.aiuxqa-cart-intake-chip:hover::after,
.aiuxqa-cart-intake-chip:hover::before,
.aiuxqa-cart-intake-chip:focus::after,
.aiuxqa-cart-intake-chip:focus::before{
  opacity:1; visibility:visible;
}
.aiuxqa-cart-checkout{
  display:block;width:100%;
  padding:14px 18px;
  background:var(--blue,#00AEEF);color:#fff;
  border:none;border-radius:100px;cursor:pointer;
  font-family:var(--font-head,system-ui);
  font-weight:700;font-size:15px;letter-spacing:0.06em;text-transform:uppercase;
  transition:background .18s, transform .12s;
  line-height:1;
}
.aiuxqa-cart-checkout:hover:not(.disabled){
  background:#0091C7;transform:translateY(-1px);
}
.aiuxqa-cart-checkout.disabled,
.aiuxqa-cart-checkout:disabled{
  background:#ccc;cursor:not-allowed;
}

/* ── Toast notifications ──────────────────────────────────────────────────── */
.aiuxqa-cart-toast{
  position:fixed;bottom:20px;left:50%;
  transform:translateX(-50%) translateY(80px);
  background:#1a1040;color:#fff;
  padding:14px 22px;border-radius:8px;
  font-size:14px;line-height:1.4;
  max-width:min(460px, 90vw);
  box-shadow:0 8px 24px rgba(0,0,0,0.30);
  z-index:10000;
  opacity:0;
  transition:transform .26s ease, opacity .26s ease;
  pointer-events:none;
  text-align:center;
}
.aiuxqa-cart-toast.show{
  transform:translateX(-50%) translateY(0);
  opacity:1;
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width:520px){
  .aiuxqa-cart-drawer{width:100vw}
  .aiuxqa-cart-header{padding:14px 16px 12px}
  .aiuxqa-cart-items{padding:10px 16px}
  .aiuxqa-cart-footer{padding:14px 16px 18px}
}
