/**
 * Account4All — Cart completion · Stage 5 (v1.8.0)
 * -------------------------------------------------------------------------
 * CSS-only restyle scoped to body.woocommerce-cart. Form structure, input
 * names, WC hooks, .cart-collaterals wrapper and the Turbo coupon handler
 * (public/js/a4a-cart-coupon.js) are untouched. Token-only colors.
 */

body.woocommerce-cart {
  background: var(--bg-soft) !important;
}

/* ---- Page title ---------------------------------------------------------- */
body.woocommerce-cart .section .title,
body.woocommerce-cart h1 {
  color: var(--ink-900);
  font-weight: var(--fw-extrabold);
}

/* ---- Cart item rows ------------------------------------------------------- */
body.woocommerce-cart .cart-item {
  border: 1px solid var(--line);
  border-radius: var(--r-lg) !important;
  box-shadow: var(--sh-card);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
body.woocommerce-cart .cart-item:hover {
  border-color: var(--pale-lilac);
}
body.woocommerce-cart .cart-item img {
  border-radius: var(--r-md) !important;
}
body.woocommerce-cart .cart-item .has-text-dark.has-text-weight-bold {
  color: var(--ink-900) !important;
}
body.woocommerce-cart .cart-item .cart-metadata,
body.woocommerce-cart .cart-item .tag {
  color: var(--fg-3);
}
body.woocommerce-cart .cart-item .cart-metadata .tag {
  background: var(--bg-soft) !important;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 11px;
}
body.woocommerce-cart .cart-item .item-total-price {
  color: var(--ink-900);
}
body.woocommerce-cart .cart-item .delete-item {
  color: var(--fg-4);
  transition: color var(--dur) var(--ease);
}
body.woocommerce-cart .cart-item .delete-item:hover {
  color: var(--danger);
}

/* Quantity stepper */
body.woocommerce-cart .cart-item input.qty,
body.woocommerce-cart .quantity input {
  background: var(--bg-soft) !important;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--fg-1);
  font-family: inherit;
  text-align: center;
}
body.woocommerce-cart .cart-item input.qty:focus,
body.woocommerce-cart .quantity input:focus {
  border-color: var(--brand-blue-accent);
  box-shadow: var(--focus-ring);
  outline: none;
}

/* ---- Coupon row ------------------------------------------------------------ */
/* RTL: input sits on the RIGHT of the addon row, button on the LEFT —
   outer corners rounded, interior joint square. */
body.woocommerce-cart .coupon .input {
  min-height: 46px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 0 var(--r-md) var(--r-md) 0 !important;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--fg-1);
  box-shadow: none;
}
body.woocommerce-cart .coupon .input:focus {
  border-color: var(--brand-blue-accent);
  box-shadow: var(--focus-ring);
}
body.woocommerce-cart .coupon .button {
  min-height: 46px;
  background-color: var(--brand-blue);
  background-image: none;
  color: var(--surface);
  border: 0;
  border-radius: var(--r-md) 0 0 var(--r-md) !important;
  font-weight: var(--fw-bold);
}
body.woocommerce-cart .coupon .button:hover {
  background-color: var(--brand-blue-hover);
  color: var(--surface);
}
body.woocommerce-cart .coupon .button.background_purple_fill::before,
body.woocommerce-cart .coupon .button.background_purple_fill_hover::before {
  content: none;
}

/* ---- Totals ---------------------------------------------------------------- */
body.woocommerce-cart .cart_totals .cart-discount .tag.is-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--r-pill);
  font-weight: var(--fw-bold);
}
body.woocommerce-cart .order-total {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
}
body.woocommerce-cart .order-total .order-total-content {
  color: var(--ink-900);
  font-size: 16px;
}

/* ---- Actions ---------------------------------------------------------------- */
/* Checkout CTA (keeps flat #000aff!important from app.css as fallback layer) */
body.woocommerce-cart .button.is-success.background_purple {
  background-image: var(--grad-primary);
  border: 0;
  border-radius: var(--r-md) !important;
  min-height: 54px;
  padding-inline: 30px;
  font-size: 15.5px;
  font-weight: var(--fw-bold);
  box-shadow: 0 10px 26px rgba(74, 104, 255, 0.32);
  transition: box-shadow var(--dur) var(--ease);
}
body.woocommerce-cart .button.is-success.background_purple::before {
  content: none;
}
body.woocommerce-cart .button.is-success.background_purple:hover {
  background-image: none;
  box-shadow: none;
}
body.woocommerce-cart .button.is-success.background_purple:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
/* Return-to-shop ghost button */
body.woocommerce-cart .button.is-info.is-outlined {
  background: var(--surface);
  border: 1.5px solid var(--pale-lilac);
  border-radius: var(--r-md) !important;
  color: var(--brand-blue-accent);
  font-weight: var(--fw-bold);
}
body.woocommerce-cart .button.is-info.is-outlined:hover {
  background: var(--bg-lilac);
  border-color: var(--brand-blue-accent);
  color: var(--brand-blue-accent);
}

/* ---- Empty cart -------------------------------------------------------------- */
body.woocommerce-cart .box.has-background-grey {
  background: var(--surface) !important;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-card);
}
body.woocommerce-cart .box.has-background-grey .has-text-white {
  color: var(--fg-2) !important;
}
body.woocommerce-cart .box.has-background-grey .button.is-white {
  background-color: var(--brand-blue);
  background-image: var(--grad-primary);
  color: var(--surface);
  border-radius: var(--r-md);
  min-height: 48px;
  padding-inline: 26px;
  font-weight: var(--fw-bold);
  box-shadow: 0 10px 26px rgba(74, 104, 255, 0.32);
}
body.woocommerce-cart .box.has-background-grey .button.is-white:hover {
  background-image: none;
  box-shadow: none;
  color: var(--surface);
}

/* ---- Cross-sells (light card touch) ------------------------------------------ */
body.woocommerce-cart .cross-sells .has-background-white.is-border-radius-20.p-3 {
  border: 1px solid var(--line);
  border-radius: var(--r-lg) !important;
  box-shadow: var(--sh-card);
}

/* ---- Info side box (mobile note) ---------------------------------------------- */
body.woocommerce-cart .box.has-background-info {
  background: var(--notice-bg) !important;
  color: var(--brand-indigo) !important;
  border-radius: var(--r-lg);
  box-shadow: none;
}

/* ---- Responsive ---------------------------------------------------------------- */
@media screen and (max-width: 768px) {
  body.woocommerce-cart .button.is-success.background_purple {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.woocommerce-cart .cart-item {
    transition-duration: 0.001ms !important;
  }
}
