/**
 * checkout: the store's Checkout block in the style of the shop checkout (new-woocommerce.sketch, Checkout).
 * The store keeps its steps and layout: the form with the order summary beside it from 920px of checkout width (its
 * container breakpoint), above it and folded below. From the design: bold step headings (34), labels above framed 60px
 * fields (#969696, 30px between rows, 58px between paired fields), the order summary under a heading with a 5px strip,
 * its rows (16, bold) between hairlines, and a 50px black Place Order button (the design's green follows the cart's
 * black). The rules repeat the layout of the store's block styles so the reference (without them) matches; rules that
 * must win over those styles carry the root class and the store's own classes.
 */
:where(.rt-checkout) {
	color: var(--rt-color-contrast);
}

.rt-checkout {
	--rt-checkout-sidebar: 18.25rem;
	--rt-checkout-gap: 4.25rem;
	--rt-checkout-field: 3.75rem;
	--rt-checkout-control: 3.125rem;
	--rt-checkout-indent: 1.875rem;
	--rt-checkout-row-gap: 1.875rem;
	--rt-checkout-column-gap: 3.625rem;
	--rt-checkout-label-gap: 1.4375rem;
	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-checkout [hidden] {
	display: none;
}

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

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

/* Notices (a failed order, a removed coupon): square, with a coloured edge. */
.rt-checkout .wc-block-components-notices:not(:has(*)) {
	display: none;
}

.rt-checkout .wc-block-components-notices .wc-block-components-notice-banner {
	margin: 0 0 1.25rem;
	border: 1px solid var(--rt-checkout-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-checkout .wc-block-components-notices .wc-block-components-notice-banner > svg {
	border-radius: 0;
	background: var(--rt-color-contrast);
}

/* Layout: form and order summary side by side from 920px, as in the store; below, the summary comes first. */
.rt-checkout .wc-block-components-sidebar-layout.wc-block-checkout {
	display: flex;
	flex-direction: column;
	gap: var(--rt-spacing-50);
	margin: 0;
	padding: 0;
}

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

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

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

	.rt-checkout .wc-block-checkout .wc-block-components-main.wc-block-checkout__main {
		order: 0;
	}

	.rt-checkout .wc-block-checkout .wc-block-components-sidebar.wc-block-checkout__sidebar {
		flex: 0 0 var(--rt-checkout-sidebar);
		order: 1;
		width: var(--rt-checkout-sidebar);
	}
}

/* Steps: contact, addresses, shipping, payment and notes, 60px apart, each under the design's bold heading. */
.rt-checkout .wc-block-components-form .wc-block-components-checkout-step {
	margin: 0 0 3.75rem;
	padding: 0;
	border: 0;
}

.rt-checkout .wc-block-components-form .wc-block-checkout__order-notes.wc-block-components-checkout-step {
	margin-block-end: var(--rt-spacing-50);
}

.rt-checkout .wc-block-components-checkout-step__heading-container {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0 0 var(--rt-checkout-row-gap);
}

.rt-checkout .wc-block-components-checkout-step__heading {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--rt-spacing-20) 1.25rem;
	margin: 0;
}

.rt-checkout .wc-block-components-title.wc-block-components-checkout-step__title {
	margin: 0;
	padding: 0;
	border: 0;
	color: inherit;
	font-family: inherit;
	font-size: var(--rt-font-size-x-large);
	font-weight: var(--rt-font-weight-bold);
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
}

/* The contact step's "Log in" link, when the store lets guests sign in at checkout. */
.rt-checkout .wc-block-components-checkout-step__heading-content {
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-medium);
}

.rt-checkout .wc-block-components-checkout-step__heading-content a {
	font-weight: inherit;
}

.rt-checkout .wc-block-components-checkout-step__description {
	margin: 0;
	color: var(--rt-color-body);
	font-size: var(--rt-font-size-base);
	line-height: 1.6;
}

.rt-checkout .wc-block-components-checkout-step__content > * {
	margin: 0 0 1.25rem;
}

.rt-checkout .wc-block-components-checkout-step__content > :last-child {
	margin-block-end: 0;
}

/* Fields: the address form's fields in rows; names, city and state, postcode and phone in pairs. */
.rt-checkout .wc-block-components-form .wc-block-components-address-form {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rt-checkout-row-gap) var(--rt-checkout-column-gap);
	margin: 0;
}

