/*
 * Rooster One: the offers in the cart and the checkout's order summary (11.3.14, the designer's surfaces 4 and 5;
 * AIEO_DMM_Offer_Cart_View). Loaded only on the cart and the checkout while an offer runs. The theme's colours only
 * (its tokens, then the text's own colour): no colour of our own.
 */

/* Beneath WooCommerce's own line total (its tax suffix kept): the struck price and Save, two lines of one fixed
 * height. A line a running quantity offer covers holds the same height empty (--held), so a change that starts the
 * offer fills it without growing the cell (no layout shift). */
.aieo-offer-price {
	display: grid;
	justify-items: end;
	align-content: start;
	font-size: 0.875em;
	line-height: 1.4;
	min-height: 2.8em;
}
.aieo-offer-price del {
	color: var(--wp--preset--color--muted, color-mix(in srgb, currentColor 60%, transparent));
}
.aieo-offer-price__save {
	color: var(--wp--preset--color--success, currentColor);
	font-weight: 600;
}

/* The totals' rows: a row per offer and the sale prices' row, what each is under its title, the rule. */
.aieo-offer-row__words,
.aieo-offer-summary__words {
	display: block;
	font-size: 0.8125em;
	font-weight: 400;
	color: var(--wp--preset--color--muted, color-mix(in srgb, currentColor 70%, transparent));
}
.aieo-offer-row__amount,
.aieo-offer-summary__amount {
	color: var(--wp--preset--color--success, currentColor);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.aieo-offer-rule td,
.aieo-offer-summary__rule {
	font-size: 0.8125em;
	color: var(--wp--preset--color--muted, color-mix(in srgb, currentColor 70%, transparent));
}

/* The blocks' order summary slot. */
.aieo-offer-summary {
	display: grid;
	gap: var(--wp--preset--spacing--2, 8px);
	padding: var(--wp--preset--spacing--2, 8px) 0;
	box-sizing: border-box; /* the cart's band keeps its height as it was read, padding included (F30b) */
	align-content: start;
}
.aieo-offer-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--wp--preset--spacing--3, 12px);
}
.aieo-offer-summary__rule {
	margin: 0;
}

/* The cart's hints (11.3.16 F30): the designer's `deal-hint`, one a nudge, under the offers' rows and above the rule
 * (AIEO_DMM_Quantity_Front::hints_html(); the Cart block's slot: aieo-offer-summary.js). A dashed box in the text's
 * colour, the offers' tag mark a mask in the accent's text colour on the first line. */
.aieo-deal-hint {
	display: flex;
	align-items: start;
	gap: 8px;
	margin: 0;
	padding: 10px 12px;
	border: 1px dashed var(--wp--preset--color--fg, currentColor);
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	line-height: 1.45;
	text-align: start;
}
.aieo-deal-hint::before {
	content: "";
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-block-start: calc((1.45em - 16px) / 2);
	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;
}
/* The classic cart's totals table: the hints' row spans the table, one hint under the other. */
.aieo-deal-hints .aieo-deal-hint + .aieo-deal-hint {
	margin-block-start: 8px;
}
/* A line's offer note (11.3.16, F8, the designer's cart: "3 for 2 on gel colour · 1 free" after the tag, never
 * "Offer:"): the classic line's own paragraph (its item data's copy, AIEO_DMM_Offer_Cart_View::item_data_template()) and
 * the blocks' detail (the class in its item data). The tag in the theme's accent text colour, as the strips' and hints'. */
p.aieo-offer-note {
	margin: 0.25em 0 0;
	font-size: var(--wp--preset--font-size--xs, 0.8125rem);
	line-height: 1.4;
}
.aieo-offer-note::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-inline-end: 6px;
	vertical-align: -2px;
	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;
}
@media (forced-colors: active) {
	.aieo-offer-note::before {
		forced-color-adjust: none;
		background: CanvasText;
	}
}
/* The classic cart's band kept at its height after a change (11.3.16 F30b): an empty row of the difference, space only. */
.aieo-band-hold > td {
	padding: 0;
	border: 0;
}
