/*
 * Quote card (nova-blocks#652): stand-in for the card-quote design (nova-blocks#651 family); George's allowance 2026-09-25.
 * Remove when the stack ships a lighter quote-card treatment. Tokens only; colours follow the block's Color Signal context.
 *
 * Type: heading-5 size (fluid) and family; the lead (reading) role's weight, style and line height.
 * Ornament: rule - opening quote mark - rule, drawn in the context's accent ink at Nova's rule weight. Geometry follows
 * Hive classic's quote post: with the unit u = 4/3 of the quote size, mark 1.5u, rules 3u long, 2.5u apart
 * (capped to the quote's width in narrow columns).
 */
.wp-block-quote.is-style-quote-card[class] {
	--quote-card-unit: calc(var(--current-font-size) * 4 / 3);
	--quote-card-inset: calc(var(--quote-card-unit) * 0.75);
	--font-size: var(--theme-heading-5-font-size);
	--current-font-family: var(--theme-heading-5-font-family);
	--current-font-weight: var(--theme-lead-font-weight);
	--current-font-style: var(--theme-lead-font-style);
	--current-line-height: var(--theme-lead-line-height);
	--current-letter-spacing: var(--theme-heading-5-letter-spacing);
	--current-text-transform: none;
	position: relative;
	margin-left: 0;
	margin-right: 0;
	padding: calc(var(--quote-card-inset) + var(--quote-card-unit) * 1.875) 0 0;
	border: 0;
	text-align: center;
	color: inherit;
}

.wp-block-quote.is-style-quote-card[class],
.wp-block-quote.is-style-quote-card[class] p {
	font-family: var(--current-font-family);
	font-size: var(--current-font-size);
	font-weight: var(--current-font-weight);
	font-style: var(--current-font-style);
	line-height: var(--current-line-height);
	letter-spacing: var(--current-letter-spacing);
	text-transform: var(--current-text-transform);
}

.wp-block-quote.is-style-quote-card[class] p {
	--font-size: var(--theme-heading-5-font-size);
	margin-top: 0;
	margin-bottom: 0;
	text-align: center;
}

/* Links keep their emphasis in the text ink (same contrast as the quote). */
.wp-block-quote.is-style-quote-card[class] a {
	color: inherit;
	text-decoration-line: underline;
	text-decoration-thickness: var(--nb-rule-weight, 1px);
}

.wp-block-quote.is-style-quote-card[class]::before,
.wp-block-quote.is-style-quote-card[class]::after {
	position: absolute;
	left: 50%;
	display: block;
	pointer-events: none;
	color: var(--sm-current-accent-color);
}

/* The opening mark, centred on the rules. */
.wp-block-quote.is-style-quote-card[class]::before {
	content: "\201C";
	top: calc(var(--quote-card-inset) - var(--quote-card-unit) * 0.61);
	transform: translateX(-50%);
	font-family: var(--current-font-family);
	font-size: calc(var(--quote-card-unit) * 1.5);
	font-style: normal;
	font-weight: var(--current-font-weight);
	line-height: 1;
}

/* Two rules, each 3u long, 2.5u apart around the mark; in a column narrower than 8.5u they shorten to fit it. */
.wp-block-quote.is-style-quote-card[class]::after {
	content: "";
	top: var(--quote-card-inset);
	width: min(calc(var(--quote-card-unit) * 8.5), 100%);
	height: var(--nb-rule-weight, 1px);
	transform: translateX(-50%);
	background: linear-gradient(
		to right,
		currentColor calc((100% - var(--quote-card-unit) * 2.5) / 2),
		transparent calc((100% - var(--quote-card-unit) * 2.5) / 2),
		transparent calc((100% + var(--quote-card-unit) * 2.5) / 2),
		currentColor calc((100% + var(--quote-card-unit) * 2.5) / 2)
	);
}

/* Attribution: the meta role in the context's text ink. */
.wp-block-quote.is-style-quote-card[class] cite {
	--font-size: var(--theme-meta-font-size);
	--current-font-family: var(--theme-meta-font-family);
	--current-font-weight: var(--theme-meta-font-weight);
	--current-font-style: normal;
	--current-line-height: var(--theme-meta-line-height);
	--current-letter-spacing: var(--theme-meta-letter-spacing);
	--current-text-transform: var(--theme-meta-text-transform);
	display: block;
	margin-top: var(--theme-spacing-fluid-small);
	font-family: var(--current-font-family);
	font-size: var(--current-font-size);
	font-weight: var(--current-font-weight);
	font-style: var(--current-font-style);
	line-height: var(--current-line-height);
	letter-spacing: var(--current-letter-spacing);
	text-transform: var(--current-text-transform);
	text-align: center;
	color: var(--sm-current-fg1-color);
}
