/**
 * Favourites front-end styles.
 *
 * Loaded only when the Favourites feature is enabled (see includes/favorites.php).
 * Deliberately minimal: a heart toggle button (outline to filled), a count badge,
 * a nav count badge and a simple favourites grid. Colours inherit from the theme
 * (currentColor), so Bricks styling takes over.
 */

.hac-fav-button {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	background: none;
	border: 0;
	padding: 0.25em;
	margin: 0;
	cursor: pointer;
	color: inherit;
	line-height: 1;
	-webkit-appearance: none;
	appearance: none;
}

.hac-fav-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.hac-fav-icon {
	width: 1.4em;
	height: 1.4em;
	display: block;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	transition: fill 0.15s ease, transform 0.15s ease;
}

.hac-fav-button.is-favorited .hac-fav-icon {
	fill: currentColor;
	stroke: currentColor;
}

.hac-fav-button:active .hac-fav-icon {
	transform: scale(0.85);
}

.hac-fav-button.is-busy {
	opacity: 0.5;
	pointer-events: none;
}

.hac-fav-count {
	font-size: 0.85em;
	font-variant-numeric: tabular-nums;
}

.hac-fav-nav-count {
	display: inline-block;
	min-width: 1.4em;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.hac-fav-nav-count[data-count="0"] {
	opacity: 0.6;
}

.hac-favorites-list {
	display: grid;
	grid-template-columns: repeat(var(--hac-fav-cols, 3), 1fr);
	gap: 1.5rem;
}

.hac-favorites-item {
	position: relative;
}

.hac-favorites-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.hac-favorites-item img {
	width: 100%;
	height: auto;
	display: block;
}

.hac-favorites-title {
	display: block;
	margin-top: 0.5rem;
}

.hac-favorites-item .hac-fav-button {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
}

.hac-favorites-empty {
	padding: 1rem 0;
}