.rt-checkout .wc-block-components-form .wc-block-components-address-form > * {
	box-sizing: border-box;
	flex: 1 0 calc(50% - var(--rt-checkout-column-gap) / 2);
	min-width: 0;
	margin: 0;
}

.rt-checkout .wc-block-components-form .wc-block-components-address-form > .wc-block-components-address-form__email,
.rt-checkout .wc-block-components-form .wc-block-components-address-form > .wc-block-components-country-input,
.rt-checkout .wc-block-components-form .wc-block-components-address-form > .wc-block-components-address-form__company,
.rt-checkout .wc-block-components-form .wc-block-components-address-form > .wc-block-components-address-form__address_1,
.rt-checkout .wc-block-components-form .wc-block-components-address-form > .wc-block-components-address-form__address_2,
.rt-checkout .wc-block-components-form .wc-block-components-address-form > .wc-block-components-address-form__address_2-toggle,
.rt-checkout .wc-block-components-form .wc-block-components-address-form > .wc-block-components-checkbox,
.rt-checkout .wc-block-components-form .wc-block-components-address-form > .wc-block-checkout__guest-checkout-notice {
	flex-basis: 100%;
}

/* "You are currently checking out as a guest." under the email. */
.rt-checkout .wc-block-components-form .wc-block-components-address-form > .wc-block-checkout__guest-checkout-notice {
	margin-block-start: calc(0.5rem - var(--rt-checkout-row-gap));
	color: var(--rt-color-body);
	font-size: var(--rt-font-size-small);
	line-height: 1.4;
}

/* The store keeps the apartment field's input for autofill off screen until the toggle shows the field. */
.rt-checkout .wc-block-components-form .wc-block-components-address-form > .wc-block-components-address-form__address_2-hidden-input {
	position: absolute;
	inset-inline-start: -20000px;
	flex: none;
}

/* A field: the label above a framed 60px input, the store's message under it. */
.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-block-components-text-input {
	display: flex;
	flex-direction: column;
	margin: 0;
	line-height: 1.4;
	white-space: normal;
}

.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-block-components-text-input label,
.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-blocks-components-select .wc-blocks-components-select__label {
	position: static;
	order: -1;
	display: block;
	max-width: none;
	margin: 0 0 var(--rt-checkout-label-gap);
	overflow: visible;
	color: inherit;
	font-family: inherit;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-medium);
	line-height: 1.1875;
	white-space: normal;
	transform: none;
	transition: none;
	cursor: default;
}

.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-block-components-text-input input:not([type="checkbox"]),
.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-blocks-components-select .wc-blocks-components-select__select {
	box-sizing: border-box;
	width: 100%;
	height: var(--rt-checkout-field);
	min-height: 0;
	margin: 0;
	padding: 0 1.25rem;
	border: 1px solid var(--rt-checkout-field-border);
	border-radius: 0;
	background: var(--rt-color-base);
	box-shadow: none;
	color: var(--rt-color-contrast);
	font-family: inherit;
	font-size: var(--rt-font-size-base);
	line-height: 1.5;
	appearance: none;
}

/* Focus: 2px dark frame drawn inside, so the field does not move (as in the contact form). */
.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-block-components-text-input input:not([type="checkbox"]):focus,
.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-blocks-components-select .wc-blocks-components-select__select:focus {
	padding: 0 1.25rem;
	border: 1px solid var(--rt-color-contrast);
	outline: 0;
	box-shadow: inset 0 0 0 1px var(--rt-color-contrast);
}

/* Dropdowns (country, state): the select keeps the store's chevron, inside the field's padding. */
.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-blocks-components-select {
	margin: 0;
}

.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-blocks-components-select .wc-blocks-components-select__container {
	position: relative;
	display: flex;
	flex-direction: column;
	height: auto;
	border: 0;
	border-radius: 0;
	background: none;
	line-height: 1.4;
}

.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-blocks-components-select .wc-blocks-components-select__select {
	padding-inline-end: 3rem;
	cursor: pointer;
}

.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-blocks-components-select .wc-blocks-components-select__expand {
	position: absolute;
	top: auto;
	bottom: calc(var(--rt-checkout-field) / 2);
	inset-inline-end: 1rem;
	fill: currentColor;
	transform: translateY(50%);
	pointer-events: none;
}

