/*
 * The bag, checkout, order received and account pages.
 *
 * WooCommerce's block cart and checkout (and the classic account shortcode) sit on one white
 * panel against the dark page, like the product details panel: ink text, Cinzel headings,
 * 19px fields with their labels above them, moss hairlines. WooCommerce's own stylesheets
 * (wc-blocks-style, the cart and checkout block styles and the packages style) are kept for
 * layout but every colour they set is replaced here with a palette colour: their greys,
 * translucent currentColor borders, skeleton shimmer and #f0f0f0 panels never show.
 *
 * Selectors are prefixed with .tm-commerce (or .tm-commerce-page for the notices outside the
 * panel) so they outrank WooCommerce's without !important.
 */

/* ---------- Page and panel ---------- */

.tm-commerce-page {
	padding-inline: var(--tm-gutter);
}

.tm-commerce {
	--tm-line: var(--tm-moss);
	--tm-focus-ring: var(--tm-ink);
	/* WooCommerce draws most of its rules in this colour (a translucent currentColor by default). */
	--wc-separator-color: var(--tm-moss);
	/* WooCommerce sizes much of its text from these presets (14px and 22px when a theme has none). */
	--wp--preset--font-size--small: 1.1875rem;
	--wp--preset--font-size--medium: 1.375rem;
	box-sizing: border-box;
	max-width: 76rem;
	margin-inline: auto;
	padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 3.5rem);
	background-color: var(--tm-white);
	color: var(--tm-ink);
	box-shadow: var(--tm-shadow);
	font-size: 1.1875rem;
	line-height: 1.6;
}

.tm-commerce--account {
	max-width: 48rem;
}

.tm-commerce--received {
	max-width: 56rem;
}

/* Who the customer bought from, at the foot of the order confirmation. */
.tm-company-note {
	margin-block-start: 2.5rem;
	font-size: 0.9375rem;
	line-height: 1.6;
}

.tm-commerce > .wp-block-post-content > :first-child,
.tm-commerce > :first-child {
	margin-block-start: 0;
}

.tm-commerce > .wp-block-post-content > :last-child,
.tm-commerce > :last-child {
	margin-block-end: 0;
}

/* Form controls the blocks leave to the browser's defaults (black text and borders). */
.tm-commerce input,
.tm-commerce select,
.tm-commerce textarea {
	color: var(--tm-ink);
	border-color: var(--tm-ink);
}

/* Every hairline WooCommerce draws, whatever colour it chose, is moss. */
.tm-commerce *,
.tm-commerce *::before,
.tm-commerce *::after {
	border-color: var(--tm-line);
}

.tm-commerce a {
	color: var(--tm-ink);
}

.tm-commerce a:hover {
	text-decoration-color: var(--tm-moss);
	text-decoration-thickness: 2px;
}

.tm-commerce :focus-visible {
	outline: 3px solid var(--tm-ink);
	outline-offset: 3px;
}

/* ---------- Headings ---------- */

.tm-commerce h2,
.tm-commerce h3,
.tm-commerce .wc-block-components-title.wc-block-components-title,
.tm-commerce .wc-block-components-checkout-step__heading .wc-block-components-checkout-step__title,
.tm-commerce .wc-block-cart__totals-title.wc-block-cart__totals-title,
.tm-commerce .wc-block-components-checkout-order-summary__title-text {
	margin-block: 0 1rem;
	color: var(--tm-ink);
	font-family: var(--tm-font-display);
	font-size: 1.5rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	line-height: 1.3;
	text-transform: none;
}

.tm-commerce .wc-block-cart-items__header,
.tm-commerce .wc-block-cart-items__header th {
	color: var(--tm-ink);
	font-family: var(--tm-font-display);
	font-size: 1.0625rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: none;
}

/* ---------- Layout ---------- */

.tm-commerce .wc-block-components-sidebar-layout {
	margin-bottom: 0;
}

