.tpx-buying-panel {
	width: 100%;
	margin-block: 40px;
	color: #0d0f12;
	font-family: var(--wp--preset--font-family--aktiv-grotesk,aktiv-grotesk,sans-serif);
	font-size: 16px;
	line-height: 1.3334;
	letter-spacing: 0;
}

@media (min-width: 782px) {
	.tpx-buying-panel {
		max-width: 362px;
	}
}

.tpx-buying-panel *, .tpx-quote-dialog * {
	box-sizing: border-box;
}

.tpx-buying-tab {
	display: flex;
	width: 96px;
	height: 44px;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--smoke,#f2f2f2);
	border-radius: 8px 8px 0 0;
	font-size: 16px;
}

.tpx-buying-body {
	padding: 20px 16px;
	background: var(--wp--preset--color--smoke,#f2f2f2);
	border-radius: 0 8px 8px 8px;
}

.tpx-buying-panel .wc-block-add-to-cart-with-options {
	margin: 0;
}

.tpx-buying-panel .wc-block-add-to-cart-with-options > .wp-block-group {
	display: grid;
	grid-template-columns: minmax(0,1fr);
	gap: 24px;
	margin: 0;
}

.tpx-buying-panel .wp-block-woocommerce-add-to-cart-with-options-variation-selector {
	margin: 0 0 24px;
}

.tpx-buying-panel .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute > .wp-block-group {
	margin: 0!important;
	gap: 10px;
	align-items: stretch;
}

.tpx-buying-panel .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute + .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute {
	margin-top: 24px;
}

.tpx-buying-label, .tpx-buying-panel .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute-name {
	display: block;
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
}

.tpx-buying-panel .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute-name {
	margin: 0;
}

/* Match enquiry-only selectors to the native WooCommerce buying panel. */
.tpx-buying-panel .tpx-quote-options .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute-name {
	margin-bottom: 10px;
}

.tpx-buying-panel .tpx-buying-body:has(.tpx-quote-options) > .wc-block-components-notices {
	/* The fallback form already includes the 24px gap below its options. */
	margin-bottom: 0;
}

.tpx-buying-panel .wc-block-add-to-cart-with-options:has(.tpx-quote-options) > .single_variation_wrap {
	/* Hidden variation inputs must not add another block-spacing margin. */
	margin: 0;
}

.tpx-buying-panel .tpx-quote-route .tpx-buying-label {
	margin: 0 0 10px;
}

.tpx-buying-panel .tpx-buying-body:has(.tpx-quote-options) > .tpx-product-selection-help {
	margin-top: 24px;
}

.tpx-buying-panel .wc-block-product-filter-chips {
	width: 100%;
}

.tpx-buying-panel .wc-block-product-filter-chips__fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.tpx-buying-panel .wc-block-product-filter-chips__items {
	display: grid;
	grid-template-columns: repeat(2,minmax(0,1fr));
	/* Keep option rows content-sized when a parent provides extra height. */
	grid-auto-rows: max-content;
	align-content: start;
	align-items: start;
	gap: 8px;
}

.tpx-buying-panel .wc-block-product-filter-chips__item {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 54px;
	height: auto;
	min-width: 0;
	width: 100%;
	aspect-ratio: auto;
	padding: 6px 8px;
	background: var(--wp--preset--color--white,#fff);
	color: #0d0f12;
	border: 1px solid #e8e8ed;
	border-radius: 8px;
	box-shadow: none;
	font: inherit;
	font-size: 14px;
	line-height: 1.3334;
	text-align: center;
}

.tpx-buying-panel .wc-block-product-filter-chips__item[aria-checked="true"] {
	border-color: var(--wp--preset--color--almost-black,#212121);
	background: #fff;
	box-shadow: inset 0 0 0 1px #212121;
}

.tpx-buying-panel .wc-block-product-filter-chips__item:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.tpx-buying-panel .wc-block-product-filter-chips__label {
	white-space: normal;
}

.tpx-buying-panel .wc-block-product-filter-chips__item.tpx-option-has-label {
	flex-direction: column;
	gap: 1px;
	font-size: 14px;
	line-height: 1.3334;
}

.tpx-buying-panel .tpx-option-has-label::before {
	content: attr(data-tpx-option-label);
	display: block;
	color: #0D0F12;
	font-size: 14px;
	font-weight: 400;
	overflow-wrap: anywhere;
}

.tpx-buying-panel .tpx-option-has-label .wc-block-product-filter-chips__label,
.tpx-buying-panel .tpx-option-has-label .wc-block-product-filter-chips__text {
	color: #6B6B6B;
	font-size: 14px;
	font-weight: 400;
	overflow-wrap: anywhere;
}

/* Retain native radio buttons, labels and WooCommerce variation state. */
.tpx-buying-panel .tpx-colour-options .wc-block-product-filter-chips__items {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tpx-buying-panel .tpx-colour-options .wc-block-product-filter-chips__item {
	width: auto;
}

.tpx-buying-panel .wc-block-product-filter-chips__item.tpx-colour-swatch {
	position: relative;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	min-height: 44px;
	padding: 7px;
	border-radius: 50%;
	gap: 0;
}

.tpx-buying-panel .tpx-colour-swatch::before {
	content: '';
	display: block;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	border-radius: 50%;
	background: var(--tpx-colour-chip);
	/* White and pale colours still have a visible edge. */
	box-shadow: inset 0 0 0 1px rgb(0 0 0 / 12%);
}

.tpx-buying-panel .tpx-colour-swatch .wc-block-product-filter-chips__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.tpx-buying-panel .tpx-colour-swatch:not(:disabled):hover {
	border-color: #6b6b6b;
}

.tpx-buying-panel .tpx-colour-swatch[aria-checked="true"]:hover {
	border-color: var(--wp--preset--color--almost-black,#212121);
}

.tpx-buying-panel .tpx-colour-swatch:focus-visible {
	outline: 2px solid var(--wp--preset--color--almost-black,#212121);
	outline-offset: 3px;
}

.tpx-buying-panel .tpx-colour-swatch::after {
	content: attr(data-tpx-colour-name);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	width: max-content;
	max-width: 180px;
	padding: 5px 8px;
	border-radius: 4px;
	background: #212121;
	color: #fff;
	font-size: 12px;
	line-height: 1.3334;
	pointer-events: none;
	visibility: hidden;
}

.tpx-buying-panel .tpx-colour-swatch:hover::after,
.tpx-buying-panel .tpx-colour-swatch:focus-visible::after {
	visibility: visible;
}

.tpx-buying-panel .wc-block-product-filter-chips__item[hidden] {
	display: none;
}

.tpx-buying-panel .wp-block-woocommerce-add-to-cart-with-options-variation-description {
	font-size: 14px;
	color: #535353;
	margin: 0 0 24px!important;
}

.tpx-buying-panel .wp-block-woocommerce-add-to-cart-with-options-variation-description p {
	margin: 0;
}

.tpx-buying-panel .wp-block-woocommerce-product-stock-indicator:empty {
	display: none;
}

.tpx-buying-panel .wp-block-woocommerce-add-to-cart-with-options-quantity-selector {
	width: 100%;
	margin: 0;
	/* WooCommerce also applies a border to this outer wrapper. */
	border: 0;
}

.tpx-buying-panel .wc-block-components-quantity-selector, .tpx-quote-quantity {
	display: flex;
	align-items: center;
	width: 100%;
	height: 48px;
	min-height: 48px;
	margin: 0;
	padding: 6px 8px;
	background: #fff;
	border: 0;
	border-radius: 8px;
	box-shadow: none;
}

.tpx-buying-panel .wc-block-components-quantity-selector::after {
	display: none;
}

.tpx-buying-panel .wc-block-components-quantity-selector__button, .tpx-quote-quantity button {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 36px;
	width: 36px;
	min-width: 36px;
	height: 36px;
	padding: 0;
	background: var(--wp--preset--color--almost-black,#212121);
	color: white;
	border: 0;
	border-radius: 6px;
	box-shadow: none;
	font-size: 16px;
	opacity: 1;
	cursor: pointer;
}

.tpx-buying-panel .wc-block-components-quantity-selector__button:disabled, .tpx-quote-quantity button:disabled {
	background: #ede9e4;
	color: #6b6b6b;
	cursor: not-allowed;
}

.tpx-buying-panel .wc-block-components-quantity-selector input, .tpx-quote-quantity input {
	flex: 1 1 0;
	width: 0;
	min-width: 0;
	max-width: none;
	height: 36px;
	padding: 0 8px;
	border: 0;
	background: transparent;
	color: #0d0f12;
	text-align: center;
	font: inherit;
	box-shadow: none;
	appearance: textfield;
	-moz-appearance: textfield;
}

.tpx-buying-panel input[type="number"]::-webkit-inner-spin-button, .tpx-buying-panel input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.tpx-buying-panel .wp-block-woocommerce-product-button {
	width: 100%;
	margin: 0;
}

.tpx-buying-panel .wp-block-woocommerce-product-button .wp-block-button__link, .tpx-buying-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	padding: 12px 16px;
	border: 0;
	border-radius: 4px!important;
	background: var(--wp--preset--color--almost-black,#212121)!important;
	color: #fff!important;
	text-align: center;
	text-decoration: none;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.tpx-buying-panel .wp-block-woocommerce-product-button .wp-block-button__link.disabled {
	background: #c9cccf!important;
	color: #474f57!important;
	cursor: not-allowed;
}

.tpx-buying-panel .wp-block-button__link:hover, .tpx-buying-button:hover {
	background: #000!important;
}

.tpx-buying-panel :is(button,input,select,a):focus-visible, .tpx-quote-dialog :is(button,input,select,textarea,a):focus-visible {
	outline: 2px solid #171717;
	outline-offset: 4px;
}

.tpx-buying-panel [hidden], .tpx-buying-panel .wp-block-woocommerce-add-to-wishlist-button {
	display: none!important;
}

.tpx-buying-panel.is-quote-only :is(.wp-block-woocommerce-product-button,.wp-block-woocommerce-add-to-cart-with-options-quantity-selector,.wp-block-woocommerce-product-stock-indicator) {
	display: none!important;
}

.tpx-buying-note {
	color: #6b6b6b;
	margin: 24px 0;
	line-height: 1.3334;
	font-size: 14px;
}

.tpx-buying-panel .tpx-buying-total {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	width: 100%;
	margin: 0;
	color: #0D0F12;
	line-height: 1.25;
}

.tpx-buying-total-label {
	font-size: 16px;
	font-weight: 600;
}

.tpx-buying-total-amount {
	font-size: 25.6px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.tpx-buying-panel.is-quote-only .tpx-buying-total {
	display: none!important;
}

.tpx-quote-dialog {
	width: min(680px,calc(100% - 32px));
	max-height: calc(100dvh - 40px);
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: #fff;
	color: #171717;
	overflow: auto;
}

.tpx-quote-dialog::backdrop {
	background: rgba(0,0,0,.55);
}

.tpx-quote-dialog-inner {
	padding: 32px;
}

.tpx-quote-dialog h2 {
	margin: 0 48px 10px 0;
	font-size: 28px;
	font-weight: 600;
}

.tpx-quote-summary {
	margin: 0 0 28px;
	color: #535353;
	font-size: 16px;
}

.tpx-quote-close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 44px;
	height: 44px;
	padding: 0;
	background: #f2f2f2;
	color: #171717;
	border: 0;
	border-radius: 50%;
	font-size: 28px;
	cursor: pointer;
}

.tpx-quote-dialog .gform_wrapper {
	--gf-ctrl-btn-bg-color-primary: #212121;
	--gf-ctrl-btn-color-primary: #fff;
}

/* These two existing Form 5 HTML fields contain only line-break spacers. */
.tpx-quote-dialog :is(#field_5_46,#field_5_55) {
	display: none;
}

.tpx-quote-dialog .gsection_title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
}

.tpx-quote-dialog .gform_wrapper textarea {
	min-height: 140px;
	height: 140px;
	resize: vertical;
}

.tpx-quote-dialog .gform_wrapper input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), .tpx-quote-dialog .gform_wrapper :is(textarea,select) {
	width: 100%;
	max-width: 100%;
	min-height: 46px;
	border: 1px solid #d9d9de;
	border-radius: 6px;
	padding: 10px 12px;
	font: inherit;
	background: #fff;
	color: #171717;
}

.tpx-quote-dialog .gform_wrapper input[type="submit"] {
	min-height: 52px;
	padding: 14px 24px;
	border: 0;
	border-radius: 6px;
	background: #212121;
	color: #fff;
	font: inherit;
	cursor: pointer;
}

html.tpx-quote-is-open, html.tpx-variation-help-is-open {
	overflow: hidden;
}

/* Optional product information beside the first variation heading. */
.tpx-buying-panel .tpx-variation-heading-row {
	display: grid;
	grid-template-columns: minmax(0,1fr) fit-content(50%);
	align-items: baseline!important;
}

.tpx-buying-panel .tpx-variation-heading-row > :not(.wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute-name):not(.tpx-variation-help-open) {
	grid-column: 1 / -1;
}

.tpx-buying-panel .tpx-variation-help-open {
	justify-self: end;
	max-width: 100%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	text-align: right;
	text-decoration: underline;
	text-underline-offset: 2px;
	overflow-wrap: anywhere;
	cursor: pointer;
}

.tpx-variation-help-dialog {
	box-sizing: border-box;
	width: min(680px,calc(100% - 32px));
	max-width: calc(100% - 32px);
	max-height: calc(100dvh - 40px);
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: #fff;
	color: #171717;
	font-family: var(--wp--preset--font-family--aktiv-grotesk,aktiv-grotesk,sans-serif);
	font-size: 16px;
	line-height: 1.5;
	overflow: auto;
}

.tpx-variation-help-dialog::backdrop {
	background: rgba(0,0,0,.55);
}

.tpx-variation-help-dialog-inner {
	padding: 32px;
}

#tpx-variation-help-title {
	margin: 0 48px 24px 0;
	font-size: 28px;
	line-height: 1.2;
}

.tpx-variation-help-close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f2f2f2;
	color: #171717;
	font-size: 28px;
	cursor: pointer;
}

.tpx-variation-help-content {
	overflow-wrap: anywhere;
}

.tpx-variation-help-content > :first-child {
	margin-top: 0;
}

.tpx-variation-help-content > :last-child {
	margin-bottom: 0;
}

.tpx-variation-help-content :is(h1,h2,h3,h4,h5,h6) {
	margin: 1.2em 0 .5em;
	font-size: 1.25em;
	font-weight: 600;
	line-height: 1.3;
}

.tpx-variation-help-content :is(ul,ol) {
	padding-left: 1.5em;
}

.tpx-variation-help-content ul {
	list-style: disc;
}

.tpx-variation-help-content ol {
	list-style: decimal;
}

.tpx-variation-help-content a {
	color: inherit;
	text-decoration: underline;
}

.tpx-variation-help-content img {
	max-width: 100%;
	height: auto;
}

.tpx-variation-help-dialog :is(a,button):focus-visible {
	outline: 2px solid #171717;
	outline-offset: 4px;
}

@media(max-width:600px) {
	.tpx-buying-panel {
		margin-block: 28px;
	}

	.tpx-quote-dialog-inner {
		padding: 24px 20px;
	}

	.tpx-variation-help-dialog-inner {
		padding: 24px 20px;
	}

}

/* Currency punctuation stays still while digits use the odometer motion. */
.tpx-price-rollers { display: inline-flex; align-items: center; white-space: pre; font-variant-numeric: tabular-nums; }
.tpx-price-cell { display: inline-block; overflow: clip; padding: 0.05em; margin: -0.05em; }
.tpx-price-roller { display: block; white-space: pre; text-align: center; will-change: transform; }
