/*
 * replica-drawer.css - Area E (cart drawer): what the theme CSS does not cover inside <dialog class="cart-drawer__dialog">.
 *
 * The Horizon drawer itself (dialog, header with the count bubble, rows, quantity selector, discount accordion, totals,
 * tax note, checkout button, full width under 750px) is styled by base.css + styles.css already. This file adds the two
 * blocks that come from outside the compiled theme CSS on the live store (reference: raw/live/reference/cart-drawer-spec.md):
 *  1. "Why Us?": the owner's block in snippets/cart-summary.liquid of the theme; its {% stylesheet %} is not part of the
 *     styles.css we copied, so the rules are ported here with the same values (they style the cart page block too);
 *  2. the Shipping protection row: the Shipcheck app widget injected at runtime on the live store (markup in
 *     templates/partials/shipping-protection.html, CSS ported from the app's inline <style> in raw/live/home.html with
 *     our own class names: asc-widget-* -> ub-ship__*).
 * There is NO totals row for the fee (QA round 3: the live cart page shows only "Estimated total", the fee lives on the
 * toggle and becomes a line item at the checkout).
 */

/* ============================================================ 1. "Why Us?" (port of the theme snippet stylesheet) */
/* No width here: the live rule has none, so inside .cart-summary__inner (flex column, align-items: center) the block is
   shrink-wrapped to its widest row and centered (1440: divider 1086-1393 in a 1080-1399 column; 390: 41-348). */
.ub-why {
  margin: 12px 0 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, .07);
}
.ub-why__h {
  margin: 0 0 10px;
  text-align: center;
  font-size: .85rem;
  font-weight: 500;
  opacity: .45;
  line-height: 1.15;
}
.ub-why__item { display: flex; align-items: center; gap: 10px; }
.ub-why__item + .ub-why__item { margin-top: 12px; }
.ub-why__ico { width: 17px; height: 17px; flex: 0 0 17px; opacity: .8; }
.ub-why__txt { min-width: 0; }
.ub-why__t { margin: 0; font-size: .98rem; font-weight: 650; line-height: 1.25; }
.ub-why__s { margin: 1px 0 0; font-size: .88rem; line-height: 1.3; opacity: .5; }

/* ============================================================ 2. Shipping protection row (Shipcheck widget port) */
.ub-ship,
.ub-ship * { box-sizing: border-box; }
.ub-ship {
  display: block;
  position: relative;
  width: 100%;
  margin: 0 0 8px;
  border: .5px solid #ffffff;
  border-radius: 0;
  background-color: #ffffff;
  text-align: left;
}
.ub-ship[hidden] { display: none; }
.ub-ship__main {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 15px;
  padding: 12px;
}
.ub-ship__img {
  display: block;
  width: 45px;
  height: 45px;
  max-width: 45px;
  max-height: 45px;
  flex: 0 0 45px;
  border-radius: 0;
  object-fit: contain;
}
.ub-ship__content {
  display: flex;
  flex-direction: column;
  gap: 2.5px;
  flex: 1 1 auto;
  min-width: 0;
}
.ub-ship__title-row { display: flex; align-items: flex-start; justify-content: flex-start; }
.ub-ship__title,
.ub-ship__title span {
  display: inline-block;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: inherit;
  text-transform: none;
  text-decoration: none;
  text-align: left;
  color: #2c3031;
}
.ub-ship__title { flex: 1 1 auto; }
.ub-ship__body,
.ub-ship__body span {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 11px;
  font-style: normal;
  line-height: 1.4;
  letter-spacing: inherit;
  text-align: left;
  color: #6f767a;
}
/* the switch: a 36x22 pill, grey when off, green (#00C888) when on, white knob with a check mark drawn in */
.ub-ship button.ub-ship__switch {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  flex: 0 0 36px;
  align-self: flex-start;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 0;
  font-size: 0;
  color: inherit;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  appearance: none;
  -webkit-appearance: none;
}
.ub-ship button.ub-ship__switch:disabled { cursor: not-allowed; opacity: .6; }
.ub-ship button.ub-ship__switch:focus-visible { outline: 2px solid #00c888; outline-offset: 2px; border-radius: 100px; }
.ub-ship__slide {
  display: block;
  position: absolute;
  inset: 0;
  border-radius: 100px;
  border: 1px solid #bbc3c8;
  background: #bbc3c8;
  transition: background .12s ease-out, border-color .12s ease-out;
  overflow: visible;
}
.ub-ship__switch[aria-checked="true"] .ub-ship__slide { background: #00c888; border-color: #00c888; }
.ub-ship__knob {
  position: absolute;
  top: 50%;
  left: 1px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: left .12s ease-out, background .12s ease-out;
}
.ub-ship__switch[aria-checked="true"] .ub-ship__knob { left: 15px; background: #ffffff; }
.ub-ship__check { width: 9px; height: 7px; flex-shrink: 0; }
.ub-ship__check-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke: #00c888;
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.ub-ship__switch[aria-checked="true"] .ub-ship__check-path { stroke-dashoffset: 0; transition: stroke-dashoffset .12s ease-out .12s; }
@media (prefers-reduced-motion: reduce) {
  .ub-ship__slide, .ub-ship__knob, .ub-ship__check-path { transition: none; }
}

/* ============================================================ 3. drawer polish */
/* The drawer summary is a flex column (align-items: center). The protection row takes the full width like the theme blocks.
   The "Why Us?" block, when it is rendered in the drawer, is NOT stretched: the live drawer (QA cd1, cart-drawer-1440-live.png)
   shrink-wraps it to its widest line and centers it, exactly like the cart page (divider x 1086-1393 in the 1064-1416 column,
   icons 23 px and texts 50 px inside). The block is out of the drawer and the cart page since 04/10 (owner: checkout only). */
.cart-drawer__summary .ub-why { width: fit-content; max-width: 100%; align-self: center; margin-inline: auto; }
.cart-drawer__summary .cart__ctas .ub-ship { width: 100%; }
/* the amount in the toggle title and the total value shimmer together while a request runs */
[data-cart-drawer-subtotal][shimmer],
[data-cart-subtotal][shimmer] { opacity: .5; transition: opacity .12s ease-out; }
/* phone: the live drawer takes the whole viewport (same rule as the theme, restated in case the layout shell adds a width) */
@media screen and (max-width: 749px) {
  #cart-drawer.cart-drawer__dialog { width: 100%; max-width: 100%; }
}
