/* Sticky Add to cart bar, phones only, Accounts products only. Version 2: richer bar, corner-safe.
   Colours are the site's own (#5b6bbd). Every box has a fixed size so nothing moves when the price, badge or name change. */

/* room at the bottom of the page so the footer is never hidden behind the bar (66 px row + 18 px + 1 px border) */
@media (max-width:768px){
  body.al-satc-on{padding-bottom:calc(67px + max(18px,env(safe-area-inset-bottom,0px)))}
}

.al-satc{display:none}

@media (max-width:768px){
  .al-satc{
    display:block;position:fixed;left:0;right:0;bottom:0;z-index:90; /* below nav overlay 101/102, nav drawer 130, FunnelKit modal */
    background:#fff;border-top:1px solid #e4e6f0;box-shadow:0 -6px 18px rgba(10,12,30,.10);
    /* fixed padding, not only a safe-area value: iOS gives pages no bottom inset, and the screen's rounded corner
       would crowd the left edge. 18 px keeps the picture and price inside the curve of the newest iPhones. */
    padding-bottom:max(18px,env(safe-area-inset-bottom,0px));
    transform:translateY(100%);visibility:hidden;
    transition:transform .2s cubic-bezier(.2,.7,.2,1),visibility 0s linear .2s;
  }
  .al-satc.is-on{transform:translateY(0);visibility:visible;transition-delay:0s}

  .al-satc__in{height:66px;padding:10px 20px 0;display:flex;align-items:center;gap:10px}

  .al-satc__img{flex:none;width:52px;height:52px;border-radius:9px;object-fit:cover;background:#eceef6}

  .al-satc__info{flex:1;min-width:0;overflow:hidden;display:grid;gap:3px;align-content:center}
  /* name: two lines at most, then "…". Fixed height, so a short name does not move the price. */
  .al-satc__name{
    height:30px;max-height:30px;overflow:hidden;
    font-size:12px;line-height:15px;font-weight:700;color:#111;
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;
    overflow-wrap:anywhere;text-overflow:ellipsis;
  }
  /* price row: fixed height, badge and "In your cart" swap in the same place */
  .al-satc__price{height:20px;min-width:0;overflow:hidden;display:flex;align-items:center;gap:6px;white-space:nowrap}
  .al-satc__amount{font-size:17px;line-height:20px;font-weight:800;letter-spacing:-.01em;color:#111}
  .al-satc__save{font-style:normal;font-size:11px;line-height:14px;font-weight:800;color:#fff;background:#17794b;border-radius:99px;padding:2px 8px}
  .al-satc__in-cart{font-style:normal;font-size:12px;line-height:14px;font-weight:700;color:#17794b}

  .al-satc__btn{
    flex:none;width:108px;height:44px;border:0;border-radius:12px;background:#5b6bbd;color:#fff;
    font:inherit;font-size:14px;font-weight:700;white-space:nowrap;cursor:pointer;
  }
  .al-satc__btn:active{background:#505fb5}
  .al-satc__btn:focus-visible{outline:2px solid #5b6bbd;outline-offset:2px}
  .al-satc__btn.is-busy{background:#8e99d4;pointer-events:none}
  .al-satc__btn.is-done{background:#fff;color:#5b6bbd;border:2px solid #5b6bbd}
  /* the bar scrolls the form into view after a server-lock refusal: keep it clear of the sticky header */
  body.al-satc-on form.cart{scroll-margin-top:120px}
  .wbdl_widget select.quantity-break__attribute-option{scroll-margin-top:130px}
  /* badge: "Save $14.00", or "−$14.00" below 375 px where three-digit prices would not fit (Bob, 29 Oct) */
  .al-satc__save-m{display:none}
}
@media (max-width:374px){
  .al-satc__save-w{display:none}
  .al-satc__save-m{display:inline}
}

@media (prefers-reduced-motion:reduce){
  .al-satc{transition:none}
}
