/*
 * The checkout's look (S5 part 2): WooCommerce's checkout, order-pay and order-received markup in
 * the storefront's design system, using only its tokens and icons (assets/storefront, exported from
 * the storefront). Fields follow the design system's Input and Select, choices its Checkbox and
 * Radio, notices its Alert, buttons its Button, and the order its Card, as the storefront's basket
 * summary does; the masthead and footer follow the storefront's. A proposal: the design system has
 * no checkout pattern (D7). When those components change, change their copies here to match.
 *
 * WooCommerce's own stylesheets load first. Its rules are overridden here under #lov-checkout, the
 * template's main element, whose ID outranks most of them; where WooCommerce's own selectors carry
 * an ID (#payment, #shipping_method, #place_order, #ship-to-different-address), so do these.
 * select2's list hangs off the body.
 *
 * My Account (S11) shares the components below the masthead and footer: their rules match
 * #lov-account, its template's main element, as well. :is() takes its most specific selector's
 * weight, an ID's, so each rule outranks WooCommerce's exactly as it did for the checkout alone.
 * The account's layout is in account.css, its header and footer in chrome.css.
 */

/* Icons: the design system's, masked in the text's colour, as its Icon component draws them. */

.lov-checkout-icon {
	display: inline-block;
	flex: 0 0 auto;
	width: var(--icon-sm);
	height: var(--icon-sm);
	background-color: currentColor;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.lov-checkout-icon-lock {
	-webkit-mask-image: url('storefront/icons/lock.svg');
	mask-image: url('storefront/icons/lock.svg');
}

.lov-checkout-icon-back {
	-webkit-mask-image: url('storefront/icons/chevron-left.svg');
	mask-image: url('storefront/icons/chevron-left.svg');
}

.lov-checkout-icon-compliance {
	-webkit-mask-image: url('storefront/icons/shield-check.svg');
	mask-image: url('storefront/icons/shield-check.svg');
}

/* Page */

body.lov-checkout {
	background: var(--surface-page);
}

.lov-checkout-container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--gutter-tight);
}

@media (min-width: 48rem) {
	.lov-checkout-container {
		padding-inline: var(--gutter);
	}
}

/* Skip to content, as the storefront's: hidden above the page until it has focus. */
.lov-checkout-skip {
	position: absolute;
	top: var(--space-2);
	left: var(--space-2);
	z-index: 70;
	padding: var(--space-2) var(--space-4);
	font-family: var(--font-ui);
	font-size: var(--size-sm);
	font-weight: var(--weight-semibold);
	color: var(--white);
	background: var(--brand);
	border-radius: var(--radius-control);
	transform: translateY(-200%);
}

.lov-checkout-skip:focus {
	color: var(--white);
	transform: none;
}

/* The masthead: the storefront's navy bar with the logo, and the secure-checkout mark. */

.lov-checkout-masthead {
	color: var(--white);
	background: var(--ink-900);
}

.lov-checkout-masthead-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	padding-block: var(--space-3);
}

.lov-checkout-logo {
	display: block;
	line-height: 0;
}

.lov-checkout-logo img {
	width: auto;
	height: var(--logo-h-compact);
}

.lov-checkout-secure {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	margin: 0;
	font-family: var(--font-ui);
	font-size: var(--size-sm);
	font-weight: var(--weight-semibold);
}

.lov-checkout-secure .lov-checkout-icon {
	color: var(--blue-300);
}

@media (min-width: 64rem) {
	.lov-checkout-masthead-inner {
		padding-block: var(--space-4);
	}
	.lov-checkout-logo img {
		height: var(--logo-h);
	}
}

.lov-checkout-main {
	padding-block: var(--space-6) var(--space-12);
}

.lov-checkout-back {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	min-height: var(--tap-min);
	font-family: var(--font-ui);
	font-size: var(--size-sm);
	font-weight: var(--weight-semibold);
}

/* The page title, as the storefront's page header sets it. */
.lov-checkout-title {
	margin-bottom: var(--space-6);
	font-size: var(--size-display-sm);
	overflow-wrap: break-word;
}

@media (min-width: 48rem) {
	.lov-checkout-title {
		font-size: var(--size-display-md);
	}
}

/* The footer: the storefront's navy footer, its legal notice in the compliance Alert. */

.lov-checkout-footer {
	font-family: var(--font-ui);
	color: var(--text-inverse-muted);
	background: var(--ink-900);
}

.lov-checkout-footer-notice {
	padding-block: var(--space-6);
}

.lov-checkout-compliance {
	display: flex;
	align-items: flex-start;
	gap: var(--space-3);
	padding: var(--space-4);
	font-size: var(--size-sm);
	line-height: var(--lh-snug);
	color: var(--white);
	background: var(--ink-900);
	border: 1px solid var(--border-inverse);
	border-radius: var(--radius-control);
}

.lov-checkout-compliance .lov-checkout-icon {
	width: var(--icon-md);
	height: var(--icon-md);
	color: var(--blue-300);
}

.lov-checkout-compliance p {
	flex: 1;
	min-width: 0;
	margin: 0;
}

.lov-checkout-footer-bottom {
	border-top: 1px solid var(--border-inverse);
}

.lov-checkout-footer-bottom-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--space-3);
	padding-block: var(--space-4);
	font-size: var(--size-xs);
}

.lov-checkout-company {
	margin: 0;
}

.lov-checkout-sep {
	margin-inline: var(--space-2);
}