/* Errors: the field framed in red with the store's message under it. */
.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-block-components-text-input.has-error input:not([type="checkbox"]),
.rt-checkout .wc-block-components-form .wc-block-components-address-form .has-error .wc-blocks-components-select .wc-blocks-components-select__select {
	border-color: var(--rt-checkout-error);
	box-shadow: inset 0 0 0 1px var(--rt-checkout-error);
	color: var(--rt-color-contrast);
}

.rt-checkout .wc-block-components-form .wc-block-components-address-form .wc-block-components-text-input.has-error label,
.rt-checkout .wc-block-components-form .wc-block-components-address-form .has-error .wc-blocks-components-select .wc-blocks-components-select__label {
	color: inherit;
}

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

.rt-checkout .wc-block-components-validation-error > p {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	line-height: 1.4;
}

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

/* "+ Add apartment, suite, etc." and the address card's Edit: underlined text buttons. */
.rt-checkout .wc-block-components-address-form__address_2-toggle,
.rt-checkout .wc-block-components-address-card__edit {
	display: inline-block;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-family: inherit;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-medium);
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 0.1875rem;
	cursor: pointer;
}

.rt-checkout .wc-block-components-address-form__address_2-toggle:hover,
.rt-checkout .wc-block-components-address-card__edit:hover {
	text-decoration-thickness: 2px;
}

/* A signed-in customer's saved address: a framed card until Edit opens the form. */
.rt-checkout .wc-block-components-address-card {
	display: flex;
	align-items: flex-start;
	gap: 1.25rem;
	margin: 0;
	padding: 1.25rem;
	border: 1px solid var(--rt-checkout-field-border);
	border-radius: 0;
	font-size: var(--rt-font-size-base);
	line-height: 1.6;
}

.rt-checkout .wc-block-components-address-card address {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
	font-style: normal;
}

.rt-checkout .wc-block-components-address-card__edit {
	margin-inline-start: auto;
}

/* Radio options (payment methods, shipping rates): framed rows with a round control; the chosen one is outlined. */
.rt-checkout .wc-block-components-radio-control {
	margin: 0;
	border: 1px solid var(--rt-checkout-field-border);
	border-radius: 0;
}

.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control-accordion-option,
.rt-checkout .wc-block-components-radio-control > .wc-block-components-radio-control__option {
	position: relative;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control-accordion-option + .wc-block-components-radio-control-accordion-option,
.rt-checkout .wc-block-components-radio-control > .wc-block-components-radio-control__option + .wc-block-components-radio-control__option {
	border-top: 1px solid var(--rt-checkout-line);
}

.rt-checkout .wc-block-components-radio-control::after,
.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control-accordion-option::after,
.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control__option::after {
	content: none;
}

.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control__option {
	position: relative;
	display: block;
	margin: 0;
	padding: 1.1875rem 1.25rem 1.1875rem 3.75rem;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-medium);
	line-height: 1.4;
	cursor: pointer;
}

.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control__option-layout {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0;
}

.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control__label-group {
	display: flex;
	justify-content: space-between;
	gap: var(--rt-spacing-30);
}

.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control__description-group,
.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control__description,
.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control__secondary-description {
	color: var(--rt-color-body);
	font-size: var(--rt-font-size-small);
	font-weight: var(--rt-font-weight-regular);
}

.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control__input {
	position: absolute;
	top: 50%;
	inset-inline-start: 1.25rem;
	box-sizing: border-box;
	width: 1.25rem;
	height: 1.25rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--rt-checkout-field-border);
	border-radius: 50%;
	background: var(--rt-color-base);
	transform: translateY(-50%);
	appearance: none;
	cursor: pointer;
}

.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control__input:checked {
	border-color: var(--rt-color-contrast);
}

.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control__input:checked::before {
	position: absolute;
	top: 50%;
	left: 50%;
	display: block;
	width: 0.625rem;
	height: 0.625rem;
	margin: 0;
	border-radius: 50%;
	background: var(--rt-color-contrast);
	content: "";
	transform: translate(-50%, -50%);
}

.rt-checkout .wc-block-components-radio-control .wc-block-components-radio-control__input:focus-visible {
	outline: 2px solid var(--rt-color-accent);
	outline-offset: 2px;
}

/* The chosen payment method's description (bank details, card fields) under its row, on the grey surface. */
.rt-checkout .wc-block-components-radio-control-accordion-content {
	margin: 0;
	padding: 0 1.25rem 1.25rem 3.75rem;
	color: var(--rt-color-body);
	font-size: var(--rt-font-size-small);
	line-height: 1.6;
}

