/*
 * Cart, checkout and order-received — B5. WooCommerce's own CLASSIC markup
 * (cart/cart.php, checkout/form-checkout.php and its parts, checkout/
 * thankyou.php), styled through WooCommerce's own class names rather than
 * template overrides — the same pragmatic choice this theme already made
 * for the account-reset-password screen (B4): the markup is WooCommerce's
 * own and stable, and restyling it costs far less than reproducing it.
 *
 * requests.css (shayna-formfield, shayna-input, shayna-button) loads first;
 * this file only adds what WooCommerce's OWN classes need.
 */

.woocommerce {
  max-inline-size: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--space-7) var(--gutter) var(--band-gap);
}

/* ---------- Notices ---------- */

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  margin: 0 0 var(--space-5);
  padding: var(--space-3);
  list-style: none;
  border-inline-start: 3px solid var(--c-ink);
  font-size: var(--fs-sm);
}

.woocommerce-error li {
  margin: 0;
}

/* ---------- Cart table ---------- */

.shop_table {
  inline-size: 100%;
  border-collapse: collapse;
  margin-block-end: var(--space-6);
}

.shop_table th,
.shop_table td {
  padding: var(--space-3);
  text-align: start;
  border-block-end: 1px solid var(--color-rule);
  font-size: var(--fs-sm);
  vertical-align: middle;
}

.shop_table th {
  font-weight: var(--fw-medium);
  color: var(--color-text-dim);
}

.product-thumbnail img {
  inline-size: 4rem;
  block-size: auto;
  border-radius: var(--radius-xs);
}

.product-remove a.remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--target-min);
  block-size: var(--target-min);
  color: var(--color-text-dim);
  text-decoration: none;
  font-size: var(--fs-lead);
}

.product-remove a.remove:hover {
  color: var(--color-text);
}

.quantity .qty {
  inline-size: 5rem;
}

.cart-subtotal,
.order-total {
  font-weight: var(--fw-medium);
}

.actions {
  padding-block-start: var(--space-4);
}

.wc-proceed-to-checkout {
  margin-block-start: var(--space-5);
  text-align: end;
}

/* ---------- Buttons and inputs, WooCommerce's own classes ---------- */

.woocommerce .button,
.woocommerce input.button,
.woocommerce button.button,
#place_order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-block-size: var(--target-min);
  padding-inline: var(--space-5);
  padding-block: 0;
  border: 1px solid var(--c-ink);
  border-radius: var(--radius-pill, 999px);
  background: var(--c-ink);
  color: var(--c-paper);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
  cursor: pointer;
}

.woocommerce .button:hover,
#place_order:hover {
  opacity: 0.9;
}

.woocommerce .input-text,
.woocommerce select,
.woocommerce textarea {
  inline-size: 100%;
  min-block-size: var(--target-min);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-xs);
  background: var(--c-paper);
  color: var(--color-text);
  font: inherit;
}

.woocommerce .input-text:focus-visible,
.woocommerce select:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}

/* ---------- Checkout layout ---------- */

.checkout.woocommerce-checkout {
  display: grid;
  gap: var(--space-8);
}

.col2-set {
  display: grid;
  gap: var(--space-4);
}

.woocommerce-billing-fields__field-wrapper .form-row {
  display: grid;
  gap: var(--space-1);
  margin-block-end: var(--space-4);
}

.woocommerce-billing-fields__field-wrapper label {
  font-weight: var(--fw-medium);
}

.woocommerce-checkout-review-order-table {
  margin-block-start: var(--space-4);
}

/* The offer-price row a converted quote's line carries
   (shayna_cart_item_offer_note(), inc/shop.php). */
.wc-item-meta {
  margin: var(--space-1) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-xs);
  color: var(--color-text-dim);
}

/* ---------- Payment methods ---------- */

.wc_payment_methods {
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
}

.wc_payment_method {
  padding: var(--space-3);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-xs);
}

.payment_box {
  margin-block-start: var(--space-3);
  padding: var(--space-3);
  background: var(--c-berber, var(--color-field-border));
  border-radius: var(--radius-xs);
  font-size: var(--fs-sm);
}

.place-order {
  margin-block-start: var(--space-5);
}

/* ---------- Credit terms — B6 ---------- */

.sfc-credit-templates {
  display: grid;
  gap: var(--space-3);
}

.sfc-credit-template {
  display: block;
  padding: var(--space-3);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.sfc-credit-template ul {
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-xs);
  color: var(--color-text-dim);
}

/* The advance + cheque schedule on the order-received page. */
.sfc-schedule {
  margin-block: var(--space-4) var(--space-6);
}

/* ---------- Order received ---------- */

.woocommerce-order-overview {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-6);
  padding: var(--space-4);
  list-style: none;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-xs);
}

.woocommerce-order-overview li {
  font-size: var(--fs-sm);
}

.woocommerce-order-overview strong {
  display: block;
  font-weight: var(--fw-medium);
}

@media (min-width: 55rem) {
  .checkout.woocommerce-checkout {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: start;
  }
}
