/*
 * rooster/link-cards (now a variant of the library: BRIEF-2026-11-01-BLOCK-LIBRARY.md) (BRIEF-2026-11-01-LANDINGS-BY-TEMPLATE.md, order 1): the legacy promo template's "Works with"
 * cards, complete on its own: the grid (one column, two from 40rem, the count up to four from 64rem, 1rem apart), the
 * card (0.75rem corners, the line colour, 1rem inside, its cell's full height), the name semibold with the arrow
 * (Lucide's arrow-right, a mask of this sheet) at the right, the line small and muted, and the hover in the family's
 * colour. Colours are the theme's tokens with the legacy's light and dark values as fallbacks. Compiled by build/blocks-css.mjs.
 */

@import "../../theme.css";

.rooster-link-cards {
	--rooster-link-cards-fam: var(--wp--preset--color--accent, light-dark(#334155, #cbd5e1));
	--rooster-link-cards-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	box-sizing: border-box;
	padding: 0;
	list-style: none;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast-2, light-dark(#45556c, #cad5e2));
	overflow-wrap: normal;
	word-break: normal;
	margin-block-end: 0;
}

.rooster-link-cards li {
	margin: 0;
}

.rooster-link-cards .rooster-link-cards__card {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	height: 100%;
	padding: 1rem;
	border: 1px solid var(--wp--preset--color--line, light-dark(#e2e8f0, rgb(255 255 255 / 10%)));
	border-radius: 0.75rem;
	color: inherit;
	text-decoration: none;
	transition: color 150ms, background-color 150ms, border-color 150ms;
}

.rooster-link-cards .rooster-link-cards__card:hover {
	border-color: var(--rooster-link-cards-fam);
	background: light-dark(color-mix(in srgb, var(--rooster-link-cards-fam) 5%, transparent), color-mix(in srgb, var(--rooster-link-cards-fam) 10%, transparent));
}

.rooster-link-cards .rooster-link-cards__card:focus-visible {
	outline: 2px solid var(--rooster-link-cards-fam);
	outline-offset: 2px;
}

.rooster-link-cards__name {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast, light-dark(#020618, #ffffff));
}

.rooster-link-cards__arrow {
	flex: none;
	width: 1rem;
	height: 1rem;
	background-color: currentColor;
	-webkit-mask: var(--rooster-link-cards-arrow) center / contain no-repeat;
	mask: var(--rooster-link-cards-arrow) center / contain no-repeat;
}

.rooster-link-cards__line {
	margin-top: 0.25rem;
	font-size: 0.875rem;
	line-height: 1.375;
	color: var(--wp--preset--color--muted, light-dark(#45556c, #90a1b9));
}

@media (min-width: 40rem) {
	.rooster-link-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 64rem) {
	.rooster-link-cards--cols-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rooster-link-cards--cols-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
