/**
 * aieo/lowest-price-message: the EU lowest-price line under the price.
 *
 * The designer's line (10 Nov 2026, every shop's default): one line in the muted ink at the small step, the amounts
 * in the same ink, no margin of its own (the column's gap spaces it). Its own properties, unset unless the shop chose
 * a value: --rooster-lowest-price-size (Settings > the lowest-price message's font size, printed only when it is not
 * the shipped 0.75rem). An info icon follows the words only when the shop wrote a tooltip. No colour of our own.
 *
 * @package ai-eshop-optimizer
 */
.wp-block-aieo-lowest-price-message,
.aieo-lowest-price {
	position: relative; /* the tooltip's box: the line, so it never reaches past the column */
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: var(--rooster-lowest-price-size, var(--wp--preset--font-size--sm, 0.875rem));
	line-height: 1.4;
	color: var(--wp--preset--color--muted, color-mix(in srgb, currentColor 70%, transparent));
	font-variant-numeric: tabular-nums;
}
.aieo-lowest-price__text { min-width: 0; }
.aieo-lowest-price__text :is(.woocommerce-Price-amount, bdi) {
	font-weight: inherit;
	color: inherit;
}

/* Info icon + hover/focus tooltip (only with the shop's tooltip text). */
.aieo-lowest-price__info {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	color: var(--wp--preset--color--muted, currentColor);
	cursor: help;
}
.aieo-lowest-price__info > svg {
	display: block;
	width: 1em;
	height: 1em;
}
/* Closed, it is not rendered (it took layout room past the window's edge while hidden: a phone's page laid out at
   394 px in 390; 11.3.16, F22). Open, it sits above the line at the line's end, never wider than the line. */
.aieo-lowest-price__tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	inset-inline: 0;
	display: none;
	box-sizing: border-box;
	width: max-content;
	max-width: min(240px, 100%);
	margin-inline-start: auto;
	padding: 8px 10px;
	border: 1px solid var(--wp--preset--color--line, color-mix(in srgb, currentColor 16%, transparent));
	border-radius: var(--wp--custom--rooster--shape--panel, 0);
	background: var(--wp--preset--color--neutral-50, Canvas);
	color: var(--wp--preset--color--fg, CanvasText);
	box-shadow: var(--wp--custom--rooster--shadow--md, none);
	font-size: var(--wp--preset--font-size--xs, 0.75rem);
	line-height: 1.35;
	font-weight: 400;
	text-align: start;
	white-space: normal;
	z-index: 20;
}
/* The 8 px between the line and the tooltip are the tooltip's too, so the pointer can move onto it and it stays open
   (WCAG 1.4.13, hoverable; 11.3.16, F22b). */
.aieo-lowest-price__tooltip::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: 100%;
	height: 8px;
}
.aieo-lowest-price__info:hover .aieo-lowest-price__tooltip,
.aieo-lowest-price__info:focus .aieo-lowest-price__tooltip,
.aieo-lowest-price__info:focus-visible .aieo-lowest-price__tooltip {
	display: block;
}
/* Escape closes it (dismissible; view.js) until the pointer or the focus leaves and comes back. */
.aieo-lowest-price__info.is-dismissed .aieo-lowest-price__tooltip {
	display: none;
}
