/*
 * Checkout.
 *
 * 1. Button spacing (Calder's note): on a phone the page's actions ("Continue
 *    to review" and "Go back") follow the sidebar. They used to touch the
 *    sidebar's last button; now they have a clear gap with a hairline above
 *    them, and "Go back" sits level with its button. (The coupon field that
 *    ended the sidebar is off since calder_shop update 10010, Nov 14: the shop
 *    sells no coupon codes.) The shop's one shipping rate is a plain line in
 *    the shipping step (.shop-one-rate, from calder_shop), not a radio button.
 * 2. The order summary: a small thumbnail of the item, its title and
 *    quantity, and the line total (the view is edited by calder_shop update
 *    10003; there are no Price or Stock level lines to style any more).
 */

/* --- 1. Buttons that stack ------------------------------------------- */

.calder-shop .layout-region-checkout-footer {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-border, #dfd8c8);
}

.calder-shop .layout-region-checkout-footer .form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.5rem;
  margin: 0;
}

.calder-shop .layout-region-checkout-footer .form-actions .link--previous {
  display: inline-block;
  padding-block: 0.6rem;
}

/* --- 1b. Where the shop ships ------------------------------------------ */

/* The line at the top of Shipping information ("We ship within the United States."). It wears the egg of
   .shop-price__note; this only gives it room above the address. */
.calder-shop .shop-ships-where {
  margin: 0 0 1rem;
}

/* The one shipping rate, printed after the address in the rate's own words
   ("Free Shipping: $0.00"); the same egg and weight as the line above. */
.calder-shop .shop-one-rate {
  margin: 1rem 0 0;
}

/* --- 2. The order summary -------------------------------------------- */

.calder-shop .checkout-pane-order-summary table,
.calder-shop .checkout-pane-order-summary tbody {
  display: block;
  width: 100%;
}

.calder-shop .checkout-pane-order-summary tr {
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr) auto;
  grid-template-areas:
    "thumb title total"
    "thumb qty   total";
  column-gap: 0.9rem;
  row-gap: 0.1rem;
  align-items: center;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--color-border, #dfd8c8);
}

.calder-shop .checkout-pane-order-summary td {
  display: block;
  padding: 0;
  border: 0;
}

.calder-shop .checkout-pane-order-summary .views-field-field-images {
  grid-area: thumb;
}

.calder-shop .checkout-pane-order-summary .views-field-field-images img {
  width: 3.75rem;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 2px solid var(--color-ink, #242015);
  border-radius: 0.4rem;
  background: var(--color-surface, #fff);
}

.calder-shop .checkout-pane-order-summary .views-field-title {
  grid-area: title;
  align-self: end;
  font-weight: 700;
  line-height: 1.25;
}

.calder-shop .checkout-pane-order-summary .views-field-quantity {
  grid-area: qty;
  align-self: start;
  color: var(--color-muted, #6b6252);
  font-size: 0.9rem;
}

.calder-shop .checkout-pane-order-summary .views-field-total-price__number {
  grid-area: total;
  font-weight: 700;
  white-space: nowrap;
}
