/*
 * Collections navigation.
 *
 * One link pair, one presentation: `.authherb-product-views` offers both views
 * on the Product cards of the Collections hub, the Product Category archives
 * and the Related Products grid. The Product pages no longer carry a pair of
 * their own — each view owns a single route to the other instead.
 *
 * The tokens are declared here rather than inherited, because the cards also
 * render on archives that are outside the Learn presentation scope that owns
 * them.
 */

.authherb-product-views {
	--authherb-nav-accent: #88ad99;
	--authherb-nav-accent-strong: #244a34;
	--authherb-nav-tint: #f2f6f0;
	--authherb-nav-border: #d9dedb;
	--authherb-nav-muted: #5d6761;

	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.7rem;
}

.authherb-product-views__option {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.05rem;
	min-width: 0;
	padding: 0.4rem 0.65rem;
	border: 1px solid var(--authherb-nav-border);
	border-radius: 6px;
	color: var(--authherb-nav-muted);
	text-align: center;
	text-decoration: none;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.authherb-product-views__label {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.authherb-product-views__hint {
	font-size: 10px;
	line-height: 1.3;
	opacity: 0.85;
}

.authherb-product-views__option:hover,
.authherb-product-views__option:focus-visible {
	border-color: var(--authherb-nav-accent);
	background-color: var(--authherb-nav-tint);
	color: var(--authherb-nav-accent-strong);
}

.authherb-product-views__option:focus-visible {
	outline: 2px solid var(--authherb-nav-accent-strong);
	outline-offset: 2px;
}

/*
 * The button wrapper a card no longer has a button for.
 *
 * Dropping the "Select options" control from the markup leaves the theme's own
 * wrapper behind, because the wrapper is printed by the card template and only
 * its contents come from the filtered link. An empty box still takes the margin
 * and the grid row it was given, so the card would keep a gap where the button
 * used to be.
 *
 * The rule reads the wrapper's contents rather than a list of Products, so it
 * holds wherever the control was dropped and stays inert everywhere else: a
 * wrapper that still carries a real link, or the quantity field, is left alone.
 */
.wd-product .wd-add-btn:not(:has(a)):not(:has(button)):not(:has(input)) {
	display: none;
}

/* The card hints are supporting text: drop them before the labels ever wrap. */
@media (max-width: 480px) {
	.authherb-product-views__hint {
		display: none;
	}
}