.tm-commerce .wc-block-components-sidebar-layout .wc-block-components-main {
	padding-right: clamp(0px, 4vw, 3.5rem);
}

/* The order summary sits on its own with a moss rule down its side, not in a box. */
.tm-commerce .wc-block-components-sidebar,
.tm-commerce .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
	border-color: var(--tm-line);
	border-radius: 0;
}

.tm-commerce .wc-block-components-sidebar .wc-block-components-panel,
.tm-commerce .wc-block-components-sidebar .wc-block-components-totals-coupon,
.tm-commerce .wc-block-components-sidebar .wc-block-components-totals-item {
	padding-inline: 0;
}

.tm-commerce .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
	border: 0;
	border-left: 1px solid var(--tm-line);
	padding-left: clamp(1rem, 3vw, 2rem);
}

@media (max-width: 699px) {
	.tm-commerce .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
		border-left: 0;
		padding-left: 0;
	}
}

/* ---------- The bag's rows ---------- */

.tm-commerce table.wc-block-cart-items,
.tm-commerce table.wc-block-cart-items th,
.tm-commerce table.wc-block-cart-items td {
	border-color: var(--tm-line);
	background-color: transparent;
}

.tm-commerce .wc-block-cart-item__image img,
.tm-commerce .wc-block-components-order-summary-item__image img {
	border-radius: 0;
	background-color: var(--tm-moss);
}

.tm-commerce .wc-block-components-product-name,
.tm-commerce table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
	color: var(--tm-ink);
	font-family: var(--tm-font-display);
	font-size: 1.1875rem;
	letter-spacing: 0.03em;
	line-height: 1.35;
	text-decoration: none;
}

.tm-commerce a.wc-block-components-product-name:hover {
	text-decoration: underline;
}

.tm-commerce .wc-block-components-product-metadata,
.tm-commerce .wc-block-components-product-metadata__description,
.tm-commerce .wc-block-cart-item__prices,
.tm-commerce .wc-block-components-product-price {
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-components-product-metadata:empty {
	display: none;
}

.tm-commerce table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-inline-start: -10px;
}

.tm-commerce .wc-block-cart-item__remove-link svg {
	fill: currentColor;
}

.tm-commerce .wc-block-cart-item__remove-link.wc-block-cart-item__remove-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0;
	color: var(--tm-ink);
	font-size: 1.1875rem;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.tm-commerce .wc-block-cart-item__remove-link:hover {
	text-decoration-color: var(--tm-moss);
	text-decoration-thickness: 2px;
}