.rt-checkout .wc-block-components-radio-control-accordion-content:empty {
	display: none;
}

/* Checkboxes (order note, create account, use same address): a square frame with the store's tick. */
.rt-checkout .wc-block-components-checkbox {
	margin: 0;
	line-height: 1.4;
}

.rt-checkout .wc-block-components-checkbox label {
	position: relative;
	display: inline-flex;
	align-items: flex-start;
	gap: 0.875rem;
	margin: 0;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-medium);
	line-height: 1.25rem;
	cursor: pointer;
}

.rt-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	position: static;
	box-sizing: border-box;
	flex: 0 0 1.25rem;
	width: 1.25rem;
	height: 1.25rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--rt-checkout-field-border);
	border-radius: 0;
	background: var(--rt-color-base);
	appearance: none;
	cursor: pointer;
}

.rt-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
	border-color: var(--rt-color-contrast);
	background: var(--rt-color-contrast);
}

.rt-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--rt-color-accent);
	outline-offset: 2px;
}

.rt-checkout .wc-block-components-checkbox .wc-block-components-checkbox__mark {
	position: absolute;
	top: 0.1875rem;
	left: 0.1875rem;
	width: 0.875rem;
	height: 0.875rem;
	margin: 0;
	fill: var(--rt-color-base);
	pointer-events: none;
}

.rt-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input:not(:checked) + .wc-block-components-checkbox__mark {
	display: none;
}

.rt-checkout .wc-block-components-checkbox.has-error .wc-block-components-checkbox__input[type="checkbox"] {
	border-color: var(--rt-checkout-error);
}

.rt-checkout .wc-block-components-checkbox.has-error,
.rt-checkout .wc-block-components-checkbox.has-error a {
	color: var(--rt-checkout-error);
}

/* Order note: the checkbox opens a framed text area (as the contact form's message). */
.rt-checkout .wc-block-checkout__add-note .wc-block-components-textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 10rem;
	margin: 1.25rem 0 0;
	padding: 1.0625rem 1.25rem;
	border: 1px solid var(--rt-checkout-field-border);
	border-radius: 0;
	background: var(--rt-color-base);
	box-shadow: none;
	color: var(--rt-color-contrast);
	font-family: inherit;
	font-size: var(--rt-font-size-base);
	line-height: 1.5;
	resize: vertical;
}

.rt-checkout .wc-block-checkout__add-note .wc-block-components-textarea:focus {
	border-color: var(--rt-color-contrast);
	outline: 0;
	box-shadow: inset 0 0 0 1px var(--rt-color-contrast);
}

/* Terms over a hairline, then Place Order. */
.rt-checkout .wc-block-checkout__terms {
	margin: 0 0 1.875rem;
	padding: 1.875rem 0 0;
	border-top: 1px solid var(--rt-checkout-line);
	color: var(--rt-color-body);
	font-size: var(--rt-font-size-small);
	line-height: 1.6;
}

.rt-checkout .wc-block-checkout__terms:not(.wc-block-checkout__terms--with-separator) {
	padding-block-start: 0;
	border-top-width: 0;
}

.rt-checkout .wc-block-checkout__terms .wc-block-components-checkbox__label {
	font-size: inherit;
	font-weight: var(--rt-font-weight-regular);
}

.rt-checkout .wc-block-checkout__actions {
	margin: 0;
}

/* The design puts Place Order at the start of the row; "Return to cart", when shown, follows it. */
.rt-checkout .wc-block-checkout__actions .wc-block-checkout__actions_row {
	display: flex;
	flex-direction: row-reverse;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 1.25rem var(--rt-spacing-50);
	font-size: var(--rt-font-size-base);
	line-height: 1.4;
}

.rt-checkout .wc-block-checkout__actions .wc-block-components-checkout-return-to-cart-button {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	color: inherit;
	font-weight: var(--rt-font-weight-medium);
}

.rt-checkout .wc-block-checkout__actions .wc-block-components-checkout-return-to-cart-button svg {
	fill: currentColor;
}