.lov-checkout-legal {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.lov-checkout-footer a {
	font-size: var(--size-xs);
	color: var(--text-inverse-muted);
	text-decoration: none;
}

.lov-checkout-footer a:hover {
	color: var(--white);
	text-decoration: underline;
}

/*
 * The checkout form: the shopper's details, then the order in a card; from 64rem the order sits
 * beside the details. Anything else in the form, such as WooCommerce's notices, spans both.
 * includes/checkout-theme.php wraps the details and the order, with whatever plugins print around
 * them, in one element each.
 */

:is(#lov-checkout, #lov-account) .lov-checkout-details,
:is(#lov-checkout, #lov-account) form.checkout > #customer_details {
	margin-bottom: var(--space-8);
}

@media (min-width: 64rem) {
	:is(#lov-checkout, #lov-account) form.checkout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) var(--summary-w);
		column-gap: var(--space-8);
		align-items: start;
	}
	:is(#lov-checkout, #lov-account) form.checkout > * {
		grid-column: 1 / -1;
	}
	:is(#lov-checkout, #lov-account) form.checkout > .lov-checkout-details {
		grid-column: 1;
		margin-bottom: 0;
	}
	:is(#lov-checkout, #lov-account) form.checkout > .lov-checkout-summary {
		grid-column: 2;
	}
}

:is(#lov-checkout, #lov-account) .col2-set {
	display: grid;
	gap: var(--space-6);
	width: auto;
}

:is(#lov-checkout, #lov-account) .col2-set::before,
:is(#lov-checkout, #lov-account) .col2-set::after {
	display: none;
}

:is(#lov-checkout, #lov-account) .col2-set .col-1,
:is(#lov-checkout, #lov-account) .col2-set .col-2 {
	float: none;
	width: auto;
	max-width: none;
}

:is(#lov-checkout, #lov-account) h2,
:is(#lov-checkout, #lov-account) h3 {
	margin: 0 0 var(--space-4);
	font-size: var(--size-xl);
}

/* The order: one card, as the basket's summary; on order pay, the form is the card. */

:is(#lov-checkout, #lov-account) .lov-checkout-summary,
:is(#lov-checkout, #lov-account) form.checkout > #order_review,
:is(#lov-checkout, #lov-account) form#order_review {
	padding: var(--space-5);
	background: var(--surface-card);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-card);
}

:is(#lov-checkout, #lov-account) form#order_review {
	max-width: var(--container-narrow);
}

:is(#lov-checkout, #lov-account) table.shop_table {
	width: 100%;
	margin: 0 0 var(--space-5);
	font-family: var(--font-ui);
	font-size: var(--size-sm);
	border: 0;
	border-collapse: collapse;
	border-radius: 0;
}

:is(#lov-checkout, #lov-account) table.shop_table th,
:is(#lov-checkout, #lov-account) table.shop_table td {
	padding: var(--space-2) 0;
	text-align: left;
	vertical-align: top;
	background: transparent;
	border: 0;
}

:is(#lov-checkout, #lov-account) table.shop_table:not(.woocommerce-checkout-review-order-table) tbody tr + tr td,
:is(#lov-checkout, #lov-account) table.shop_table:not(.woocommerce-checkout-review-order-table) tbody tr + tr th {
	border-top: 1px solid var(--border-subtle);
}

:is(#lov-checkout, #lov-account) table.shop_table th {
	font-weight: var(--weight-regular);
	color: var(--text-body);
}

:is(#lov-checkout, #lov-account) table.shop_table td {
	font-weight: var(--weight-semibold);
	color: var(--text-strong);
}

:is(#lov-checkout, #lov-account) table.shop_table td:last-child,
:is(#lov-checkout, #lov-account) table.shop_table th:last-child:not(:first-child) {
	padding-left: var(--space-3);
	text-align: right;
}

/* The column heads, as the basket's. */
:is(#lov-checkout, #lov-account) table.shop_table thead th {
	padding: 0 0 var(--space-3);
	font-size: var(--size-xs);
	font-weight: var(--weight-semibold);
	letter-spacing: var(--eyebrow-ls);
	text-transform: uppercase;
	color: var(--text-muted);
	border-bottom: 1px solid var(--border-strong);
}

:is(#lov-checkout, #lov-account) table.shop_table tbody td {
	padding-block: var(--space-3);
}

:is(#lov-checkout, #lov-account) table.shop_table .product-name {
	font-weight: var(--weight-semibold);
}

:is(#lov-checkout, #lov-account) table.shop_table .product-name .product-quantity {
	font-weight: var(--weight-regular);
	color: var(--text-muted);
}

:is(#lov-checkout, #lov-account) table.shop_table .product-name dl.variation {
	margin: var(--space-1) 0 0;
	font-size: var(--size-xs);
	font-weight: var(--weight-regular);
	color: var(--text-muted);
}

:is(#lov-checkout, #lov-account) table.shop_table:not(.woocommerce-checkout-review-order-table) tfoot th,
:is(#lov-checkout, #lov-account) table.shop_table:not(.woocommerce-checkout-review-order-table) tfoot td {
	border-top: 1px solid var(--border-subtle);
}

:is(#lov-checkout, #lov-account) table.shop_table:not(.woocommerce-checkout-review-order-table) tfoot tr:first-child th,
:is(#lov-checkout, #lov-account) table.shop_table:not(.woocommerce-checkout-review-order-table) tfoot tr:first-child td {
	border-top-color: var(--border-strong);
}

/* A line's options, such as its colour. */
:is(#lov-checkout, #lov-account) table.shop_table ul.wc-item-meta {
	margin: var(--space-1) 0 0;
	padding: 0;
	font-size: var(--size-xs);
	font-weight: var(--weight-regular);
	list-style: none;
	color: var(--text-muted);
}

:is(#lov-checkout, #lov-account) table.shop_table ul.wc-item-meta li {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1);
	margin: 0;
}

:is(#lov-checkout, #lov-account) table.shop_table ul.wc-item-meta p {
	display: inline;
	margin: 0;
}

:is(#lov-checkout, #lov-account) table.shop_table .wc-item-meta-label {
	float: none;
	margin: 0;
	font-weight: var(--weight-semibold);
}

/* The total, as the basket's. */
:is(#lov-checkout, #lov-account) table.shop_table .order-total th,
:is(#lov-checkout, #lov-account) table.shop_table .order-total td,
:is(#lov-checkout, #lov-account) table.shop_table tr:has(.lov-order-total) th,
:is(#lov-checkout, #lov-account) table.shop_table tr:has(.lov-order-total) td {
	padding-top: var(--space-3);
	vertical-align: baseline;
}

:is(#lov-checkout, #lov-account) table.shop_table .order-total th,
:is(#lov-checkout, #lov-account) table.shop_table tr:has(.lov-order-total) th {
	font-size: var(--size-md);
	font-weight: var(--weight-semibold);
	color: var(--text-strong);
}

:is(#lov-checkout, #lov-account) table.shop_table .order-total td,
:is(#lov-checkout, #lov-account) table.shop_table tr:has(.lov-order-total) td {
	font-size: var(--size-2xl);
	font-weight: var(--weight-bold);
	color: var(--price);
}

:is(#lov-checkout, #lov-account) table.shop_table .order-total td small,
:is(#lov-checkout, #lov-account) table.shop_table .order-total td .includes_tax {
	display: block;
	font-size: var(--size-xs);
	font-weight: var(--weight-regular);
	color: var(--text-muted);
}

/*
 * The order's rows as label and value pairs, so the delivery options can take the card's width,
 * divided as the basket's are: between products, then above the totals and above the total.
 * includes/checkout-theme.php gives the rows their table roles back.
 */
:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table,
:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table thead,
:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table tbody,
:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table tfoot {
	display: block;
}

:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table tr {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-3);
}

:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table th,
:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table td {
	display: block;
	border: 0;
}

:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table thead tr {
	border-bottom: 1px solid var(--border-strong);
}

:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table thead th {
	border-bottom: 0;
}

:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table tbody tr + tr,
:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table tfoot tr:first-child,
:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table tfoot tr.order-total {
	border-top: 1px solid var(--border-subtle);
}

:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table tfoot tr.order-total {
	margin-top: var(--space-2);
}

:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table .product-name {
	flex: 1;
	min-width: 0;
}

:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals {
	flex-wrap: wrap;
}

:is(#lov-checkout, #lov-account) table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals td {
	flex-basis: 100%;
	padding: 0 0 var(--space-3);
	text-align: left;
}

/* The delivery options, as the design system's Radio. */

:is(#lov-checkout, #lov-account) ul#shipping_method {
	display: grid;
	gap: var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

:is(#lov-checkout, #lov-account) ul#shipping_method li {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	margin: 0;
	line-height: var(--lh-snug);
	text-align: left;
}

:is(#lov-checkout, #lov-account) ul#shipping_method li input {
	margin: 0;
}

:is(#lov-checkout, #lov-account) ul#shipping_method label {
	font-weight: var(--weight-regular);
	color: var(--text-body);
	cursor: pointer;
}

:is(#lov-checkout, #lov-account) ul#shipping_method .amount {
	font-weight: var(--weight-semibold);
	color: var(--text-strong);
}

/* Fields: the design system's Input and Select. */

:is(#lov-checkout, #lov-account) .form-row {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	min-width: 0;
	margin: 0 0 var(--space-4);
	padding: 0;
}

/* WooCommerce clears its floats with these; in a column they would add gaps. */
:is(#lov-checkout, #lov-account) .form-row::before,
:is(#lov-checkout, #lov-account) .form-row::after {
	content: none;
}

@media (min-width: 40rem) {
	:is(#lov-checkout, #lov-account) .woocommerce-billing-fields__field-wrapper,
	:is(#lov-checkout, #lov-account) .woocommerce-shipping-fields__field-wrapper {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: var(--space-4);
	}
	:is(#lov-checkout, #lov-account) .woocommerce-billing-fields__field-wrapper > *,
	:is(#lov-checkout, #lov-account) .woocommerce-shipping-fields__field-wrapper > * {
		grid-column: 1 / -1;
	}
	:is(#lov-checkout, #lov-account) .woocommerce-billing-fields__field-wrapper > .form-row-first,
	:is(#lov-checkout, #lov-account) .woocommerce-shipping-fields__field-wrapper > .form-row-first {
		grid-column: 1;
	}
	:is(#lov-checkout, #lov-account) .woocommerce-billing-fields__field-wrapper > .form-row-last,
	:is(#lov-checkout, #lov-account) .woocommerce-shipping-fields__field-wrapper > .form-row-last {
		grid-column: 2;
	}
}

:is(#lov-checkout, #lov-account) .form-row-first,
:is(#lov-checkout, #lov-account) .form-row-last {
	float: none;
	width: auto;
}

:is(#lov-checkout, #lov-account) .form-row label {
	margin: 0;
	font-family: var(--font-ui);
	font-size: var(--size-sm);
	font-weight: var(--weight-semibold);
	line-height: var(--lh-snug);
	color: var(--text-strong);
}

:is(#lov-checkout, #lov-account) .form-row .required {
	color: var(--red-600);
	text-decoration: none;
	border: 0;
}

:is(#lov-checkout, #lov-account) .form-row .optional {
	font-weight: var(--weight-regular);
	color: var(--text-muted);
}

:is(#lov-checkout, #lov-account) .form-row .input-text,
:is(#lov-checkout, #lov-account) .form-row select {
	width: 100%;
	height: var(--control-h-md);
	padding: 0 calc(var(--space-3) + var(--space-1) / 2);
	font-family: var(--font-ui);
	font-size: var(--size-md);
	color: var(--text-strong);
	background: var(--white);
	border: 1px solid var(--border-control);
	border-radius: var(--radius-control);
	box-shadow: none;
	transition: var(--transition-control);
}

:is(#lov-checkout, #lov-account) .form-row textarea.input-text {
	height: auto;
	min-height: calc(var(--control-h-md) * 2);
	padding-block: calc(var(--space-2) + var(--space-1) / 2);
	line-height: var(--lh-body);
	resize: vertical;
}

:is(#lov-checkout, #lov-account) .form-row .input-text::placeholder {
	color: var(--text-muted);
}

:is(#lov-checkout, #lov-account) .form-row .input-text:focus,
:is(#lov-checkout, #lov-account) .form-row select:focus {
	border-color: var(--border-brand);
	outline: none;
	box-shadow: var(--ring-focus);
}

:is(#lov-checkout, #lov-account) .form-row.woocommerce-validated .input-text,
:is(#lov-checkout, #lov-account) .form-row.woocommerce-validated select,
:is(#lov-checkout, #lov-account) .form-row.woocommerce-validated .select2-selection {
	border-color: var(--border-control);
}

/* A field WooCommerce could not accept, as the Input's error: a red border, the label unchanged. */
:is(#lov-checkout, #lov-account) .form-row.woocommerce-invalid .input-text,
:is(#lov-checkout, #lov-account) .form-row.woocommerce-invalid select,
:is(#lov-checkout, #lov-account) .form-row.woocommerce-invalid .select2-selection {
	border-color: var(--red-600);
}

:is(#lov-checkout, #lov-account) .form-row.woocommerce-invalid label {
	color: var(--text-strong);
}

/* WooCommerce's message under that field, with the design system's alert icon beside it. */
:is(#lov-checkout, #lov-account) .checkout-inline-error-message {
	display: flex;
	align-items: center;
	gap: var(--space-1);
	margin: 0;
	font-family: var(--font-ui);
	font-size: var(--size-xs);
	color: var(--red-600);
}

:is(#lov-checkout, #lov-account) .checkout-inline-error-message::before {
	content: '';
	flex: 0 0 auto;
	width: var(--icon-xs);
	height: var(--icon-xs);
	background-color: currentColor;
	-webkit-mask: url('storefront/icons/triangle-alert.svg') center / contain no-repeat;
	mask: url('storefront/icons/triangle-alert.svg') center / contain no-repeat;
}

/* A field's own help, as the Input's note, in place of WooCommerce's pop-up box. */
:is(#lov-checkout, #lov-account) .woocommerce-input-wrapper .description {
	margin: var(--space-2) 0 0;
	padding: 0;
	font-family: var(--font-ui);
	font-size: var(--size-xs);
	color: var(--text-muted);
	background: none;
	border-radius: 0;
}

:is(#lov-checkout, #lov-account) .woocommerce-input-wrapper .description::before {
	display: none;
}

/* A plain select, as the design system's Select, with its chevron beside it. */
:is(#lov-checkout, #lov-account) .form-row select {
	padding-right: var(--space-8);
	font-weight: var(--weight-medium);
	background-image: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

:is(#lov-checkout, #lov-account) .woocommerce-input-wrapper:has(> select:not(.select2-hidden-accessible, .country_to_state--single)) {
	position: relative;
}

:is(#lov-checkout, #lov-account) .woocommerce-input-wrapper:has(> select:not(.select2-hidden-accessible, .country_to_state--single))::after {
	content: '';
	position: absolute;
	top: calc(var(--control-h-md) / 2);
	right: calc(var(--space-3) + var(--space-1) / 2);
	width: var(--icon-sm);
	height: var(--icon-sm);
	background-color: var(--text-muted);
	transform: translateY(-50%);
	pointer-events: none;
	-webkit-mask: url('storefront/icons/chevron-down.svg') center / contain no-repeat;
	mask: url('storefront/icons/chevron-down.svg') center / contain no-repeat;
}

/* A shop that delivers to one country: WooCommerce shows it as text, not a choice. */
:is(#lov-checkout, #lov-account) .form-row select.country_to_state--single {
	height: auto;
	padding: 0;
	font-weight: var(--weight-semibold);
	background: none;
	border: 0;
	pointer-events: none;
}

/* Country and county, when there is a choice: select2 as the design system's Select. */

:is(#lov-checkout, #lov-account) .select2-container .select2-selection--single {
	display: flex;
	align-items: center;
	height: var(--control-h-md);
	background: var(--white);
	border: 1px solid var(--border-control);
	border-radius: var(--radius-control);
	transition: var(--transition-control);
}

:is(#lov-checkout, #lov-account) .select2-container .select2-selection--single .select2-selection__rendered {
	flex: 1;
	padding-inline: calc(var(--space-3) + var(--space-1) / 2) var(--space-8);
	font-family: var(--font-ui);
	font-size: var(--size-md);
	font-weight: var(--weight-medium);
	line-height: var(--lh-snug);
	color: var(--text-strong);
}

:is(#lov-checkout, #lov-account) .select2-container .select2-selection--single .select2-selection__placeholder {
	color: var(--text-muted);
}

:is(#lov-checkout, #lov-account) .select2-container .select2-selection--single .select2-selection__arrow {
	top: 50%;
	right: calc(var(--space-3) + var(--space-1) / 2);
	width: var(--icon-sm);
	height: var(--icon-sm);
	color: var(--text-muted);
	background-color: currentColor;
	transform: translateY(-50%);
	-webkit-mask: url('storefront/icons/chevron-down.svg') center / contain no-repeat;
	mask: url('storefront/icons/chevron-down.svg') center / contain no-repeat;
}

:is(#lov-checkout, #lov-account) .select2-container .select2-selection--single .select2-selection__arrow b {
	display: none;
}

:is(#lov-checkout, #lov-account) .select2-container--focus .select2-selection--single,
:is(#lov-checkout, #lov-account) .select2-container--open .select2-selection--single {
	border-color: var(--border-brand);
	box-shadow: var(--ring-focus);
}

body:is(.lov-checkout, .lov-account) .select2-dropdown {
	font-family: var(--font-ui);
	font-size: var(--size-sm);
	color: var(--text-body);
	border: 1px solid var(--border-brand);
	border-radius: var(--radius-control);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}

body:is(.lov-checkout, .lov-account) .select2-search--dropdown {
	padding: var(--space-2);
}

body:is(.lov-checkout, .lov-account) .select2-search--dropdown .select2-search__field {
	height: var(--control-h-sm);
	padding: 0 var(--space-3);
	font-family: var(--font-ui);
	font-size: var(--size-md);
	border: 1px solid var(--border-control);
	border-radius: var(--radius-control);
}

body:is(.lov-checkout, .lov-account) .select2-results__option {
	padding: var(--space-2) var(--space-3);
}

body:is(.lov-checkout, .lov-account) .select2-container--default .select2-results__option--highlighted[aria-selected],
body:is(.lov-checkout, .lov-account) .select2-container--default .select2-results__option--highlighted[data-selected] {
	color: var(--brand-contrast);
	background: var(--brand);
}

/*
 * Choices: the design system's Checkbox and Radio. WooCommerce gives some of them an inline width,
 * which the minimum size outlasts. In forced colours, the browser's own controls come back, as the
 * tick and dot are drawn with colours those modes replace.
 */

:is(#lov-checkout, #lov-account) input[type='checkbox'],
:is(#lov-checkout, #lov-account) input[type='radio'] {
	display: inline-grid;
	flex: 0 0 auto;
	place-content: center;
	width: var(--choice-box);
	min-width: var(--choice-box);
	height: var(--choice-box);
	min-height: var(--choice-box);
	margin: 0;
	background: var(--white);
	border: 1px solid var(--border-control);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: var(--transition-control);
}

:is(#lov-checkout, #lov-account) input[type='checkbox'] {
	border-radius: var(--radius-xs);
}

:is(#lov-checkout, #lov-account) input[type='radio'] {
	border-radius: var(--radius-pill);
}

:is(#lov-checkout, #lov-account) input[type='checkbox']:hover,
:is(#lov-checkout, #lov-account) input[type='radio']:hover {
	border-color: var(--border-strong);
}

:is(#lov-checkout, #lov-account) input[type='checkbox']:checked {
	background: var(--brand);
	border-color: var(--brand);
}

/* The tick: the design system's check icon, in white. */
:is(#lov-checkout, #lov-account) input[type='checkbox']:checked::after {
	content: '';
	width: var(--icon-xs);
	height: var(--icon-xs);
	background-color: var(--white);
	-webkit-mask: url('storefront/icons/check.svg') center / contain no-repeat;
	mask: url('storefront/icons/check.svg') center / contain no-repeat;
}

:is(#lov-checkout, #lov-account) input[type='radio']:checked {
	border-color: var(--brand);
}

:is(#lov-checkout, #lov-account) input[type='radio']:checked::after {
	content: '';
	width: calc(var(--choice-box) / 2);
	height: calc(var(--choice-box) / 2);
	background: var(--brand);
	border-radius: var(--radius-pill);
}

:is(#lov-checkout, #lov-account) input[type='checkbox']:focus-visible,
:is(#lov-checkout, #lov-account) input[type='radio']:focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}

@media (forced-colors: active) {
	:is(#lov-checkout, #lov-account) input[type='checkbox'],
	:is(#lov-checkout, #lov-account) input[type='radio'] {
		-webkit-appearance: auto;
		appearance: auto;
	}
	:is(#lov-checkout, #lov-account) input[type='checkbox']::after,
	:is(#lov-checkout, #lov-account) input[type='radio']::after {
		content: none;
	}
}

/* A choice's label: WooCommerce's own and any field of type checkbox. */
:is(#lov-checkout, #lov-account) label.woocommerce-form__label-for-checkbox,
:is(#lov-checkout, #lov-account) .form-row label.woocommerce-form__label-for-checkbox,
:is(#lov-checkout, #lov-account) .form-row label.checkbox,
:is(#lov-checkout, #lov-account) #ship-to-different-address label {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	min-height: var(--tap-min);
	margin: 0;
	font-family: var(--font-ui);
	font-size: var(--size-sm);
	font-weight: var(--weight-regular);
	color: var(--text-body);
	cursor: pointer;
}

:is(#lov-checkout, #lov-account) #ship-to-different-address {
	float: none;
	margin: 0 0 var(--space-4);
	font-size: var(--size-md);
}

:is(#lov-checkout, #lov-account) #ship-to-different-address label {
	font-size: var(--size-md);
	font-weight: var(--weight-semibold);
	color: var(--text-strong);
}

/* Payment: each method a Radio card, as the design system's. */

:is(#lov-checkout, #lov-account) #payment {
	background: transparent;
	border-radius: 0;
}

:is(#lov-checkout, #lov-account) #payment ul.payment_methods {
	display: grid;
	gap: var(--space-3);
	margin: 0 0 var(--space-5);
	padding: 0;
	list-style: none;
	border: 0;
}

:is(#lov-checkout, #lov-account) #payment ul.payment_methods::before,
:is(#lov-checkout, #lov-account) #payment ul.payment_methods::after,
:is(#lov-checkout, #lov-account) #payment ul.payment_methods li.wc_payment_method::before,
:is(#lov-checkout, #lov-account) #payment ul.payment_methods li.wc_payment_method::after {
	content: none;
}

:is(#lov-checkout, #lov-account) #payment ul.payment_methods li.wc_payment_method {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-3);
	margin: 0;
	padding: var(--space-3) var(--space-4);
	font-family: var(--font-ui);
	font-size: var(--size-sm);
	line-height: var(--lh-snug);
	background: var(--white);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-control);
	transition: var(--transition-control);
}

/* The chosen method: its own radio, not a saved card's inside it. */
:is(#lov-checkout, #lov-account) #payment ul.payment_methods li.wc_payment_method:has(> input:checked) {
	background: var(--surface-brand-soft);
	border-color: var(--border-brand);
}

:is(#lov-checkout, #lov-account) #payment ul.payment_methods li input {
	margin: 0;
}

:is(#lov-checkout, #lov-account) #payment ul.payment_methods li.wc_payment_method > label {
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
	min-height: var(--tap-min);
	margin: 0;
	font-weight: var(--weight-semibold);
	color: var(--text-strong);
	cursor: pointer;
}

:is(#lov-checkout, #lov-account) #payment ul.payment_methods li.wc_payment_method img {
	max-height: var(--icon-lg);
	margin: 0;
}

/* No method to offer: WooCommerce's notice alone. */
:is(#lov-checkout, #lov-account) #payment ul.payment_methods > li:not(.wc_payment_method) {
	margin: 0;
	padding: 0;
}

:is(#lov-checkout, #lov-account) #payment ul.payment_methods > li:not(.wc_payment_method) > * {
	margin: 0;
}

:is(#lov-checkout, #lov-account) #payment div.payment_box {
	flex-basis: 100%;
	margin: 0;
	padding: var(--space-3) var(--space-4);
	font-size: var(--size-sm);
	line-height: var(--lh-body);
	color: var(--text-body);
	background: var(--surface-sunken);
	border-radius: var(--radius-control);
}

:is(#lov-checkout, #lov-account) #payment div.payment_box::before {
	display: none;
}

:is(#lov-checkout, #lov-account) #payment div.payment_box p:last-child {
	margin-bottom: 0;
}

/* A payment method's own fields, as the design system's Input. */
:is(#lov-checkout, #lov-account) #payment div.payment_box .form-row {
	margin: 0 0 var(--space-4);
	padding: 0;
}

:is(#lov-checkout, #lov-account) #payment div.payment_box .form-row:last-child {
	margin-bottom: 0;
}

:is(#lov-checkout, #lov-account) #payment div.payment_box .input-text,
:is(#lov-checkout, #lov-account) #payment div.payment_box textarea {
	padding: 0 calc(var(--space-3) + var(--space-1) / 2);
	font-size: var(--size-md);
	border-color: var(--border-control);
}

:is(#lov-checkout, #lov-account) #payment div.payment_box .input-text:focus,
:is(#lov-checkout, #lov-account) #payment div.payment_box textarea:focus {
	border-color: var(--border-brand);
}

:is(#lov-checkout, #lov-account) #payment .form-row select {
	width: 100%;
}

/* Saved cards, and "Save to account", as the design system's Radio and Checkbox rows. */
:is(#lov-checkout, #lov-account) #payment .woocommerce-SavedPaymentMethods {
	display: grid;
	gap: var(--space-2);
	margin: 0 0 var(--space-3);
	padding: 0;
	list-style: none;
}

:is(#lov-checkout, #lov-account) #payment .woocommerce-SavedPaymentMethods li {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin: 0;
}

:is(#lov-checkout, #lov-account) #payment .woocommerce-SavedPaymentMethods-tokenInput {
	position: static;
	margin: 0;
}

:is(#lov-checkout, #lov-account) #payment .woocommerce-SavedPaymentMethods label {
	cursor: pointer;
}

:is(#lov-checkout, #lov-account) .form-row.woocommerce-SavedPaymentMethods-saveNew {
	flex-direction: row;
	align-items: center;
	gap: var(--space-3);
}

:is(#lov-checkout, #lov-account) .form-row.woocommerce-SavedPaymentMethods-saveNew label {
	font-weight: var(--weight-regular);
	color: var(--text-body);
	cursor: pointer;
}

/* The row with the terms and the button; on order pay, WooCommerce's padded form row. */
:is(#lov-checkout, #lov-account) #payment > .form-row {
	margin: 0;
	padding: 0;
}

:is(#lov-checkout, #lov-account) .woocommerce-privacy-policy-text,
:is(#lov-checkout, #lov-account) .woocommerce-terms-and-conditions-wrapper {
	font-family: var(--font-ui);
	font-size: var(--size-xs);
	color: var(--text-muted);
}

/* The terms line: its text and required mark wrap together beside the box. */
:is(#lov-checkout, #lov-account) .woocommerce-terms-and-conditions-wrapper .form-row label.woocommerce-form__label-for-checkbox {
	position: relative;
	display: block;
	min-height: 0;
	margin-bottom: var(--space-4);
	padding-left: calc(var(--choice-box) + var(--space-3));
	font-size: var(--size-sm);
	line-height: var(--lh-snug);
	color: var(--text-body);
}

:is(#lov-checkout, #lov-account) .woocommerce-terms-and-conditions-wrapper .form-row label.woocommerce-form__label-for-checkbox input {
	position: absolute;
	top: 0;
	left: 0;
}

/* The terms, when a shopper opens them in place. */
:is(#lov-checkout, #lov-account) .woocommerce-terms-and-conditions {
	margin: 0 0 var(--space-4);
	padding: var(--space-4);
	font-size: var(--size-xs);
	color: var(--text-body);
	background: var(--surface-sunken);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-control);
	box-shadow: none;
}

/* Buttons: the design system's primary to place the order and for each account form's own button,
   its secondary for the rest. */

:is(#lov-checkout, #lov-account) .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: var(--control-h-md);
	padding: 0 var(--space-5);
	font-family: var(--font-ui);
	font-size: var(--size-md);
	font-weight: var(--weight-semibold);
	line-height: 1;
	letter-spacing: 0.01em;
	text-decoration: none;
	white-space: nowrap;
	color: var(--brand);
	background: var(--white);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-control);
	box-shadow: none;
	cursor: pointer;
	transition:
		var(--transition-control),
		transform var(--dur-instant) var(--ease-out);
}

:is(#lov-checkout, #lov-account) .button:hover {
	color: var(--brand-hover);
	text-decoration: none;
	background: var(--blue-50);
	border-color: var(--border-brand);
}

:is(#lov-checkout, #lov-account) .button:active {
	color: var(--brand-hover);
	background: var(--blue-100);
	border-color: var(--border-brand);
}

:is(#lov-checkout, #lov-account) .button:active:not(:disabled) {
	transform: scale(var(--press-scale));
}

:is(#lov-checkout, #lov-account) #place_order,
:is(#lov-checkout, #lov-account) .button.alt,
#lov-account form .button[type='submit'] {
	color: var(--brand-contrast);
	background: var(--cta);
	border-color: transparent;
	box-shadow: var(--shadow-sm);
}

:is(#lov-checkout, #lov-account) #place_order:hover,
:is(#lov-checkout, #lov-account) .button.alt:hover,
#lov-account form .button[type='submit']:hover {
	color: var(--brand-contrast);
	background: var(--cta-hover);
}

:is(#lov-checkout, #lov-account) #place_order:active,
:is(#lov-checkout, #lov-account) .button.alt:active,
#lov-account form .button[type='submit']:active {
	background: var(--brand-press);
}

:is(#lov-checkout, #lov-account) #payment #place_order,
:is(#lov-checkout, #lov-account) #place_order {
	display: flex;
	float: none;
	width: 100%;
	min-height: var(--control-h-lg);
	margin: 0;
	padding: 0 calc(var(--space-6) + var(--space-1));
	font-size: var(--size-lg);
	white-space: normal;
}

/* Disabled goes flat, as the Button's. */
:is(#lov-checkout, #lov-account) .button:disabled,
:is(#lov-checkout, #lov-account) .button.disabled,
:is(#lov-checkout, #lov-account) .button:disabled:hover,
:is(#lov-checkout, #lov-account) .button.disabled:hover,
#lov-account form .button[type='submit']:disabled,
#lov-account form .button[type='submit']:disabled:hover {
	color: var(--ink-500);
	background: var(--ink-200);
	border-color: transparent;
	box-shadow: none;
	cursor: not-allowed;
	opacity: 1;
}

/* Notices: the design system's Alert, its glyph in the tone's colour. */

:is(#lov-checkout, #lov-account) .woocommerce-error,
:is(#lov-checkout, #lov-account) .woocommerce-info,
:is(#lov-checkout, #lov-account) .woocommerce-message,
:is(#lov-checkout, #lov-account) .woocommerce-notice,
:is(#lov-checkout, #lov-account) .wc-block-components-notice-banner {
	--alert-fg: var(--blue-800);
	--alert-accent: var(--blue-600);
	position: relative;
	display: block;
	margin: 0 0 var(--space-5);
	padding: var(--space-4) var(--space-4) var(--space-4)
		calc(var(--space-4) + var(--icon-md) + var(--space-3));
	font-family: var(--font-ui);
	font-size: var(--size-sm);
	line-height: var(--lh-snug);
	list-style: none;
	color: var(--alert-fg);
	background: var(--blue-50);
	border: 1px solid var(--blue-200);
	border-radius: var(--radius-control);
}

:is(#lov-checkout, #lov-account) .woocommerce-error::before,
:is(#lov-checkout, #lov-account) .woocommerce-info::before,
:is(#lov-checkout, #lov-account) .woocommerce-message::before,
:is(#lov-checkout, #lov-account) .woocommerce-notice::before,
:is(#lov-checkout, #lov-account) .wc-block-components-notice-banner::before {
	content: '';
	position: absolute;
	top: var(--space-4);
	left: var(--space-4);
	width: var(--icon-md);
	height: var(--icon-md);
	background-color: var(--alert-accent);
	-webkit-mask: url('storefront/icons/info.svg') center / contain no-repeat;
	mask: url('storefront/icons/info.svg') center / contain no-repeat;
}

:is(#lov-checkout, #lov-account) .wc-block-components-notice-banner > svg {
	display: none;
}

:is(#lov-checkout, #lov-account) .woocommerce-message,
:is(#lov-checkout, #lov-account) .woocommerce-notice--success,
:is(#lov-checkout, #lov-account) .wc-block-components-notice-banner.is-success {
	--alert-fg: color-mix(in srgb, var(--green-600) 55%, var(--ink-900));
	--alert-accent: var(--green-600);
	background: var(--green-100);
	border-color: color-mix(in srgb, var(--green-600) 30%, var(--green-100));
}

:is(#lov-checkout, #lov-account) .woocommerce-message::before,
:is(#lov-checkout, #lov-account) .woocommerce-notice--success::before,
:is(#lov-checkout, #lov-account) .wc-block-components-notice-banner.is-success::before {
	-webkit-mask-image: url('storefront/icons/circle-check.svg');
	mask-image: url('storefront/icons/circle-check.svg');
}

:is(#lov-checkout, #lov-account) .woocommerce-error,
:is(#lov-checkout, #lov-account) .woocommerce-notice--error,
:is(#lov-checkout, #lov-account) .wc-block-components-notice-banner.is-error {
	--alert-fg: color-mix(in srgb, var(--red-600) 70%, var(--ink-900));
	--alert-accent: var(--red-600);
	background: var(--red-100);
	border-color: color-mix(in srgb, var(--red-600) 25%, var(--red-100));
}

:is(#lov-checkout, #lov-account) .woocommerce-error::before,
:is(#lov-checkout, #lov-account) .woocommerce-notice--error::before,
:is(#lov-checkout, #lov-account) .wc-block-components-notice-banner.is-error::before {
	-webkit-mask-image: url('storefront/icons/triangle-alert.svg');
	mask-image: url('storefront/icons/triangle-alert.svg');
}

/* After a declined payment, the way on: WooCommerce's buttons, not a second notice. */
:is(#lov-checkout, #lov-account) .woocommerce-notice.woocommerce-thankyou-order-failed-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	padding: 0;
	background: none;
	border: 0;
}

:is(#lov-checkout, #lov-account) .woocommerce-notice.woocommerce-thankyou-order-failed-actions::before {
	display: none;
}

/* WooCommerce marks both of its buttons "pay": the first, Pay, is the primary. */
:is(#lov-checkout, #lov-account) .woocommerce-thankyou-order-failed-actions .button:first-child {
	color: var(--brand-contrast);
	background: var(--cta);
	border-color: transparent;
	box-shadow: var(--shadow-sm);
}

:is(#lov-checkout, #lov-account) .woocommerce-thankyou-order-failed-actions .button:first-child:hover {
	background: var(--cta-hover);
}

/* A notice listing several problems: one line each, level with the text. */
:is(#lov-checkout, #lov-account) .wc-block-components-notice-banner__content ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

:is(#lov-checkout, #lov-account) .woocommerce-error li,
:is(#lov-checkout, #lov-account) .wc-block-components-notice-banner__content li {
	margin: 0;
}

:is(#lov-checkout, #lov-account) .woocommerce-error li + li,
:is(#lov-checkout, #lov-account) .wc-block-components-notice-banner__content li + li {
	margin-top: var(--space-2);
}

:is(#lov-checkout, #lov-account) .woocommerce-error a,
:is(#lov-checkout, #lov-account) .woocommerce-info a,
:is(#lov-checkout, #lov-account) .woocommerce-message a,
:is(#lov-checkout, #lov-account) .wc-block-components-notice-banner a {
	font-weight: var(--weight-semibold);
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* A notice's own button, such as "View basket", sits after its text. */
:is(#lov-checkout, #lov-account) .woocommerce-message .button,
:is(#lov-checkout, #lov-account) .woocommerce-info .button {
	float: none;
	margin-top: var(--space-3);
}

/* Order received and order pay: a readable column. */

:is(#lov-checkout, #lov-account) .woocommerce-order {
	max-width: var(--container-narrow);
}

:is(#lov-checkout, #lov-account) ul.woocommerce-order-overview {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4) var(--space-8);
	margin: 0 0 var(--space-6);
	padding: var(--space-5);
	list-style: none;
	background: var(--surface-card);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-card);
}

:is(#lov-checkout, #lov-account) ul.woocommerce-order-overview::before,
:is(#lov-checkout, #lov-account) ul.woocommerce-order-overview::after {
	display: none;
}

:is(#lov-checkout, #lov-account) ul.woocommerce-order-overview li {
	float: none;
	margin: 0;
	padding: 0;
	font-family: var(--font-ui);
	font-size: var(--size-xs);
	font-weight: var(--weight-semibold);
	line-height: var(--lh-snug);
	letter-spacing: var(--eyebrow-ls);
	text-transform: uppercase;
	color: var(--text-muted);
	border: 0;
}

:is(#lov-checkout, #lov-account) ul.woocommerce-order-overview li strong {
	display: block;
	margin-top: var(--space-1);
	font-size: var(--size-md);
	font-weight: var(--weight-semibold);
	letter-spacing: 0;
	text-transform: none;
	color: var(--text-strong);
}

:is(#lov-checkout, #lov-account) .woocommerce-order-details,
:is(#lov-checkout, #lov-account) .woocommerce-customer-details {
	margin-top: var(--space-8);
}

:is(#lov-checkout, #lov-account) .woocommerce-table--order-details small.shipped_via {
	font-weight: var(--weight-regular);
	color: var(--text-muted);
}

:is(#lov-checkout, #lov-account) .woocommerce-customer-details address {
	padding: var(--space-4);
	font-style: normal;
	line-height: var(--lh-body);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-control);
}

:is(#lov-checkout, #lov-account) .woocommerce-customer-details .col2-set {
	display: grid;
	gap: var(--space-6);
}

@media (min-width: 48rem) {
	:is(#lov-checkout, #lov-account) .woocommerce-customer-details .col2-set {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
}
