/*
 * Block compatibility styles for U of T Theme Streamlined.
 *
 * Hand-written and loaded after build/site.css. Kept outside build/ because the
 * Tailwind build is not reproducible yet (no lockfile; Tailwind 3 config with
 * Tailwind 4). Fold these into source/styles.css once the build is fixed.
 * Work item 3317 (gaps U2 and U3 from 3324).
 */

/*
 * U2: headings from Kadence Advanced Heading blocks.
 * Tailwind's preflight sets h1-h6 to font-size: inherit, and site.css only styles
 * #body-copy h2:not([class]) and h2.wp-block-heading, so classed headings render as
 * 16px body text. These rules match the core h2-h6 styles (site.css has no h1 size rule).
 *
 * Specificity is (0,0,1): it ties preflight's h2 and wins by source order, but loses to
 * Kadence's per-block classes (.kt-adv-heading…), so sizes set in the editor still apply.
 */
:where(#body-copy) h2:where(.wp-block-kadence-advancedheading, [class*="kt-adv-heading"]),
:where(#body-copy) h3:where(.wp-block-kadence-advancedheading, [class*="kt-adv-heading"]),
:where(#body-copy) h4:where(.wp-block-kadence-advancedheading, [class*="kt-adv-heading"]),
:where(#body-copy) h5:where(.wp-block-kadence-advancedheading, [class*="kt-adv-heading"]),
:where(#body-copy) h6:where(.wp-block-kadence-advancedheading, [class*="kt-adv-heading"]) {
	font-family: trade-gothic-next, sans-serif;
	font-weight: 600;
}

:where(#body-copy) h2:where(.wp-block-kadence-advancedheading, [class*="kt-adv-heading"]) {
	font-size: 1.875rem;
	line-height: 2.25rem;
	color: var(--color-primary);
}

:where(#body-copy) h3:where(.wp-block-kadence-advancedheading, [class*="kt-adv-heading"]) {
	font-size: 1.5rem;
	line-height: 2rem;
	color: var(--color-primary);
}

:where(#body-copy) h4:where(.wp-block-kadence-advancedheading, [class*="kt-adv-heading"]) {
	font-size: 1.25rem;
	line-height: 1.75rem;
	color: var(--color-primary);
}

:where(#body-copy) h5:where(.wp-block-kadence-advancedheading, [class*="kt-adv-heading"]) {
	font-size: 1.125rem;
	line-height: 1.75rem;
	color: rgb(30 41 59);
}

:where(#body-copy) h6:where(.wp-block-kadence-advancedheading, [class*="kt-adv-heading"]) {
	font-size: 1rem;
	line-height: 1.5rem;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	color: rgb(51 65 85);
}

/*
 * U3: front page side margins.
 * front-page.php drops its side padding at xl (px-6 xl:px-0) and has no max-width,
 * so at 1280px and wider, content ran to the screen edge. Keep a gutter and the same
 * 1280px measure as the other templates' .container. Full- and wide-aligned blocks are
 * excluded so they can still span the full width.
 */
@media (min-width: 1280px) {
	.utn-front-body > :not(.alignfull):not(.alignwide) {
		box-sizing: border-box;
		width: 100%;
		max-width: 1280px;
		margin-left: auto;
		margin-right: auto;
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}
