/**
 * Feature chips - product cards and the product page.
 * Pills are reserved in the token system for ephemeral/removable things; a
 * feature chip qualifies, and the shape distinguishes it from structural UI.
 */

.al-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: var(--al-s-2) 0 0;
	padding: 0;
	list-style: none;
}

.al-chip {
	display: inline-flex;
	align-items: center;
	margin: 0; /* theme list spacing gives every li but the last a bottom margin */
	padding: 4px 10px;
	border: 1px solid var(--al-line);
	border-radius: var(--al-r-pill);
	background: var(--al-surface);
	color: var(--al-ink-2);
	font-size: var(--al-fs-xs);
	line-height: 1.5;
	white-space: nowrap;
}

.al-chip--link { padding: 0; border: 0; background: none; }

.al-chip--link > a {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border: 1px solid var(--al-orange-tint-brd);
	border-radius: var(--al-r-pill);
	background: var(--al-orange-tint);
	color: var(--al-orange-tint-ink); /* 6.64:1 on the tint */
	font-size: var(--al-fs-xs);
	text-decoration: none;
	transition: background-color var(--al-t) var(--al-ease);
}

.al-chip--link > a:hover,
.al-chip--link > a:focus-visible {
	background: var(--al-orange-tint-brd);
}

/* On a card the row is height-locked to exactly one line. Two chips maximum is
   enforced in PHP; this stops a long Hebrew label wrapping and shifting the
   grid, which is the failure the reference sites all had. */
.al-chips--card {
	margin-block: 6px;
	block-size: 26px;
	overflow: hidden;
	flex-wrap: nowrap;
}

.al-chips--card .al-chip,
.al-chips--card .al-chip--link > a {
	max-inline-size: 48%;
	overflow: hidden;
	text-overflow: ellipsis;
	display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
	.al-chip--link > a { transition: none; }
}
