/* Bag and checkout, the parts every style shares (includes/checkout.php). Structure only:
   each store's look is in its own assets/checkout/<style>.css, loaded after this. */

/* WooCommerce's country picker shrank to its text ("United Kingdom (UK)" in a 130px box) on every store. */
html body.rs-co .woocommerce form .form-row .select2-container { width: 100% !important; }
html body.rs-co .woocommerce form .form-row .select2-container .select2-selection--single { display: flex; align-items: center; }
/* With one country it is a plain select (country_to_state--single), and it shrank the same way. */
html body.rs-co .woocommerce form .form-row select { width: 100%; max-width: none; }
/* Columns hold their content, not the height of the column beside them. */
html body.rs-co :is(.e-cart__column-start, .e-checkout__column-start) { align-self: start; }
/* The summary's name column had been squeezed to three words a line by a wide price column. */
html body.rs-co .woocommerce-checkout-review-order-table td.product-total { width: 1%; white-space: nowrap; }

/* Steps. */
.rs-co-steps { margin: 0 0 28px; }
.rs-co-steps ol { display: flex; margin: 0; padding: 0; list-style: none; }
.rs-co-steps li { display: flex; align-items: center; min-width: 0; }
.rs-co-steps a { display: contents; color: inherit !important; text-decoration: none !important; }
.rs-co-steps__t { white-space: nowrap; }

/* Free delivery. */
.rs-co-free { margin: 0 0 20px; }
.rs-co-free__t { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 15px; line-height: 1.35; }
.rs-co-free__t .rs-co-ico { flex: none; }
.rs-co-free__bar { position: relative; height: 4px; overflow: hidden; background: color-mix(in srgb, currentColor 14%, transparent); }
.rs-co-free__bar span { position: absolute; inset: 0 auto 0 0; background: currentColor; transition: width 400ms cubic-bezier(0.23, 1, 0.32, 1); }

/* Assurances. */
.rs-co-assure { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.35; }
.rs-co-assure li { display: flex; align-items: center; gap: 10px; }
.rs-co-assure .rs-co-ico { flex: none; }

/* Photos in the checkout summary. */
html body.rs-co .woocommerce-checkout-review-order-table td.product-name { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: start; }
html body.rs-co .woocommerce-checkout-review-order-table td.product-name > :not(.rs-co-thumb) { grid-column: 2; }
.rs-co-thumb { grid-row: 1 / span 4; display: block; width: 56px; }
.rs-co-thumb img { display: block; width: 100%; height: auto !important; aspect-ratio: 1; object-fit: cover; }

