/*
 * Wholesale display on the shop side.
 *
 * RULE OF THIS FILE: structural only. No hard-coded colour, no font. The
 * markup carries the WooCommerce classes (form-row, input-text, shop_table,
 * woocommerce-info, order_details...) and the THEME dresses them. A module
 * knows no theme: a colour written here would be wrong at the first restyle.
 *
 * The two places that need a hue go through a variable with a NEUTRAL
 * fallback (currentColor). A theme that wants control overrides it at home.
 *
 * No !important in this file: we complete the theme, we do not fight it.
 */

/* "excl. tax" suffix next to the price. Softened, no forced case or font. */
.lfwh-suffix {
	font-size: 0.8em;
	opacity: 0.7;
}

/* Retail price struck through, as a reminder next to the wholesale price. */
.lfwh-retail {
	opacity: 0.55;
	margin-right: 0.35em;
}

/*
 * Discount badge. Outline in currentColor: it takes the colour of the text
 * around it, hence the theme's, on a light or a dark background.
 */
.lfwh-badge {
	display: inline-block;
	padding: 0 0.45em;
	border: 1px solid currentColor;
	border-radius: 2px;
	font-size: 0.75em;
	line-height: 1.7;
	vertical-align: middle;
	white-space: nowrap;
}

/*
 * Overdue invoice. The only hue of the module, with currentColor as fallback:
 * without a theme override the badge stays readable, simply not red.
 */
.lfwh-badge--alert {
	color: var(--lfwh-alert, currentColor);
	border-color: currentColor;
}

/* Reminder of the quantity rules, product page. */
.lfwh-qty-rules {
	margin: 0 0 1em;
	font-size: 0.9em;
	opacity: 0.75;
}

/*
 * Tier grid on the product page. Deliberately light: it informs before the
 * purchase, it does not compete with the button. No border, the theme sets
 * its own on its tables when it wants one.
 */
.lfwh-tiers {
	width: auto;
	margin: 0 0 1.25em;
	border-collapse: collapse;
	font-size: 0.9em;
}

.lfwh-tiers caption {
	text-align: left;
	padding-bottom: 0.35em;
}

.lfwh-tiers th,
.lfwh-tiers td {
	padding: 0.15em 1.25em 0.15em 0;
	text-align: left;
	border: 0;
}

.lfwh-login-to-see {
	font-size: 0.9em;
}

/* "Notify me when it is back" block, product page. Step 4.
   No box: a title, a list, a button. The theme does the rest. */

.lfwh-alert-box {
	margin: 1.5em 0;
}

.lfwh-alert-box__title {
	margin: 0 0 0.5em;
}

.lfwh-alert-box__region {
	opacity: 0.75;
}

.lfwh-alert-box__list {
	margin: 0 0 0.75em;
	padding: 0;
	list-style: none;
}

.lfwh-alert-box__list li {
	margin: 0 0 0.3em;
}

.lfwh-alert-box__list label {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	cursor: pointer;
}

.lfwh-alert-box__help {
	margin: 0 0 0.8em;
	font-size: 0.85em;
	opacity: 0.75;
}

/* Hint under a field of the request form. `display: block` is required: the
   container is a `<p class="form-row">`, an inline `<span>` would stick to
   the field before it. */
.lfwh-field-hint {
	display: block;
	margin-top: 0.35em;
	font-size: 0.85em;
	opacity: 0.75;
}

/* Wholesale account tab. Steps 4 and 5.
   Facts come out as `order_details`, tables as `shop_table`: borders and
   headings come from the theme, only the differences live here. */

.lfwh-account-facts {
	margin: 0 0 1.5em;
}

.lfwh-account-facts__strong {
	font-size: 1.05em;
}

.lfwh-account-table {
	margin: 0 0 1.5em;
}

/* An amount reads aligned on its unit, never flush left. */
.lfwh-account-table .lfwh-col-amount {
	text-align: right;
}

.lfwh-variant {
	opacity: 0.7;
}

.lfwh-alert-remove {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	cursor: pointer;
}

/*
 * Narrow screen. Same fold as the WooCommerce tables: the column label moves
 * in front of the value, through `data-title`. Rewritten here so the fold
 * holds even when the theme does not load the WooCommerce sheet; both rules
 * produce the SAME ::before, so there is no duplicate.
 */
@media (max-width: 768px) {
	.lfwh-account-table.shop_table_responsive thead {
		display: none;
	}

	.lfwh-account-table.shop_table_responsive tbody tr {
		display: block;
	}

	.lfwh-account-table.shop_table_responsive tbody td {
		display: block;
		text-align: right;
	}

	.lfwh-account-table.shop_table_responsive tbody td::before {
		content: attr(data-title) ": ";
		float: left;
	}

	.lfwh-account-table .lfwh-col-amount {
		text-align: right;
	}
}

/* Shop previewed as a wholesale group from the admin bar. */
.lfwh-preview-banner {
	position: fixed;
	z-index: 99999;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0.6em 1em;
	background: #1d2327;
	color: #fff;
	font-size: 14px;
	text-align: center;
}