/* Buttons: Place Order and the coupon's Apply, black and square, yellow on hover (as in the cart). */
.rt-checkout .wc-block-checkout__actions .wc-block-components-button.wc-block-components-checkout-place-order-button,
.rt-checkout .wc-block-components-totals-coupon__form .wc-block-components-button.wc-block-components-totals-coupon__button {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: var(--rt-checkout-control);
	margin: 0;
	padding: 0 var(--rt-spacing-40);
	border: 0;
	border-radius: 0;
	background: var(--rt-checkout-action);
	box-shadow: none;
	color: var(--rt-checkout-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-checkout .wc-block-checkout__actions .wc-block-components-button.wc-block-components-checkout-place-order-button {
	width: auto;
	min-width: 16.4375rem;
	padding: 0 var(--rt-spacing-50);
}

.rt-checkout .wc-block-checkout__actions .wc-block-components-button.wc-block-components-checkout-place-order-button:hover,
.rt-checkout .wc-block-checkout__actions .wc-block-components-button.wc-block-components-checkout-place-order-button:focus-visible,
.rt-checkout .wc-block-components-totals-coupon__form .wc-block-components-button.wc-block-components-totals-coupon__button:hover,
.rt-checkout .wc-block-components-totals-coupon__form .wc-block-components-button.wc-block-components-totals-coupon__button:focus-visible {
	background: var(--rt-checkout-action-hover);
	color: var(--rt-checkout-action-hover-text);
}

.rt-checkout .wc-block-checkout__actions .wc-block-components-button.wc-block-components-checkout-place-order-button:focus-visible,
.rt-checkout .wc-block-components-totals-coupon__form .wc-block-components-button.wc-block-components-totals-coupon__button:focus-visible {
	outline: 2px solid var(--rt-color-contrast);
	outline-offset: 2px;
}

/* Disabled while the order is placed (the store shows its spinner) and Apply until a code is typed. */
.rt-checkout .wc-block-checkout__actions .wc-block-components-button.wc-block-components-checkout-place-order-button:disabled,
.rt-checkout .wc-block-components-totals-coupon__form .wc-block-components-button.wc-block-components-totals-coupon__button:disabled,
.rt-checkout .wc-block-components-totals-coupon__form .wc-block-components-button.wc-block-components-totals-coupon__button[aria-disabled="true"] {
	background: var(--rt-checkout-action);
	color: var(--rt-checkout-action-text);
	opacity: 0.4;
	cursor: not-allowed;
}

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

.rt-checkout .wc-block-components-checkout-place-order-button .wc-block-components-spinner::after {
	border-color: currentColor transparent currentColor transparent;
}

/* Order summary: the heading with the design's 5px strip, then the lines, coupon and totals between hairlines. In the
   editor block wrappers sit between the sidebar and the summary. */
.rt-checkout .wc-block-checkout__sidebar :has(> .wc-block-components-checkout-order-summary__title) {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	font-size: var(--rt-font-size-base);
	line-height: 1.4;
}

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 2rem;
	padding: 0.5625rem 0 0.5625rem calc(var(--rt-checkout-indent) - 0.3125rem);
	border: 0;
	border-inline-start: 0.3125rem solid var(--rt-checkout-strip);
}

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-text {
	flex-grow: 1;
	margin: 0;
	color: inherit;
	font-size: var(--rt-font-size-medium);
	font-weight: var(--rt-font-weight-bold);
	line-height: 1.2;
}

.rt-checkout .wc-block-components-checkout-order-summary__title:focus-visible {
	outline: 2px solid var(--rt-color-accent);
	outline-offset: 2px;
}

.rt-checkout .wc-block-components-checkout-order-summary__title-price,
.rt-checkout .wc-block-components-checkout-order-summary__title-icon {
	display: none;
}

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__content {
	display: block;
	margin: 0 0 0 var(--rt-checkout-indent);
	border: 0;
}

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__content > * {
	margin: 0;
	padding: 0;
	border: 0;
}

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-totals-wrapper,
.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill .wc-block-components-totals-wrapper {
	margin: 0;
	padding: 0;
	border: 0;
	border-top: 1px solid var(--rt-checkout-line);
}

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-totals-wrapper:empty,
.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill .wc-block-components-totals-wrapper:empty {
	display: none;
}

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__content > :last-child {
	border-bottom: 1px solid var(--rt-checkout-line);
}

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-totals-wrapper::after,
.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill .wc-block-components-totals-wrapper::after {
	content: none;
}

/* Under 920px the store repeats the summary in the form, before Place Order: the same rows under a step heading. */
.rt-checkout .wc-block-components-form .checkout-order-summary-block-fill-wrapper {
	margin: 0 0 var(--rt-spacing-50);
	padding: 0;
	border: 0;
	border-radius: 0;
	font-size: var(--rt-font-size-base);
	line-height: 1.4;
}

.rt-checkout .checkout-order-summary-block-fill-wrapper .wc-block-components-checkout-step__heading {
	margin: 0 0 1.25rem;
}

.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill {
	border: 0;
	border-bottom: 1px solid var(--rt-checkout-line);
	border-radius: 0;
}

.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill > * {
	margin: 0;
	padding: 0;
	border: 0;
}

/* Lines: a grey photo box with the quantity on its corner, name and price, and the line total. */
.rt-checkout .wc-block-components-order-summary {
	margin: 0;
	padding: 0;
}

.rt-checkout .wc-block-components-order-summary .wc-block-components-order-summary__content {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	padding: 1.25rem 0;
}

.rt-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item {
	display: flex;
	align-items: flex-start;
	gap: 0.875rem;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	font-size: var(--rt-font-size-small);
}

.rt-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item::after {
	content: none;
}

.rt-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item__image {
	position: relative;
	flex: 0 0 3.5rem;
	width: 3.5rem;
	margin: 0;
	padding: 0;
	background: var(--rt-checkout-surface);
}

.rt-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item__image > img {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	height: auto;
	aspect-ratio: 1;
	margin: 0;
	padding: 0.25rem;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.rt-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item__quantity {
	position: absolute;
	top: -0.5rem;
	right: -0.5rem;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.25rem;
	border: 0;
	border-radius: 0;
	background: var(--rt-color-contrast);
	box-shadow: none;
	color: var(--rt-color-base);
	font-size: var(--rt-font-size-x-small);
	font-weight: var(--rt-font-weight-bold);
	line-height: 1;
	transform: none;
}

.rt-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item__quantity span {
	padding: 0;
	color: inherit;
}

.rt-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item__description {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
	min-width: 0;
	padding: 0;
	word-break: break-word;
}

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary-item .wc-block-components-product-name {
	display: block;
	max-width: none;
	margin: 0;
	color: inherit;
	font-family: inherit;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-medium);
	line-height: 1.4;
}

.rt-checkout .wc-block-components-order-summary-item .wc-block-cart-item__prices .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.375rem;
	font-size: var(--rt-font-size-small);
	font-weight: var(--rt-font-weight-medium);
}

