/* Generated by astro-product/scripts/sync-core.mjs from packages/foundation/components/cart. Do not edit. */
/**
 * cart: WooCommerce's Cart block in the style of the shop cart (new-woocommerce.sketch, Shop Cart). WooCommerce keeps
 * its layout: the lines with a 390px totals column next to them from 920px of cart width (its container breakpoint),
 * under them below. From the design: a bold header (16) over a hairline, 132×128 grey photo boxes with a black 20×20
 * remove square 47px to their left, the name and price (16, medium), a framed 50px quantity, the line total at the end;
 * the totals (16, bold) between hairlines and a 50px black checkout button (the design's green follows the mini-cart's
 * black). The rules repeat the layout of WooCommerce's block styles so the reference (without them) matches; rules that
 * must win over those styles carry the root class and WooCommerce's own classes.
 */
:where(.rt-cart) {
	color: var(--rt-color-contrast);
}

.rt-cart {
	--rt-cart-thumb: 8.25rem;
	--rt-cart-remove-size: 1.25rem;
	--rt-cart-indent: 4.1875rem;
	--rt-cart-row-gap: 1.875rem;
	--rt-cart-sidebar: 24.375rem;
	--rt-cart-control: 3.125rem;
	container-type: inline-size;
	box-sizing: border-box;
	width: 100%;
	font-family: var(--rt-font-family-body);
	font-size: var(--rt-font-size-base);
	line-height: 1.4;
}

.rt-cart [hidden] {
	display: none;
}

.rt-cart .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.rt-cart a {
	color: inherit;
	text-decoration: none;
	text-underline-offset: 0.1875rem;
}

/* Notices (an item could not be updated, a coupon was applied): square, with a coloured edge. */
.rt-cart .wc-block-components-notices:not(:has(*)) {
	display: none;
}

.rt-cart .wc-block-components-notices .wc-block-components-notice-banner {
	margin: 0 0 1.25rem;
	border: 1px solid var(--rt-cart-line);
	border-inline-start: 3px solid var(--rt-color-contrast);
	border-radius: 0;
	background: var(--rt-color-base);
	color: inherit;
	font-size: var(--rt-font-size-small);
}

.rt-cart .wc-block-components-notices .wc-block-components-notice-banner > svg {
	border-radius: 0;
	background: var(--rt-color-contrast);
}

/* Layout: lines and totals side by side from 920px, as in WooCommerce. Its loading skeleton (a copy of the layout)
   keeps WooCommerce's own display rules, which hide it once the cart has loaded. */
.rt-cart .wc-block-components-sidebar-layout.wc-block-cart:not(.wc-block-cart--skeleton) {
	display: flex;
	flex-direction: column;
	gap: 3.75rem;
	margin: 0;
	padding: 0;
}

