/**
 * The product page's deal card (AIEO_DMM_Quantity_Front::deal_html(); the designer's surface 1, 17 Nov 2026):
 * the badge and what the offer is on, the sentence, a set's places with the progress words, the end. Loaded only in
 * the head of a product page that has a card. Every colour, size and space is the theme's token (the front-ui rules:
 * FE-D1, FE-S1, FE-T1); another theme without them gets its inherited colours.
 */
.aieo-qty-deal {
	display: grid;
	gap: var(--wp--preset--spacing--3, 0.75rem);
	margin-block: var(--wp--preset--spacing--4, 1rem);
	padding: var(--wp--preset--spacing--4, 1rem);
	border: 1px solid var(--wp--preset--color--fg, currentColor);
	border-radius: var(--wp--custom--rooster--shape--panel, 0);
	color: inherit;
}

.aieo-qty-deal p {
	margin: 0;
}

/* A card whose offer this visitor is not priced by (held out, a limit spent), known after load: hidden in its own
   space, so nothing on the page moves (C7: no layout shift; FE-M1), and out of the accessibility tree. */
.aieo-qty-deal.is-left-out {
	visibility: hidden;
}

/* The head: the badge, then what the offer is on, in bold at the body's size (F32, the designer's `.deal__h`: no size of
   its own, 600, 8px apart). */
.aieo-qty-deal__h {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--2, 0.5rem);
	font-size: inherit;
	font-weight: 600;
	line-height: 1.3;
}

.aieo-qty-deal__badge {
	padding: var(--wp--preset--spacing--1, 0.25rem) var(--wp--preset--spacing--2, 0.5rem);
	background: var(--wp--preset--color--accent, currentColor);
	color: var(--wp--preset--color--on-accent, Canvas);
	font-size: var(--wp--preset--font-size--xs, 0.75rem);
	font-weight: 700;
	letter-spacing: var(--wp--custom--rooster--tracking--wide, 0.06em);
	line-height: 1.2;
	text-transform: uppercase;
}

.aieo-qty-deal__p {
	font-size: var(--wp--preset--font-size--sm, 0.9375rem);
}

.aieo-qty-deal__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--3, 0.75rem);
}

.aieo-qty-deal__places {
	display: flex;
	gap: var(--wp--preset--spacing--2, 0.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* A place: the designer's circle (40 px; its words at 10 px, 700, 0.04em, on one line: "−50 %" never breaks, F3). A
   label that does not fit widens it to a pill, never clipped (F3b): the circle's size its least width, its text's its
   width, a full radius; known at the first paint from its words, so nothing moves. The figure reads left to right
   in every shop ("−50 %" in a right-to-left one too: the label isolated, the minus kept with its figure). */
.aieo-qty-deal__place {
	position: relative;
	display: grid;
	place-items: center;
	box-sizing: border-box;
	min-width: 2.5rem;
	height: 2.5rem;
	padding-inline: 0.125rem;
	border: 1px dashed var(--wp--preset--color--muted, currentColor);
	border-radius: 1.25rem;
	color: var(--wp--preset--color--muted, inherit);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
	white-space: nowrap;
	text-transform: uppercase;
	direction: ltr;
	unicode-bidi: isolate;
}

/* A place filled with a chosen shade: the chip's own look (its colour or its picture), drawn by the swatches, over the
   place's label, which stays hidden but sized: the place keeps its width and its radius through the fill (F3c: a
   circle for a short label, a pill for a long one; nothing beside it moves on the visitor's press). */
.aieo-qty-deal__place.is-on {
	overflow: hidden;
	border-style: solid;
	border-color: var(--wp--preset--color--fg, currentColor);
	background: var(--wp--preset--color--subtle, transparent);
}

.aieo-qty-deal__place.is-on > * {
	display: block;
	width: 100%;
	height: 100%;
}

.aieo-qty-deal__place.is-on > :not(.aieo-qty-deal__mark) {
	position: absolute;
	inset: 0;
}

.aieo-qty-deal__place > .aieo-qty-deal__mark {
	width: auto;
	height: auto;
	visibility: hidden;
}

.aieo-qty-deal__place.is-on img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* A place filled by a unit already in the bag (no chip of this page's): the theme's subtle fill, the words say it too. */
.aieo-qty-deal__place.is-bag {
	border-color: var(--wp--preset--color--muted, currentColor);
	background: var(--wp--preset--color--line, var(--wp--preset--color--subtle, transparent));
}

/* The place a complete set gives: marked by the accent's ring, never by colour alone (the words say it too). */
.aieo-qty-deal__place.is-given {
	outline: 2px solid var(--wp--preset--color--accent, currentColor);
	outline-offset: 2px;
}

.aieo-qty-deal__state {
	/* The row's whole width beside the places (F32b, the designer's card: the state on one line beside them); under them
	   only where less than 10rem is left. A figure keeps its word on its line (no-break spaces: glue(), the script's). */
	flex: 1 1 0%;
	min-width: min(100%, 10rem);
	min-height: 4.2em; /* three lines kept ("2 in your bag. Add 1 more and ..." on a phone), so the words changing after
	                      load moves nothing under the card (FB7) */
	min-height: 3lh;
	font-size: var(--wp--preset--font-size--sm, 0.9375rem);
	line-height: 1.4;
	display: flex;
	align-items: center;
}

/* A language whose longest sentence needs more lines where the sentence has least room (the server's count,
   AIEO_DMM_Quantity_Front::say_lines(): Greek's four): reserved at the first paint, so the bag's sentence after load and
   a choice's never move what is under the card (11.3.16, F12; C7). */
.aieo-qty-deal__state--4 {
	min-height: 5.6em;
	min-height: 4lh;
}

.aieo-qty-deal__state--5 {
	min-height: 7em;
	min-height: 5lh;
}

.aieo-qty-deal__state--6 {
	min-height: 8.4em;
	min-height: 6lh;
}

.aieo-qty-deal__ends {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--2, 0.5rem);
	color: var(--wp--preset--color--muted, inherit);
	font-size: var(--wp--preset--font-size--xs, 0.75rem);
}

.aieo-qty-deal__ends > svg,
.aieo-qty-deal__ends > .rooster-icon {
	flex: none;
}

@media (prefers-reduced-motion: no-preference) {
	.aieo-qty-deal__place {
		transition: border-color 0.15s ease;
	}
}