.rt-checkout .wc-block-components-order-summary-item del {
	margin: 0;
	color: var(--rt-checkout-muted);
	font-weight: var(--rt-font-weight-regular);
}

.rt-checkout .wc-block-components-order-summary-item ins {
	margin: 0;
	text-decoration: none;
}

.rt-checkout .wc-block-components-order-summary-item .wc-block-components-product-metadata {
	color: var(--rt-checkout-muted);
	font-size: var(--rt-font-size-small);
	line-height: 1.4;
}

.rt-checkout .wc-block-components-order-summary-item .wc-block-components-product-metadata:not(:has(*)) {
	display: none;
}

.rt-checkout .wc-block-components-order-summary-item .wc-block-components-product-metadata__description:empty {
	display: none;
}

.rt-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item__total-price {
	margin: 0 0 0 auto;
	padding: 0;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-bold);
	text-align: end;
	white-space: nowrap;
}

.rt-checkout .wc-block-components-order-summary-item .wc-block-components-sale-badge {
	display: none;
}

/* Totals rows (16, bold): label at the start, amount at the end. */
.rt-checkout .wc-block-checkout__sidebar .wc-block-components-totals-item,
.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill .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;
	font-size: var(--rt-font-size-base);
	font-weight: var(--rt-font-weight-bold);
	line-height: 1.4;
}

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-totals-item .wc-block-components-totals-item__label,
.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill .wc-block-components-totals-item .wc-block-components-totals-item__label,
.rt-checkout .wc-block-checkout__sidebar .wc-block-components-totals-item .wc-block-components-totals-item__value,
.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill .wc-block-components-totals-item .wc-block-components-totals-item__value {
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

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

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-totals-item .wc-block-components-totals-item__description,
.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill .wc-block-components-totals-item .wc-block-components-totals-item__description {
	width: 100%;
	color: var(--rt-checkout-muted);
	font-size: var(--rt-font-size-small);
	font-weight: var(--rt-font-weight-regular);
}

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

/* Coupon: "Add coupons" as a totals row with the store's chevron; the form is a framed field and a black Apply. */
.rt-checkout .wc-block-checkout__sidebar .wc-block-components-totals-coupon,
.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill .wc-block-components-totals-coupon {
	margin: 0;
	padding: 0;
}

.rt-checkout .wc-block-checkout__sidebar .wc-block-components-totals-coupon .wc-block-components-panel__button,
.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill .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-checkout .wc-block-components-totals-coupon .wc-block-components-panel__button:hover {
	text-decoration: underline;
}

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

.rt-checkout .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-checkout .wc-block-checkout__sidebar .wc-block-components-totals-coupon .wc-block-components-panel__content,
.rt-checkout .checkout-order-summary-block-fill-wrapper .checkout-order-summary-block-fill .wc-block-components-totals-coupon .wc-block-components-panel__content {
	padding: 0 0 1.25rem;
}

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

.rt-checkout .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-checkout .wc-block-components-text-input.wc-block-components-totals-coupon__input input[type="text"] {
	box-sizing: border-box;
	width: 100%;
	height: var(--rt-checkout-control);
	min-height: 0;
	margin: 0;
	padding: 1.25rem 0.75rem 0.375rem;
	border: 1px solid var(--rt-checkout-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-checkout .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-checkout .wc-block-components-text-input.wc-block-components-totals-coupon__input label {
	position: absolute;
	top: calc(var(--rt-checkout-control) / 2);
	inset-inline-start: 0.8125rem;
	max-width: calc(100% - 1.5rem);
	margin: 0;
	overflow: hidden;
	color: var(--rt-checkout-muted);
	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-checkout .wc-block-components-text-input.wc-block-components-totals-coupon__input.has-error input[type="text"] {
	border-color: var(--rt-checkout-error);
}

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

/* Under 920px of checkout: the summary above the form folds into a bar (heading, total, chevron) between hairlines. */
@container (width < 57.5rem) {
	.rt-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title {
		margin: 0;
		padding-block: 1.125rem;
		border-top: 1px solid var(--rt-checkout-line);
		border-bottom: 1px solid var(--rt-checkout-line);
		cursor: pointer;
	}

	.rt-checkout .wc-block-components-checkout-order-summary__title-price {
		display: block;
		font-weight: var(--rt-font-weight-bold);
	}

	.rt-checkout .wc-block-components-checkout-order-summary__title-icon {
		display: flex;
		fill: currentColor;
	}

	.rt-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__content {
		display: none;
		margin-block-start: var(--rt-spacing-20);
	}

	/* The heading is a button there (checkout.js): it unfolds the summary and turns its chevron. */
	.rt-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title[aria-expanded="true"] ~ .wc-block-components-checkout-order-summary__content {
		display: block;
	}

	.rt-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title[aria-expanded="true"] .wc-block-components-checkout-order-summary__title-icon {
		transform: rotate(180deg);
	}

	.rt-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title:focus-visible {
		outline: 2px solid var(--rt-color-accent);
		outline-offset: 2px;
	}
}

/* Under 600px of checkout: smaller headings and gaps, the paired fields stacked, Place Order across the row. */
@container (width < 37.5rem) {
	/* The root is the container, so the sizes change on its children. */
	.rt-checkout > * {
		--rt-checkout-row-gap: 1.25rem;
		--rt-checkout-label-gap: 0.75rem;
		--rt-checkout-indent: 1.25rem;
	}

	.rt-checkout .wc-block-components-form .wc-block-components-checkout-step {
		margin-block-end: var(--rt-spacing-50);
	}

	.rt-checkout .wc-block-components-title.wc-block-components-checkout-step__title {
		font-size: var(--rt-font-size-large);
	}

	.rt-checkout .wc-block-components-form .wc-block-components-address-form > * {
		flex-basis: 100%;
	}

	.rt-checkout .wc-block-checkout__actions .wc-block-components-button.wc-block-components-checkout-place-order-button {
		width: 100%;
		min-width: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rt-checkout .wc-block-components-checkout-place-order-button,
	.rt-checkout .wc-block-components-totals-coupon__button,
	.rt-checkout .wc-block-components-totals-coupon__input label {
		transition: none;
	}
}

/*
 * The open coupon panel (checkout.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 the store's text inputs do.
 */
.rt-checkout .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 the store's is-active */
.rt-checkout .wc-block-components-totals-coupon__input:focus-within label,
.rt-checkout .wc-block-components-totals-coupon__input:has(+ .wc-block-components-totals-coupon__button:enabled) label {
	top: 0.375rem;
	transform: scale(0.82);
}
