/**
 * An offer in words (11.3.16, F21, F22; the designer's request 39, 18 Nov 2026): under a card's price, a light strip with
 * a coloured edge, the kind's icon, the offer's name in bold and then its words; on the product page the same strip.
 * "+1 offer" on its own row under the card's strip. AIEO_DMM_Offer_Strip prints them.
 * Never an ellipsis in the middle of a sentence (rooster-admin-d1, 22 Nov 2026: «spend 40,00 € or more on Face and
 * 5,00 €…», «spe…» at 800): the strip wraps to as many lines as its words need, and a strip narrower than 14rem (a card in
 * a tight grid) shows the offer's name alone, its words kept for screen readers. The strip is the width container of
 * that choice: it always stretches to its box (a block, or its card's price column), so its width never comes from its
 * words.
 *
 * No colour of its own: the theme's accent, ink and background tokens, with the browser's own where a theme has none.
 * The icon is a mask on the strip itself (no element), in the accent's text colour.
 */
.aieo-offer-line {
	--aieo-offer-line-edge: var(--wp--preset--color--accent, currentColor);
	position: relative;
	display: block;
	container-type: inline-size;
	overflow-wrap: break-word;
	box-sizing: border-box;
	margin: var(--wp--preset--spacing--2, 0.5rem) 0 0;
	/* The room above and below the words is a transparent border; the coloured edge is drawn over the whole height by
	   the first background layer. */
	padding: 0 10px 0 28px;
	border: 0 solid transparent;
	border-block-width: 7px;
	background: linear-gradient(90deg, var(--aieo-offer-line-edge) 2px, transparent 2px), color-mix(in srgb, var(--aieo-offer-line-edge) 7%, var(--wp--preset--color--bg, Canvas));
	color: var(--wp--preset--color--fg, currentColor);
	font-size: var(--wp--preset--font-size--xs, 0.8125rem);
	line-height: 1.4;
	text-align: start;
}
.aieo-offer-line strong {
	font-weight: 600;
}
.aieo-offer-line:dir(rtl) {
	background-image: linear-gradient(270deg, var(--aieo-offer-line-edge) 2px, transparent 2px);
}
/* The kind's icon: a tag; a parcel for a gift; centred on the first line (half its 1.4 line less half the icon, from
   the padding box's top, under the 7px border). */
.aieo-offer-line::before {
	content: "";
	position: absolute;
	inset-inline-start: 8px;
	top: max(0px, calc(0.7em - 7px));
	width: 14px;
	height: 14px;
	background: var(--wp--preset--color--accent-text, currentColor);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M3.5 12.2V5.5a2 2 0 0 1 2-2h6.7l8.3 8.3-8.7 8.7-8.3-8.3z'/%3E%3Ccircle cx='8' cy='8' r='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M3.5 12.2V5.5a2 2 0 0 1 2-2h6.7l8.3 8.3-8.7 8.7-8.3-8.3z'/%3E%3Ccircle cx='8' cy='8' r='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.aieo-offer-line--gift::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M4 11h16v9H4zM3 7h18v4H3zM12 7v13M12 7c-1.5-3.5-5-3.5-5-1.5S10 7 12 7zm0 0c1.5-3.5 5-3.5 5-1.5S14 7 12 7z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M4 11h16v9H4zM3 7h18v4H3zM12 7v13M12 7c-1.5-3.5-5-3.5-5-1.5S10 7 12 7zm0 0c1.5-3.5 5-3.5 5-1.5S14 7 12 7z'/%3E%3C/svg%3E");
}
/* In a card's price box (a block card: AIEO_DMM_Offer_Strip::after_card_price()), the box's width, whatever the box's
   alignment (the theme's list view ends its price column). */
.wp-block-woocommerce-product-price > :is(.aieo-offer-line, .aieo-offer-more) {
	align-self: stretch;
	text-align: start;
}
/* A sentence wraps inside its card whatever its price box asks (rooster-tools-d7, 22 Nov 2026, Jan's sleeve row: a look
   keeps the price on one line with white-space: nowrap and a box no wider than the price, and the line pushed the page
   sideways at 1024 and 800): the line never takes the box's nowrap, never widens the box (inline-size containment: it
   takes the box's width, its words do not set it), and only its amounts stay whole. */
.wp-block-woocommerce-product-price > .aieo-offer-line {
	contain: inline-size;
	white-space: normal;
	overflow-wrap: break-word;
}
.aieo-offer-line .woocommerce-Price-amount {
	white-space: nowrap;
}
/* A narrow strip: the offer's name alone (its words for a screen reader, out of the way as the theme's
   screen-reader-text is). */
@container (width < 14rem) {
	.aieo-offer-line__rest {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}
}
/* "+1 offer": its own row under the card's words, in the strip's tint, lined up with them; to the product page's box. */
.aieo-offer-line:has(+ .aieo-offer-more) {
	border-bottom-width: 2px;
}
.aieo-offer-more {
	display: block;
	box-sizing: border-box;
	margin: 0;
	padding: 0 10px 7px 28px;
	border-inline-start: 2px solid var(--wp--preset--color--accent, currentColor);
	background: color-mix(in srgb, var(--wp--preset--color--accent, currentColor) 7%, var(--wp--preset--color--bg, Canvas));
	color: var(--wp--preset--color--muted, currentColor);
	font-size: var(--wp--preset--font-size--xs, 0.8125rem);
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	text-decoration: none;
}
.aieo-offer-more:hover,
.aieo-offer-more:focus-visible {
	text-decoration: underline;
}
/* The product page: the same strip in full, never shortened (F22). */
.aieo-offer-line--page {
	display: block;
	-webkit-line-clamp: none;
	line-clamp: none;
	overflow: visible;
	margin: var(--wp--preset--spacing--3, 0.75rem) 0 0;
	padding: 0 10px 0 32px;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	line-height: 1.45;
}
.aieo-offer-line--page::before {
	top: max(0px, calc(0.725em - 8px));
	width: 16px;
	height: 16px;
}
@media (forced-colors: active) {
	.aieo-offer-line {
		border-inline-start: 2px solid CanvasText;
	}
	.aieo-offer-more {
		border-inline-start-color: CanvasText;
	}
	.aieo-offer-line::before {
		forced-color-adjust: none;
		background: CanvasText;
	}
}