.tm-commerce .wc-block-cart-item__total,
.tm-commerce .wc-block-components-order-summary-item__total-price {
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

/*
 * The card's short description repeats what the shopper has just read on its page, and the summary column
 * is too narrow to hold it, so it ran to a tall block of one-word lines. The name and price are enough.
 */
.tm-commerce .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-product-metadata__description {
	display: none;
}

/* The order summary's photo counter: "1" in a circle, which a one-off card does not need. */
.tm-commerce .wc-block-components-order-summary-item__quantity {
	display: none;
}

.tm-commerce .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-product-name {
	font-family: var(--tm-font-body);
	font-size: 1.1875rem;
	font-weight: 700;
	letter-spacing: 0;
}

.tm-commerce .wc-block-components-order-summary-item__description p,
.tm-commerce .wc-block-components-order-summary-item__description .wc-block-components-product-price {
	font-size: 1.1875rem;
}

/* ---------- Totals ---------- */

.tm-commerce .wc-block-components-totals-wrapper {
	border-color: var(--tm-line);
	padding-block: 1.25rem;
}

.tm-commerce .wc-block-components-totals-item,
.tm-commerce .wc-block-components-totals-item__label,
.tm-commerce .wc-block-components-totals-item__value {
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-components-totals-item__description,
.tm-commerce .wc-block-components-totals-shipping__via,
.tm-commerce .wc-block-components-totals-item__description .wc-block-components-totals-shipping__via {
	color: var(--tm-ink);
	font-size: 1.1875rem;
	line-height: 1.5;
}

.tm-commerce .wc-block-components-totals-footer-item,
.tm-commerce .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.tm-commerce .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-family: var(--tm-font-display);
	font-size: 1.375rem;
	font-weight: 400;
	letter-spacing: 0.04em;
}

.tm-commerce .wc-block-components-totals-footer-item-tax {
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

/* The order summary heading on checkout is a button on phones that opens the list. */
.tm-commerce .wc-block-components-checkout-order-summary__title {
	color: var(--tm-ink);
	border-color: var(--tm-line);
}

.tm-commerce .wc-block-components-checkout-order-summary__title-price {
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-components-checkout-order-summary__title-icon,
.tm-commerce .wc-block-components-panel__button-icon {
	fill: var(--tm-ink);
}

/* "Add coupons": a disclosure panel. */
.tm-commerce .wc-block-components-panel__button,
.tm-commerce .wc-block-components-panel__button:hover,
.tm-commerce .wc-block-components-panel__button:focus {
	min-height: 44px;
	color: var(--tm-ink);
	background-color: transparent;
	font-family: var(--tm-font-body);
	font-size: 1.1875rem;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* ---------- Fields: the label above the box, 19px, moss border, ink focus ---------- */

.tm-commerce .wc-block-components-text-input,
.tm-commerce .wc-blocks-components-select__container {
	display: flex;
	flex-direction: column;
}

.tm-commerce .wc-block-components-form .wc-block-components-text-input label,
.tm-commerce .wc-block-components-text-input label,
.tm-commerce .wc-blocks-components-select .wc-blocks-components-select__label {
	position: static;
	order: -1;
	max-width: none;
	margin: 0 0 0.4rem;
	color: var(--tm-ink);
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.4;
	white-space: normal;
	transform: none;
	transition: none;
}

.tm-commerce .wc-block-components-form .wc-block-components-text-input input[type],
.tm-commerce .wc-block-components-text-input input[type],
.tm-commerce .wc-block-components-form .wc-block-components-text-input.is-active input[type],
.tm-commerce .wc-block-components-text-input.is-active input[type],
.tm-commerce .wc-blocks-components-select .wc-blocks-components-select__select,
.tm-commerce .wc-block-components-textarea,
.tm-commerce textarea,
.tm-commerce .woocommerce-Input,
.tm-commerce .input-text,
.tm-commerce select {
	box-sizing: border-box;
	width: 100%;
	height: auto;
	min-height: 3.25rem;
	margin: 0;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--tm-moss);
	border-radius: 0;
	background-color: var(--tm-white);
	color: var(--tm-ink);
	font-family: var(--tm-font-body);
	font-size: 1.1875rem;
	line-height: 1.4;
	box-shadow: none;
}

.tm-commerce .wc-blocks-components-select .wc-blocks-components-select__select {
	padding-right: 3rem;
	appearance: none;
}

.tm-commerce .wc-blocks-components-select .wc-blocks-components-select__container {
	height: auto;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	position: relative;
}

.tm-commerce .wc-blocks-components-select .wc-blocks-components-select__expand {
	top: auto;
	bottom: 0.9rem;
	right: 0.8rem;
	transform: none;
	fill: var(--tm-ink);
}

.tm-commerce .wc-block-components-form .wc-block-components-text-input input[type]:focus,
.tm-commerce .wc-block-components-text-input input[type]:focus,
.tm-commerce .wc-blocks-components-select .wc-blocks-components-select__select:focus,
.tm-commerce textarea:focus,
.tm-commerce .woocommerce-Input:focus,
.tm-commerce .input-text:focus,
.tm-commerce select:focus {
	border-color: var(--tm-ink);
	outline: 3px solid var(--tm-ink);
	outline-offset: 2px;
	box-shadow: none;
}

.tm-commerce ::placeholder {
	color: var(--tm-moss);
	opacity: 1;
}

.tm-commerce .wc-block-components-text-input,
.tm-commerce .wc-block-components-address-form .wc-block-components-text-input,
.tm-commerce .wc-block-components-address-form .wc-block-components-country-input,
.tm-commerce .wc-block-components-address-form .wc-block-components-state-input {
	margin-top: 1.25rem;
}

/* Errors: garnet, bold, never colour alone (WooCommerce adds the message text). */
.tm-commerce .has-error input[type],
.tm-commerce .has-error select,
.tm-commerce .has-error .wc-blocks-components-select__select,
.tm-commerce .has-error textarea {
	border: 2px solid var(--tm-garnet);
}

.tm-commerce .has-error label,
.tm-commerce .wc-block-components-validation-error,
.tm-commerce .wc-block-components-validation-error > p {
	color: var(--tm-garnet);
	font-size: 1.1875rem;
	font-weight: 700;
}

.tm-commerce .wc-block-components-validation-error svg {
	fill: var(--tm-garnet);
}

.tm-commerce .wc-block-checkout__guest-checkout-notice,
.tm-commerce .wc-block-components-checkout-step__description,
.tm-commerce .wc-block-components-address-form__address_2-toggle {
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-components-address-form__address_2-toggle {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	text-decoration: underline;
}

/* The saved address, shown as a card with Edit. */
.tm-commerce .wc-block-components-address-card {
	border: 1px solid var(--tm-line);
	border-radius: 0;
	color: var(--tm-ink);
}

.tm-commerce .wc-block-components-address-card address,
.tm-commerce .wc-block-components-address-card__address-section {
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-components-address-card__edit {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--tm-ink);
	font-size: 1.1875rem;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

/* ---------- Checkboxes and radio options ---------- */

.tm-commerce .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"],
.tm-commerce .wc-block-components-radio-control .wc-block-components-radio-control__input,
.tm-commerce .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__input {
	width: 1.5rem;
	height: 1.5rem;
	min-width: 1.5rem;
	min-height: 1.5rem;
	border: 2px solid var(--tm-ink);
	background-color: var(--tm-white);
	color: var(--tm-ink);
}

/* WooCommerce draws a faint 1px ring on these; keyboard focus gets the same 3px ink ring as every other control. */
.tm-commerce .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:focus-visible,
.tm-commerce .wc-block-components-radio-control .wc-block-components-radio-control__input:focus-visible,
.tm-commerce .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__input:focus-visible {
	outline: 3px solid var(--tm-ink);
	outline-offset: 2px;
}

.tm-commerce .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]::before,
.tm-commerce .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]::after,
.tm-commerce .wc-block-components-radio-control .wc-block-components-radio-control__input::after {
	color: var(--tm-ink);
	border-color: var(--tm-ink);
}

.tm-commerce .wc-block-components-radio-control .wc-block-components-radio-control__input:checked::before,
.tm-commerce .wc-block-components-radio-control .wc-block-components-radio-control__input::before {
	color: var(--tm-ink);
	border-color: var(--tm-ink);
	background-color: var(--tm-ink);
}

.tm-commerce .wc-block-components-checkbox .wc-block-components-checkbox__mark {
	fill: var(--tm-ink);
	left: 0.25rem;
	top: 50%;
	margin-top: -0.5rem;
}

.tm-commerce .wc-block-components-checkbox label {
	align-items: center;
	min-height: 44px;
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-components-checkbox__label,
.tm-commerce .wc-block-checkout__terms,
.tm-commerce .wc-block-checkout__terms .wc-block-components-checkbox__label {
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-checkout__terms.wc-block-checkout__terms--with-separator {
	border-color: var(--tm-line);
}

.tm-commerce .wc-block-components-radio-control,
.tm-commerce .wc-block-components-radio-control--highlight-checked,
.tm-commerce .wc-block-components-radio-control-accordion-option {
	border-color: var(--tm-line);
	border-radius: 0;
	box-shadow: none;
}

.tm-commerce .wc-block-components-radio-control--highlight-checked::after,
.tm-commerce .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option::after,
.tm-commerce .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option::after,
.tm-commerce .wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted,
.tm-commerce .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	border-color: var(--tm-line);
	border-radius: 0;
	background-color: transparent;
	box-shadow: none;
}

/* The chosen option: an ink frame, so it is clear without relying on colour. */
.tm-commerce .wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted,
.tm-commerce .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	box-shadow: inset 0 0 0 2px var(--tm-ink);
}

.tm-commerce .wc-block-components-radio-control__option {
	color: var(--tm-ink);
}

/* The circle sits beside the first line of its label, not halfway down a taller option. */
.tm-commerce .wc-block-components-radio-control .wc-block-components-radio-control__input {
	top: 19px;
	transform: none;
}

.tm-commerce .wc-block-components-radio-control__label,
.tm-commerce .wc-block-components-radio-control__secondary-label,
.tm-commerce .wc-block-components-radio-control__description,
.tm-commerce .wc-block-components-radio-control__secondary-description,
.tm-commerce .wc-block-components-payment-method-label {
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-components-radio-control-accordion-content,
.tm-commerce .wc-block-components-radio-control-accordion-content p {
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

/* ---------- Buttons: the moss cartouche, as on the product page ---------- */

.tm-commerce .wc-block-components-button:not(.is-link),
.tm-commerce .woocommerce-button,
.tm-commerce .woocommerce-Button,
.tm-commerce button.button,
.tm-commerce a.button,
.tm-commerce input.button {
	--tm-button-fill: var(--tm-moss);
	--tm-button-text: var(--tm-white);
	--tm-cartouche-r: 9px;
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.25rem;
	padding: 0.75rem 2rem;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	color: var(--tm-button-text);
	font-family: var(--tm-font-display);
	font-size: 1.0625rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	box-shadow: none;
	outline: none;
	cursor: pointer;
}

.tm-commerce .wc-block-components-button:not(.is-link)::before,
.tm-commerce .woocommerce-button::before,
.tm-commerce .woocommerce-Button::before,
.tm-commerce button.button::before,
.tm-commerce a.button::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: var(--tm-button-fill);
	clip-path: var(--tm-cartouche);
	transition: background-color 160ms ease;
}

/* An input cannot hold a pseudo-element: it is filled directly. */
.tm-commerce input.button {
	background-color: var(--tm-moss);
}

.tm-commerce .wc-block-components-button:not(.is-link):hover,
.tm-commerce .woocommerce-button:hover,
.tm-commerce .woocommerce-Button:hover,
.tm-commerce button.button:hover,
.tm-commerce a.button:hover {
	--tm-button-fill: var(--tm-night);
	color: var(--tm-white);
}

.tm-commerce input.button:hover {
	background-color: var(--tm-night);
}

.tm-commerce .wc-block-components-button:not(.is-link):focus-visible,
.tm-commerce .woocommerce-button:focus-visible,
.tm-commerce .woocommerce-Button:focus-visible,
.tm-commerce button.button:focus-visible,
.tm-commerce a.button:focus-visible,
.tm-commerce input.button:focus-visible {
	outline: 3px solid var(--tm-ink);
	outline-offset: 3px;
	box-shadow: none;
}

.tm-commerce .wc-block-components-button:disabled,
.tm-commerce .wc-block-components-button[aria-disabled="true"] {
	cursor: wait;
}

.tm-commerce .wc-block-components-button__text,
.tm-commerce .wc-block-components-checkout-place-order-button__text {
	color: inherit;
	font-size: inherit;
}

.tm-commerce .wc-block-cart__submit-button,
.tm-commerce .wc-block-components-checkout-place-order-button {
	width: 100%;
	min-height: 3.5rem;
	font-size: 1.1875rem;
}

/* The spinner inside a busy button. */
.tm-commerce .wc-block-components-spinner::after,
.tm-commerce .wc-block-components-button .wc-block-components-spinner::after {
	border-color: var(--tm-white);
	border-top-color: transparent;
}

.tm-commerce .wc-block-components-checkout-return-to-cart-button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-components-checkout-return-to-cart-button svg {
	fill: var(--tm-ink);
}

/* The bag's button stays at the bottom of the screen on phones, on white. */
.tm-commerce .wc-block-cart__submit-container--sticky {
	background-color: var(--tm-white);
	box-shadow: 0 -1px 0 var(--tm-moss), 0 -8px 24px rgba(0, 0, 0, 0.12);
}

.tm-commerce .wc-block-cart__submit-container--sticky::before {
	display: none;
}

.tm-commerce .wc-block-cart__payment-options:empty {
	display: none;
}

/* ---------- Loading placeholders ---------- */

.tm-commerce .wc-block-components-skeleton,
.tm-commerce .wc-block-cart .wp-block-woocommerce-cart-order-summary-block {
	border-color: var(--tm-line);
}

/* WooCommerce's grey shimmer: a still moss block instead (the page loads in a moment). */
.tm-commerce .wc-block-components-skeleton__element,
.tm-commerce .wc-block-components-skeleton__element::after {
	background: var(--tm-moss);
	opacity: 1;
	animation: none;
}

.tm-commerce .wc-block-components-skeleton__element::after {
	display: none;
}

.tm-commerce .wc-block-components-loading-mask,
.tm-commerce .wc-block-components-loading-mask__children {
	background-color: transparent;
}

/* ---------- The empty bag ---------- */

.tm-commerce .wp-block-woocommerce-empty-cart-block {
	padding-block: clamp(1rem, 4vw, 2.5rem);
	text-align: center;
}

.tm-commerce__empty {
	margin-block: 0 1.75rem;
	font-family: var(--tm-font-serif-display);
	font-style: italic;
	font-weight: 500;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.3;
}

.tm-commerce__empty-action {
	margin: 0;
}

/* The panel's links are ink; this one is a button, white on its moss fill. */
.tm-commerce a.tm-button,
.tm-commerce a.tm-button:hover {
	color: var(--tm-button-text);
	text-decoration: none;
}

/* ---------- Notices: on white, with a coloured rule and the words saying what happened ---------- */

.tm-commerce-page .wc-block-components-notice-banner,
.tm-commerce-page .woocommerce-message,
.tm-commerce-page .woocommerce-error,
.tm-commerce-page .woocommerce-info {
	box-sizing: border-box;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	max-width: 76rem;
	margin: 0 auto 1.5rem;
	padding: 1rem 1.25rem;
	border: 0;
	border-left: 4px solid var(--tm-moss);
	border-radius: 0;
	background-color: var(--tm-white);
	color: var(--tm-ink);
	font-size: 1.1875rem;
	line-height: 1.5;
	list-style: none;
	box-shadow: var(--tm-shadow);
}

.tm-commerce .wc-block-components-notice-banner {
	box-shadow: none;
	border: 1px solid var(--tm-line);
	border-left-width: 4px;
}

.tm-commerce-page .wc-block-components-notice-banner.is-error,
.tm-commerce-page .woocommerce-error {
	border-left-color: var(--tm-garnet);
}

.tm-commerce-page .wc-block-components-notice-banner > svg {
	flex: none;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	border-radius: 50%;
	background-color: var(--tm-moss);
	fill: var(--tm-white);
}

.tm-commerce-page .wc-block-components-notice-banner.is-error > svg {
	background-color: var(--tm-garnet);
}

.tm-commerce-page .wc-block-components-notice-banner__content,
.tm-commerce-page .wc-block-components-notice-banner__content a,
.tm-commerce-page .woocommerce-message a,
.tm-commerce-page .woocommerce-error a,
.tm-commerce-page .woocommerce-info a {
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

.tm-commerce-page .wc-block-components-notice-banner__content .wc-forward,
.tm-commerce-page .woocommerce-message .button {
	float: none;
	margin: 0 0 0 0.5rem;
	padding: 0;
	background: none;
	color: var(--tm-ink);
	text-decoration: underline;
	opacity: 1;
}

/* The close button. WooCommerce sizes and colours it with !important (16px, grey), so only
   !important can make it a 44px ink target. */
.tm-commerce-page .wc-block-components-notice-banner > .wc-block-components-button {
	flex: none;
	width: 44px !important;
	height: 44px !important;
	margin: -0.6rem -0.6rem -0.6rem auto !important;
	color: var(--tm-ink) !important;
	opacity: 1;
}

.tm-commerce-page .wc-block-components-notice-banner > .wc-block-components-button::before {
	display: none;
}

.tm-commerce-page .wc-block-components-notice-banner > .wc-block-components-button:focus-visible {
	outline: 3px solid var(--tm-ink) !important;
	outline-offset: -3px;
}

.tm-commerce-page .wc-block-components-notice-banner > .wc-block-components-button svg {
	fill: var(--tm-ink);
	color: var(--tm-ink);
}

/* The checkout with nothing in the bag: words and a way back, without the sad-face drawing. */
.tm-commerce .wc-block-checkout-empty__image {
	display: none;
}

.tm-commerce .wc-block-checkout-empty__title {
	font-family: var(--tm-font-serif-display);
	font-style: italic;
	font-weight: 500;
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: 0;
	text-transform: none;
}

.tm-commerce-page .wc-block-store-notices,
.tm-commerce-page .woocommerce-notices-wrapper:empty {
	margin: 0;
}

/* ---------- Order received ---------- */

/* The status block brings its own h1 ("Order received") and thank-you line: set on the dark page
   above the panel, like every other page title. */
.tm-commerce-page .wc-block-order-confirmation-status {
	margin: 0 auto clamp(2rem, 4vw, 3rem);
	color: var(--tm-white);
	text-align: center;
}

.tm-commerce-page .wc-block-order-confirmation-status h1 {
	margin: 0 0 1rem;
	font-family: var(--tm-font-display);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 400;
	letter-spacing: 0.04em;
	line-height: 1.2;
}

.tm-commerce-page .wc-block-order-confirmation-status h1::after {
	content: "";
	display: block;
	width: 4.5rem;
	margin: 1.25rem auto 0;
	border-top: 1px solid var(--tm-gold);
}

.tm-commerce-page .wc-block-order-confirmation-status p {
	margin: 0;
	font-family: var(--tm-font-serif-display);
	font-style: italic;
	font-weight: 500;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.3;
}

.tm-commerce .wc-block-order-confirmation-summary-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2.5rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.tm-commerce .wc-block-order-confirmation-summary-list-item {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-order-confirmation-summary-list-item__key {
	font-weight: 700;
}

.tm-commerce .wc-block-order-confirmation-totals table,
.tm-commerce .woocommerce-table,
.tm-commerce .shop_table {
	width: 100%;
	border-collapse: collapse;
	border: 0;
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-order-confirmation-totals th,
.tm-commerce .wc-block-order-confirmation-totals td,
.tm-commerce .woocommerce-table th,
.tm-commerce .woocommerce-table td,
.tm-commerce .shop_table th,
.tm-commerce .shop_table td {
	padding: 0.75rem 0;
	border: 0;
	border-bottom: 1px solid var(--tm-line);
	background-color: transparent;
	color: var(--tm-ink);
	text-align: left;
	vertical-align: top;
}

.tm-commerce .wc-block-order-confirmation-totals th:last-child,
.tm-commerce .wc-block-order-confirmation-totals td:last-child,
.tm-commerce .woocommerce-table td:last-child,
.tm-commerce .shop_table td:last-child {
	text-align: right;
}

.tm-commerce .wc-block-order-confirmation-totals thead th {
	font-family: var(--tm-font-display);
	font-weight: 400;
	letter-spacing: 0.08em;
}

.tm-commerce .wc-block-order-confirmation-totals tfoot tr:last-child th,
.tm-commerce .wc-block-order-confirmation-totals tfoot tr:last-child td {
	font-family: var(--tm-font-display);
	font-weight: 400;
	font-size: 1.375rem;
}

.tm-commerce .wc-block-order-confirmation-address-wrapper {
	gap: 2rem;
	margin-block: 2rem 0;
}

.tm-commerce .wc-block-order-confirmation-shipping-address,
.tm-commerce .wc-block-order-confirmation-billing-address,
.tm-commerce address {
	padding: 0;
	border: 0;
	color: var(--tm-ink);
	font-size: 1.1875rem;
	font-style: normal;
	line-height: 1.6;
}

.tm-commerce .wc-block-order-confirmation-additional-information,
.tm-commerce .wc-block-order-confirmation-additional-information p,
.tm-commerce .wc-block-order-confirmation-additional-information li {
	color: var(--tm-ink);
	font-size: 1.1875rem;
}

.tm-commerce .wc-block-order-confirmation-additional-information h2 {
	margin-block-start: 2rem;
}

/* ---------- Account (WooCommerce's classic shortcode) ---------- */

.tm-commerce .woocommerce-form-login,
.tm-commerce .woocommerce-form-register,
.tm-commerce .woocommerce-ResetPassword,
.tm-commerce .woocommerce-EditAccountForm,
.tm-commerce .woocommerce-address-fields {
	max-width: 32rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
}

.tm-commerce .woocommerce-form-row,
.tm-commerce .form-row {
	margin: 0 0 1.25rem;
	padding: 0;
}

.tm-commerce .woocommerce-form-row label,
.tm-commerce .form-row label {
	display: block;
	margin-block-end: 0.4rem;
	color: var(--tm-ink);
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.4;
}

.tm-commerce .required {
	color: var(--tm-garnet);
	text-decoration: none;
	border: 0;
}

.tm-commerce .woocommerce-form-login__rememberme,
.tm-commerce .woocommerce-form__label-for-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 44px;
	margin-inline-end: 1.5rem;
	font-weight: 400;
}

.tm-commerce input[type="checkbox"],
.tm-commerce input[type="radio"] {
	width: 1.5rem;
	height: 1.5rem;
	margin: 0;
	accent-color: var(--tm-ink);
}

.tm-commerce .lost_password,
.tm-commerce .woocommerce-LostPassword {
	margin-block: 1rem 0;
}

.tm-commerce .show-password-input {
	min-width: 44px;
	min-height: 44px;
	border: 0;
	background: transparent;
	color: var(--tm-ink);
}

.tm-commerce .password-input {
	position: relative;
	display: block;
}

.tm-commerce .password-input .show-password-input {
	position: absolute;
	top: 0.25rem;
	right: 0.25rem;
}

.tm-commerce .woocommerce-MyAccount-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	margin: 0 0 2rem;
	padding: 0 0 1rem;
	border-bottom: 1px solid var(--tm-line);
	list-style: none;
}

.tm-commerce .woocommerce-MyAccount-navigation a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-family: var(--tm-font-display);
	font-size: 1.0625rem;
	letter-spacing: 0.06em;
	text-decoration: none;
}

.tm-commerce .woocommerce-MyAccount-navigation .is-active a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.tm-commerce .woocommerce-MyAccount-content p,
.tm-commerce .woocommerce-MyAccount-content li {
	font-size: 1.1875rem;
}

.tm-commerce .woocommerce-pagination {
	margin-block-start: 1.5rem;
}

/* ---------- Phones ---------- */

@media (max-width: 47.99em) {
	.tm-commerce {
		padding: 1.5rem 1.25rem;
	}

	.tm-commerce .wc-block-components-sidebar-layout .wc-block-components-main {
		padding-right: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tm-commerce .wc-block-components-skeleton__element {
		animation: none;
	}
}

/* Before an address is entered the delivery step says so, in plain ink. */
.tm-commerce .wc-block-components-shipping-rates-control__no-shipping-address-message {
	color: var(--tm-ink);
	background: none;
}