/* Phone total. */
.rs-co-mini { display: none; }
@media (max-width: 767px) {
	.rs-co-mini { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 20px; min-height: 52px; padding: 0 16px; text-decoration: none !important; color: inherit; }
	.rs-co-mini__n { opacity: .72; }
	.rs-co-steps__t { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .rs-co-free__bar span { transition: none; } }

/* Both summaries are laid out as rows of label and amount rather than as tables. Elementor caps the cells
   at 70px (delivery choices a word a line, prices off a phone screen), a grid row inside a table is
   squeezed into the first column, and the bag totals hid their labels behind td::before. The delivery
   row runs full width under its label. */
html body.rs-co :is(.woocommerce-checkout-review-order-table, .cart_totals table) { display: block !important; width: 100%; table-layout: auto !important; }
html body.rs-co :is(.woocommerce-checkout-review-order-table, .cart_totals table) :is(tbody, tfoot) { display: block !important; }
html body.rs-co .woocommerce-checkout-review-order-table thead { display: none !important; }
html body.rs-co :is(.woocommerce-checkout-review-order-table, .cart_totals table) tr { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0; align-items: baseline; }
html body.rs-co :is(.woocommerce-checkout-review-order-table, .cart_totals table) tr > * + * { padding-left: 16px !important; }
html body.rs-co :is(.woocommerce-checkout-review-order-table, .cart_totals table) tr > * { display: block !important; width: auto !important; max-width: none !important; }
html body.rs-co :is(.woocommerce-checkout-review-order-table, .cart_totals table) tr > td:last-child:not(:first-child) { text-align: right !important; }
html body.rs-co :is(.woocommerce-checkout-review-order-table, .cart_totals table) td::before { content: none !important; display: none !important; }
html body.rs-co :is(.woocommerce-checkout-review-order-table, .cart_totals table) tr.woocommerce-shipping-totals { grid-template-columns: 1fr; }
html body.rs-co :is(.woocommerce-checkout-review-order-table, .cart_totals table) tr.woocommerce-shipping-totals > * { text-align: left !important; }
html body.rs-co :is(.woocommerce-checkout-review-order-table, .cart_totals table) tr.woocommerce-shipping-totals > th { padding-bottom: 2px !important; }
html body.rs-co :is(.woocommerce-checkout-review-order-table, .cart_totals table) tr.order-total { align-items: center; }
html body.rs-co .woocommerce-checkout-review-order-table tr.cart_item { align-items: stretch; }
/* The photo beside the name, which the row reset above would otherwise flatten. */
html body.rs-co .woocommerce-checkout-review-order-table tr > td.product-name { display: grid !important; }
html body.rs-co #shipping_method { margin: 0; padding: 0; list-style: none; }
html body.rs-co #shipping_method li { display: flex; align-items: flex-start; gap: 8px; text-align: left; }
html body.rs-co #shipping_method li input { margin: 3px 0 0 !important; flex: none; }

/* The bag on a phone: WooCommerce stacks each line into "Price: / Quantity: / Subtotal:" rows and hides
   the photo. Each line is a card instead: photo, name, price, quantity, line total. */
@media (max-width: 767px) {
	html body.rs-co .shop_table.cart thead { display: none; }
	html body.rs-co .shop_table.cart tr.cart_item { display: grid !important; grid-template-columns: 84px minmax(0, 1fr) auto; grid-template-areas: "img name x" "img price price" "img qty sub"; column-gap: 14px; row-gap: 6px; align-items: center; padding: 18px 0; }
	html body.rs-co .shop_table.cart tr.cart_item > td { display: block !important; padding: 0 !important; border: 0 !important; text-align: left !important; background: none !important; }
	html body.rs-co .shop_table.cart tr.cart_item > td::before { content: none !important; display: none !important; }
	html body.rs-co .shop_table.cart td.product-thumbnail { grid-area: img; align-self: start; }
	html body.rs-co .shop_table.cart td.product-thumbnail img { width: 84px !important; max-width: none; }
	html body.rs-co .shop_table.cart td.product-name { grid-area: name; }
	html body.rs-co .shop_table.cart td.product-remove { grid-area: x; align-self: start; justify-self: end; }
	html body.rs-co .shop_table.cart td.product-price { grid-area: price; font-size: 14px; }
	html body.rs-co .shop_table.cart td.product-quantity { grid-area: qty; }
	html body.rs-co .shop_table.cart td.product-subtotal { grid-area: sub; justify-self: end; font-weight: 600; }
	html body.rs-co .shop_table.cart td.product-quantity .quantity { justify-content: flex-start; }
}

/* Notices: an even hairline, never a thick coloured side edge (live shop.css is older and still has one). */
html body.rs-co :is(.woocommerce-message, .woocommerce-info) { border: 1px solid var(--rs-line) !important; }

/* rs-polish-20261019 */
html body.rs-co .shop_table.cart a.remove { display: inline-grid !important; place-items: center; width: 32px !important; height: 32px !important; line-height: 1 !important; border-radius: 50%; }
html body.rs-co .coupon .coupon-col { flex: 1 1 auto !important; width: 100% !important; display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
html body.rs-co .coupon .coupon-col > :is(.coupon-col-start, .coupon-col-end) { min-width: 0; width: auto !important; margin: 0 !important; padding: 0 !important; }
html body.rs-co .coupon .coupon-col :is(input.input-text, .button) { width: 100% !important; height: 100% !important; margin: 0 !important; }
html body.rs-co .coupon .coupon-col::before, html body.rs-co .coupon .coupon-col::after { content: none !important; display: none !important; }
html body.rs-co .woocommerce-info.cart-empty { border: 0 !important; background: none !important; padding: 8px 0 !important; box-shadow: none !important; }
