/* TP_DISCOUNT_LINES_V1 · Tattoo Proton 26/11/2026
   Cart, checkout and order summaries list every discount on its own line
   (name + amount). Presentation only. */

/* Payment step ("check your order before payment"): the legacy V10x rules hid
   the 2nd and 4th rows of this summary, which were the discount and the
   taxes. Rows are now one per discount, so every row with content is shown;
   genuinely empty rows stay hidden by the existing :empty rules. */
html body#checkout #checkout-payment-step #order-summary-content
.order-confirmation-table > .cart-summary > .row > .cart-summary-line:not(:empty) {
  display: grid !important;
}

/* One row per line (subtotal, each discount, shipping, taxes, total), read top
   to bottom like the cart; the previous 3-column tiles do not fit a variable
   number of discount lines. */
html body#checkout #checkout-payment-step #order-summary-content
.order-confirmation-table > .cart-summary > .row {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
}

/* Long discount names wrap instead of pushing the amount out of the box. */
html body#cart .cart-grid-bottom .cart-detailed-totals
.cart-summary-line.tp-discount-line:not(.cart-total),
html body#checkout #js-checkout-summary
.cart-summary-line.tp-discount-line:not(.cart-total),
html body#checkout .cart-grid-right > .cart-summary
.cart-summary-line.tp-discount-line:not(.cart-total),
html body#order-confirmation #order-items
.cart-summary-line.tp-discount-line:not(.cart-total) {
  grid-template-columns: minmax(0, auto) minmax(14px, 1fr) max-content !important;
}

.cart-summary-line.tp-discount-line .label {
  min-width: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  line-height: 1.35 !important;
}

.cart-summary-line.tp-discount-line .value {
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}

/* Remove link of a voucher with a code (cart page). */
.cart-summary-line.tp-discount-line .tp-discount-line__remove {
  float: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  margin: 0 0 0 6px !important;
  padding: 0 !important;
  vertical-align: middle !important;
  font-size: 16px !important;
  line-height: 1 !important;
  opacity: .55 !important;
  text-shadow: none !important;
}

.cart-summary-line.tp-discount-line .tp-discount-line__remove:hover,
.cart-summary-line.tp-discount-line .tp-discount-line__remove:focus {
  opacity: 1 !important;
}
