/*
 * Product row: a Tirolez product as a horizontal card, photo then name and short text.
 * Born in the recipe modal (657:21653), and since figma-desktop-elements also the product
 * list of the Escola do Queijo applications (838:20218). The class keeps the name it was
 * born with: the suites and the pinned contrast debt read it.
 */

.recipe-product-card {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	padding: 14px;
	border: 1.4px solid var(--color-surface-muted);
	border-radius: var(--radius-card);
	background-color: var(--color-surface-muted);
}

.recipe-product-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 80px;
	height: 85px;
	overflow: hidden;
}

.recipe-product-card__image {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.recipe-product-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	min-width: 0;
}

.recipe-product-card__name {
	color: var(--color-title-card);
	font-family: var(--font-heading);
	/* Larken 18 / 1.2 in 476:23376 and the recipe modal rows, below the 20 of --font-h7. */
	font-size: var(--font-p2);
	font-weight: var(--weight-heading);
	line-height: var(--lh-heading);
}

.recipe-product-card__text {
	color: var(--color-text);
	font-size: var(--font-p3);
	line-height: 1.3;
}

/* On a white or gray surface the Escola rows are white with a Light Gray outline (838:20218). */
.recipe-product-card--outlined {
	border-color: var(--color-surface-muted);
	background-color: var(--color-surface);
}

/*
 * A published product links to its page (change product-page): the name is the link and
 * its ::after covers the whole row, so the row is one target named by the product.
 */
.recipe-product-card--link {
	position: relative;
	transition: border-color var(--duration-base) var(--ease-out);
}

.recipe-product-card__link::after {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	content: '';
}

.recipe-product-card__link:focus-visible {
	outline: none;
}

.recipe-product-card__link:focus-visible::after {
	outline: 2px solid var(--color-focus-ring);
	outline-offset: 2px;
}

@media (hover: hover) {
	.recipe-product-card--link:hover {
		border-color: var(--color-title-card);
	}
}

@media (prefers-reduced-motion: reduce) {
	.recipe-product-card--link {
		transition: none;
	}
}