.rt-cart .wc-block-cart .wc-block-components-main {
	flex: 1 1 0%;
	box-sizing: border-box;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.rt-cart .wc-block-cart .wc-block-components-sidebar.wc-block-cart__sidebar {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0;
}

.rt-cart .wc-block-components-sidebar-layout.wc-block-cart[hidden] {
	display: none;
}

@container (width >= 57.5rem) {
	.rt-cart .wc-block-components-sidebar-layout.wc-block-cart:not(.wc-block-cart--skeleton) {
		flex-direction: row;
		align-items: flex-start;
	}

	.rt-cart .wc-block-cart .wc-block-components-sidebar.wc-block-cart__sidebar {
		flex: 0 0 var(--rt-cart-sidebar);
		width: var(--rt-cart-sidebar);
	}
}

/* Lines: header, then photo box, details (name, price, variation, quantity) and line total per row. */
.rt-cart .wc-block-cart table.wc-block-cart-items {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
	border-bottom: 1px solid var(--rt-cart-line);
	border-collapse: collapse;
}

.rt-cart table.wc-block-cart-items thead,
.rt-cart table.wc-block-cart-items tbody {
	display: block;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header,
.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
	position: relative;
	display: grid;
	grid-template-columns: var(--rt-cart-thumb) minmax(0, 1fr) auto;
	column-gap: 3.6875rem;
	padding: 0 0 0 var(--rt-cart-indent);
	border: 0;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header {
	padding-block-end: 1.375rem;
	border-bottom: 1px solid var(--rt-cart-line);
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-bold);
	line-height: 1.2;
	text-transform: none;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header th {
	width: auto;
	padding: 0;
	border: 0;
	font-weight: inherit;
	text-align: start;
	white-space: nowrap;
}

/* The header's "Product" sits over the names, as in the design; the details cell's header is for screen readers. */
.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image {
	grid-column: 2;
	grid-row: 1;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-product {
	grid-column: 1;
	grid-row: 1;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-total {
	grid-column: 3;
	grid-row: 1;
	text-align: end;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
	padding-block-start: var(--rt-cart-row-gap);
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row:last-child {
	padding-block-end: var(--rt-cart-row-gap);
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row[hidden] {
	display: none;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row td {
	margin: 0;
	padding: 0;
	border: 0;
	vertical-align: top;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
	grid-column: 1;
	grid-row: 1;
	padding: 0;
}

.rt-cart .wc-block-cart-item__image a {
	display: block;
	aspect-ratio: 33 / 32;
	background: var(--rt-cart-surface);
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image img {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0.75rem;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product {
	grid-column: 2;
	grid-row: 1;
	align-self: center;
	min-width: 0;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.375rem;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
	display: block;
	max-width: 100%;
	color: inherit;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-medium);
	line-height: 1.4;
	text-decoration: none;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row a.wc-block-components-product-name:hover,
.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row a.wc-block-components-product-name:focus-visible {
	text-decoration: underline;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices {
	display: flex;
	gap: var(--rt-spacing-20);
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-medium);
	line-height: 1.4;
}

.rt-cart .wc-block-cart-item__prices .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.375rem;
}

.rt-cart .wc-block-cart-item__prices del {
	color: var(--rt-cart-old-price);
	font-weight: var(--rt-font-weight-regular);
}

.rt-cart .wc-block-cart-item__prices ins {
	text-decoration: none;
}

/* Variation and other item data under the price (Color: Grey). */
.rt-cart .wc-block-components-product-metadata:not(:has(*)) {
	display: none;
}

.rt-cart .wc-block-components-product-metadata .wc-block-components-product-details {
	margin: 0;
	padding: 0;
	color: var(--rt-cart-old-price);
	font-size: var(--rt-font-size-small);
	list-style: none;
}

.rt-cart .wc-block-components-product-metadata__description:empty {
	display: none;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity {
	display: flex;
	align-items: center;
	padding-block-start: 0.375rem;
}

/* Quantity: the design's framed 50px box, with WooCommerce's − and + inside. */
.rt-cart .wc-block-cart-item__quantity .wc-block-components-quantity-selector {
	display: flex;
	box-sizing: border-box;
	width: 6.5rem;
	min-width: 0;
	height: var(--rt-cart-control);
	margin: 0;
	border: 1px solid var(--rt-cart-field-border);
	border-radius: 0;
}

.rt-cart .wc-block-cart-item__quantity .wc-block-components-quantity-selector[hidden] {
	display: none;
}

.rt-cart .wc-block-cart-item__quantity .wc-block-components-quantity-selector::after {
	content: none;
}

.rt-cart .wc-block-cart-item__quantity .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	flex: 1 1 auto;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-family: inherit;
	font-size: var(--rt-font-size-small);
	font-weight: var(--rt-font-weight-bold);
	text-align: center;
	appearance: textfield;
}

.rt-cart .wc-block-components-quantity-selector__input::-webkit-inner-spin-button,
.rt-cart .wc-block-components-quantity-selector__input::-webkit-outer-spin-button {
	margin: 0;
	appearance: none;
}

.rt-cart .wc-block-cart-item__quantity .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	flex: 0 0 1.75rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-family: inherit;
	font-size: var(--rt-font-size-base);
	opacity: 0.6;
	cursor: pointer;
}

.rt-cart .wc-block-cart-item__quantity .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover {
	opacity: 1;
}

.rt-cart .wc-block-cart-item__quantity .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled {
	opacity: 0.3;
	cursor: default;
}

.rt-cart .wc-block-cart-item__quantity .wc-block-components-quantity-selector :focus-visible {
	outline: 2px solid var(--rt-color-accent);
	outline-offset: -2px;
	box-shadow: none;
}

/* Remove: the design's black square with a white cross, left of the photo box and centred on it. */
.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
	position: absolute;
	top: calc(var(--rt-cart-row-gap) + var(--rt-cart-thumb) * 16 / 33 - var(--rt-cart-remove-size) / 2);
	inset-inline-start: 0;
	display: block;
	width: var(--rt-cart-remove-size);
	height: var(--rt-cart-remove-size);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--rt-cart-remove);
	box-shadow: none;
	color: var(--rt-cart-remove-icon);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link[hidden] {
	display: none;
}

.rt-cart .wc-block-cart-item__remove-link svg {
	display: none;
}

.rt-cart .wc-block-cart-item__remove-link::before,
.rt-cart .wc-block-cart-item__remove-link::after {
	position: absolute;
	inset: 50% auto auto 50%;
	width: 0.5rem;
	height: 1.5px;
	background: currentColor;
	content: "";
	transform: translate(-50%, -50%) rotate(45deg);
}

.rt-cart .wc-block-cart-item__remove-link::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover,
.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus-visible {
	background: var(--rt-cart-action-hover);
	color: var(--rt-cart-action-hover-text);
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus-visible {
	outline: 2px solid var(--rt-color-contrast);
	outline-offset: 2px;
}

.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
	display: flex;
	grid-column: 3;
	grid-row: 1;
	align-self: center;
	justify-content: flex-end;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-medium);
	line-height: 1.4;
	text-align: end;
}

.rt-cart .wc-block-cart-item__total-price-and-sale-badge-wrapper {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.375rem;
}

.rt-cart .wc-block-cart-item__total .wc-block-components-sale-badge {
	margin: 0;
	padding: 0.125rem 0.375rem;
	border: 0;
	border-radius: 0;
	background: var(--rt-cart-sale);
	color: var(--rt-cart-sale-text);
	font-size: var(--rt-font-size-x-small);
	font-weight: var(--rt-font-weight-medium);
	line-height: 1.4;
	white-space: nowrap;
}

/* Headings: the totals title, the cross-sells and the empty cart's lists (the design's "Cart Total", 26 bold). */
.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-cart__totals-title,
.rt-cart .rt-cart__heading,
.rt-cart h2.wc-block-cart__empty-cart__title,
.rt-cart h2:has(+ .rt-cart__new) {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-family: inherit;
	font-size: var(--rt-font-size-large);
	font-weight: var(--rt-font-weight-bold);
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
}

.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-cart__totals-title {
	margin-block-end: 1.25rem;
}

/* In the editor the title is a plain text field. */
.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-cart__totals-title textarea {
	margin: 0;
	padding: 0;
	border: 0;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
}

/* Totals: coupon, subtotal, fees, shipping and total between hairlines (16, bold), then the checkout button. */
.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--rt-cart-line);
}

.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper:empty,
.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper:has(> :only-child:empty) {
	border-top-width: 0;
}

.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper::after {
	content: none;
}

.rt-cart .wc-block-cart .wc-block-cart__sidebar > :first-child {
	margin: 0 0 1.875rem;
	border-bottom: 1px solid var(--rt-cart-line);
	font-size: var(--rt-font-size-base);
	line-height: 1.4;
}

.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem var(--rt-spacing-30);
	box-sizing: border-box;
	margin: 0;
	padding: 0.875rem 0 0.875rem 1.875rem;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-bold);
	line-height: 1.4;
}

.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-item .wc-block-components-totals-item__label,
.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-item .wc-block-components-totals-item__value {
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.rt-cart .wc-block-components-totals-item__label {
	flex-grow: 1;
}

.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-item .wc-block-components-totals-item__description {
	width: 100%;
	color: var(--rt-cart-old-price);
	font-size: var(--rt-font-size-small);
	font-weight: var(--rt-font-weight-regular);
}

.rt-cart .wc-block-components-totals-item__description:empty {
	display: none;
}

/* Shipping and discount details inside the totals keep WooCommerce's layout with the totals' inset. */
.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper > :not(.wc-block-components-totals-item):not(.wc-block-components-totals-coupon) {
	padding-inline-start: 1.875rem;
}

/* Coupon: "Add coupons" as a totals row with WooCommerce's chevron; the form is a framed field and a black Apply. */
.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-coupon {
	margin: 0;
	padding: 0 0 0 1.875rem;
}

.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-coupon .wc-block-components-panel__button {
	position: relative;
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0.875rem 2rem 0.875rem 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-medium);
	line-height: 1.4;
	cursor: pointer;
}

.rt-cart .wc-block-components-totals-coupon .wc-block-components-panel__button:hover {
	text-decoration: underline;
}

.rt-cart .wc-block-components-totals-coupon .wc-block-components-panel__button:focus-visible {
	outline: 2px solid var(--rt-color-accent);
	outline-offset: 2px;
}

.rt-cart .wc-block-components-totals-coupon .wc-block-components-panel__button-icon {
	position: absolute;
	top: 50%;
	inset-inline-end: 0;
	fill: currentColor;
	transform: translateY(-50%);
}

.rt-cart .wc-block-cart .wc-block-cart__sidebar .wc-block-components-totals-coupon .wc-block-components-panel__content {
	padding: 0 0 1.25rem;
}

.rt-cart .wc-block-components-totals-coupon__form {
	display: flex;
	gap: 0.625rem;
	width: 100%;
	margin: 0;
}

.rt-cart .wc-block-components-totals-coupon__form .wc-block-components-text-input.wc-block-components-totals-coupon__input {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	line-height: 0;
	white-space: nowrap;
}

.rt-cart .wc-block-components-text-input.wc-block-components-totals-coupon__input input[type="text"] {
	box-sizing: border-box;
	width: 100%;
	height: var(--rt-cart-control);
	min-height: 0;
	margin: 0;
	padding: 1.25rem 0.75rem 0.375rem;
	border: 1px solid var(--rt-cart-field-border);
	border-radius: 0;
	background: var(--rt-color-base);
	box-shadow: none;
	color: inherit;
	font-family: inherit;
	font-size: var(--rt-font-size-base);
	line-height: 1.4;
}

.rt-cart .wc-block-components-text-input.wc-block-components-totals-coupon__input input[type="text"]:focus {
	outline: 2px solid var(--rt-color-accent);
	outline-offset: -2px;
	box-shadow: none;
}

.rt-cart .wc-block-components-text-input.wc-block-components-totals-coupon__input label {
	position: absolute;
	top: calc(var(--rt-cart-control) / 2);
	inset-inline-start: 0.8125rem;
	max-width: calc(100% - 1.5rem);
	margin: 0;
	overflow: hidden;
	color: var(--rt-cart-old-price);
	font-size: var(--rt-font-size-base);
	line-height: 1.4;
	text-overflow: ellipsis;
	transform: translateY(-50%);
	transform-origin: top left;
	transition: transform 0.2s ease, top 0.2s ease;
	pointer-events: none;
}

.rt-cart .wc-block-components-text-input.wc-block-components-totals-coupon__input.has-error input[type="text"] {
	border-color: var(--rt-cart-error);
}

.rt-cart .wc-block-components-text-input.wc-block-components-totals-coupon__input.has-error label,
.rt-cart .wc-block-components-totals-coupon .wc-block-components-validation-error {
	color: var(--rt-cart-error);
}

.rt-cart .wc-block-components-totals-coupon .wc-block-components-validation-error {
	padding: var(--rt-spacing-20) 0 0;
	font-size: var(--rt-font-size-small);
	line-height: 1.4;
}

/* Buttons: Apply, Proceed to Checkout and Browse store, black and square, yellow on hover. In the editor the checkout
   button sits in its block's wrapper, without WooCommerce's container. */
.rt-cart .wc-block-components-totals-coupon__form .wc-block-components-button.wc-block-components-totals-coupon__button,
.rt-cart .wc-block-cart .wc-block-components-button.wc-block-cart__submit-button,
.rt-cart .wc-block-cart__empty-cart__title + p a {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: var(--rt-cart-control);
	margin: 0;
	padding: 0 var(--rt-spacing-40);
	border: 0;
	border-radius: 0;
	background: var(--rt-cart-action);
	box-shadow: none;
	color: var(--rt-cart-action-text);
	font-family: inherit;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-bold);
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.rt-cart .wc-block-cart .wc-block-components-button.wc-block-cart__submit-button {
	display: flex;
	width: 100%;
}

.rt-cart .wc-block-components-totals-coupon__form .wc-block-components-button.wc-block-components-totals-coupon__button:hover,
.rt-cart .wc-block-components-totals-coupon__form .wc-block-components-button.wc-block-components-totals-coupon__button:focus-visible,
.rt-cart .wc-block-cart .wc-block-components-button.wc-block-cart__submit-button:hover,
.rt-cart .wc-block-cart .wc-block-components-button.wc-block-cart__submit-button:focus-visible,
.rt-cart .wc-block-cart__empty-cart__title + p a:hover,
.rt-cart .wc-block-cart__empty-cart__title + p a:focus-visible {
	background: var(--rt-cart-action-hover);
	color: var(--rt-cart-action-hover-text);
}

.rt-cart .wc-block-components-totals-coupon__form .wc-block-components-button.wc-block-components-totals-coupon__button:focus-visible,
.rt-cart .wc-block-cart .wc-block-components-button.wc-block-cart__submit-button:focus-visible,
.rt-cart .wc-block-cart__empty-cart__title + p a:focus-visible {
	outline: 2px solid var(--rt-color-contrast);
	outline-offset: 2px;
}

/* WooCommerce dims Apply until a code is typed. */
.rt-cart .wc-block-components-totals-coupon__form .wc-block-components-button.wc-block-components-totals-coupon__button:disabled {
	background: var(--rt-cart-action);
	color: var(--rt-cart-action-text);
	opacity: 0.4;
	cursor: not-allowed;
}

.rt-cart .wc-block-components-button__text {
	display: block;
}

.rt-cart .wc-block-cart__submit {
	position: relative;
	margin: 0;
}

.rt-cart .wc-block-cart .wc-block-cart__submit-container {
	padding: 0;
}

/* Phones (WooCommerce, under 783px of window): a copy of the checkout button sticks to the bottom of the screen. */
.rt-cart .wc-block-cart .wc-block-cart__submit-container.wc-block-cart__submit-container--sticky {
	padding: 0.9375rem 1.25rem;
	background: var(--rt-color-base);
}

.rt-cart .wc-block-cart__payment-options:empty {
	display: none;
}

.rt-cart .wc-block-cart__payment-options {
	padding: 0 0 1.25rem;
}

/* Cross-sells under the lines. */
.rt-cart .rt-cart__related {
	margin: 5rem 0 0;
}

.rt-cart .rt-cart__related .rt-cart__heading {
	margin-block-end: var(--rt-spacing-50);
}

.rt-cart .rt-cart__products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(max(9.375rem, (100% - 3.75rem) / 3), 1fr));
	gap: 3.75rem 1.875rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rt-cart .rt-cart__products > li {
	width: auto;
	max-width: none;
	margin: 0;
}

