/* Appiform B2B storefront */

/* Variation table */
.apfb2b-vt {
	margin: 1em 0;
}

.apfb2b-vt__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.apfb2b-vt__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.apfb2b-vt__table th,
.apfb2b-vt__table td {
	padding: 0.5em;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	text-align: left;
	vertical-align: middle;
}

.apfb2b-vt--grid .apfb2b-vt__table td {
	text-align: center;
}

.apfb2b-vt__qty {
	width: 5em;
	max-width: 100%;
}

.apfb2b-vt__price {
	display: block;
	font-size: 0.85em;
	margin-bottom: 0.25em;
}

.apfb2b-vt__hint,
.apfb2b-vt__na,
.apfb2b-vt__empty {
	display: inline-block;
	margin-left: 0.25em;
	font-size: 0.8em;
	opacity: 0.7;
}

.apfb2b-vt__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75em;
	margin-top: 1em;
}

.apfb2b-vt__total {
	flex: 1 1 auto;
	font-weight: 600;
}

/* VAT switch */
.apfb2b-tax-toggle {
	display: inline-flex;
	gap: 0.25em;
	margin: 0 0 1em;
	font-size: 0.9em;
}

.apfb2b-tax-toggle form {
	display: inline;
	margin: 0;
}

.apfb2b-tax-toggle button {
	padding: 0.3em 0.8em;
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	cursor: pointer;
	border-radius: 3px;
	font: inherit;
}

.apfb2b-tax-toggle button[aria-pressed="true"] {
	background: currentColor;
}

.apfb2b-tax-toggle button[aria-pressed="true"] span {
	color: #fff;
	mix-blend-mode: difference;
}

/* Registration form */
.apfb2b-registration .form-row {
	margin-bottom: 1em;
}

.apfb2b-registration .apfb2b-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.apfb2b-registration fieldset {
	border: 0;
	padding: 0;
	margin: 0 0 1.5em;
}

.apfb2b-registration legend {
	font-weight: 600;
	margin-bottom: 0.5em;
}

/* WooCommerce registration form: business fields appear when the box is ticked. */
@supports selector(:has(*)) {
	.apfb2b-wc-reg .apfb2b-wc-reg__fields {
		display: none;
	}

	.apfb2b-wc-reg:has(input[name="apfb2b_wants_b2b"]:checked) .apfb2b-wc-reg__fields {
		display: block;
	}
}

/* Order lists */
.apfb2b-lists table {
	width: 100%;
}

.apfb2b-lists .apfb2b-inline {
	display: inline;
}

.apfb2b-list-add {
	margin-top: 1em;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-items: center;
}

.apfb2b-list-add select,
.apfb2b-list-add input[type="text"],
.apfb2b-list-add input[type="number"] {
	font: inherit;
	padding: 0.45em 0.6em;
	border: 1px solid currentColor;
	border-radius: 3px;
	background: transparent;
	color: inherit;
	max-width: 100%;
}

.apfb2b-list-add input[type="number"] {
	width: 5em;
}

/* "New list name" only matters when "New list…" is chosen. */
@supports selector(:has(*)) {
	.apfb2b-list-add:has(.apfb2b-list-add__select option[value="0"]:not(:checked)) .apfb2b-list-add__name {
		display: none;
	}
}

.apfb2b-vt__footer .apfb2b-list-add {
	flex-basis: 100%;
	margin-top: 0;
}

.apfb2b-unavailable {
	opacity: 0.6;
}

@media (max-width: 600px) {
	.apfb2b-vt--list thead {
		display: none;
	}

	.apfb2b-vt--list tr {
		display: block;
		border-bottom: 1px solid rgba(0, 0, 0, 0.15);
		padding: 0.5em 0;
	}

	.apfb2b-vt--list td {
		display: flex;
		justify-content: space-between;
		border: 0;
		padding: 0.2em 0;
	}

	.apfb2b-vt--list td::before {
		content: attr(data-title);
		font-weight: 600;
		margin-right: 1em;
	}
}

/* Invoice details of wholesale customers (read-only, checkout and My Account). */
.apfb2b-invoice-box {
	margin: 0 0 1.5em;
	padding: 1em 1.25em;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-left: 4px solid currentColor;
	border-radius: 4px;
	line-height: 1.6;
	list-style: none;
}
.apfb2b-invoice-box::before {
	display: none;
}
.apfb2b-invoice-box small {
	display: block;
	margin-top: 0.5em;
	opacity: 0.8;
}

/* "Request a wholesale account" under My Account's login / registration form. */
.apfb2b-signup-cta {
	margin: 1.5em 0 0;
	padding: 1em 1.25em;
	border: 1px dashed rgba(0, 0, 0, 0.25);
	border-radius: 4px;
	text-align: center;
}
.apfb2b-signup-cta__text {
	margin: 0 0 0.75em;
}
.apfb2b-registration__login {
	margin-bottom: 1.5em;
}
.apfb2b-signup-cta__button {
	display: inline-block;
	text-decoration: none;
}
