/*
 * Stand-in for pixelgrade/nova-blocks#631 (https://github.com/pixelgrade/nova-blocks/issues/631) (Supernova card rule). Remove when Nova Blocks ships it.
 * Applies only to collections carrying the registered block style `is-style-ruled-cards`.
 * Weight, colour and gap come from Nova / Style Manager tokens; the product attribute would set the two
 * --nb-card-rule-* variables (read here first) from `cardRuleWeight` / `cardRuleStrength`.
 */

/* Resolve the ink on the collection wrapper (the ground the cards sit on), before each card's own colour
   context re-scopes --sm-current-*: the rule re-tones with the collection ground (dark ground → light rule). */
.nb-supernova.is-style-ruled-cards {
	--lt-bridge-card-rule-color: var(--nb-card-rule-color, var(--sm-current-fg1-color, currentColor));
	--lt-bridge-card-rule-weight: var(--nb-card-rule-weight, calc(var(--nb-rule-weight, 1px) * 3));
}

.nb-supernova.is-style-ruled-cards .nb-supernova-item {
	border-block-start: var(--lt-bridge-card-rule-weight) solid var(--lt-bridge-card-rule-color);
	padding-block-start: calc(var(--nb-spacing, 1em) * 0.5);
}