/* Empty: WooCommerce's cart icon over the message, a black Browse store, then the newest products. */
.rt-cart h2.wc-block-cart__empty-cart__title {
	padding-block-start: 3.75rem;
	text-align: center;
}

.rt-cart h2.wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
	width: 3.75rem;
	height: 3.75rem;
	margin: 0 auto var(--rt-spacing-40);
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
}

.rt-cart .wc-block-cart__empty-cart__title + p {
	display: flex;
	justify-content: center;
	margin: 1.875rem 0 0;
}

.rt-cart .wc-block-cart__empty-cart__title + p a {
	padding: 0 var(--rt-spacing-50);
}

.rt-cart h2:has(+ .rt-cart__new) {
	margin-block-start: 6.25rem;
	margin-block-end: var(--rt-spacing-50);
	text-align: center;
}

.rt-cart .rt-cart__new {
	margin: 0;
}

/* Under 600px of cart: smaller photo boxes, the remove square on the box's corner, no table header. */
@container (width < 37.5rem) {
	/* The root is the container, so the sizes change on its children. */
	.rt-cart > * {
		--rt-cart-thumb: 5.5rem;
		--rt-cart-row-gap: 1.25rem;
		--rt-cart-indent: 0px;
	}

	.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
		column-gap: 1.25rem;
	}

	.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product,
	.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
		align-self: start;
	}

	.rt-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
		top: var(--rt-cart-row-gap);
		inset-inline-start: calc(var(--rt-cart-thumb) - var(--rt-cart-remove-size));
	}

	.rt-cart .wc-block-cart-item__quantity .wc-block-components-quantity-selector {
		width: 5.5rem;
		height: 2.5rem;
	}

	.rt-cart .rt-cart__products {
		gap: var(--rt-spacing-50) 0.9375rem;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rt-cart h2.wc-block-cart__empty-cart__title {
		padding-block-start: var(--rt-spacing-50);
	}

	.rt-cart h2:has(+ .rt-cart__new) {
		margin-block-start: 4.375rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rt-cart .wc-block-cart-item__remove-link,
	.rt-cart .wc-block-components-totals-coupon__button,
	.rt-cart .wc-block-cart__submit-button,
	.rt-cart .wc-block-cart__empty-cart__title + p a,
	.rt-cart .wc-block-components-totals-coupon__input label {
		transition: none;
	}
}

/*
 * The open coupon panel (cart.js, behaviors/coupon-panel.js): the chevron points up and the code field's label floats
 * to its top while it has the focus or a value, as WooCommerce's text inputs do.
 */
.rt-cart .wc-block-components-totals-coupon .wc-block-components-panel__button[aria-expanded="true"] .wc-block-components-panel__button-icon {
	transform: translateY(-50%) rotate(180deg);
}

/* The label floats while the field has the focus or a code (Apply is enabled then), as WooCommerce's is-active */
.rt-cart .wc-block-components-totals-coupon__input:focus-within label,
.rt-cart .wc-block-components-totals-coupon__input:has(+ .wc-block-components-totals-coupon__button:enabled) label {
	top: 0.375rem;
	transform: scale(0.82);
}

.rt-cart .wc-block-components-totals-coupon .wc-block-components-validation-error > p {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
}

.rt-cart .wc-block-components-totals-coupon .wc-block-components-validation-error svg {
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	fill: currentColor;
}
