/*
 * TEMPORARY, remove together with Elementor (UCCN-17): keeps Elementor's global kit styles
 * out of the theme's header and footer.
 *
 * While Elementor is active it adds its kit class (`elementor-kit-<id>`) to <body> on every
 * page, and the kit's site-wide rules (`.elementor-kit-11 { font-family }`, `… a`, `… h2`,
 * `… button`, `… button:hover, … button:focus`) are meant for Elementor content but also
 * match the theme's own markup. They outrank theme.json styles, which WordPress prints with
 * low-specificity `:where()` selectors. Seen on uccn.org on Nov 10, 2026: Montserrat and
 * Archivo instead of Libre Franklin, a square blue Subscribe button with uppercase text, and
 * the mobile menu button drawn as a large blue box.
 *
 * The values below restate the theme.json ones with !important, scoped to the template parts
 * through the `uccn-site-header` and `uccn-site-footer` classes set in templates/*.html.
 * Page content is left alone: Elementor pages keep their kit styles. To roll back, delete
 * this file and its enqueue in functions.php.
 */

:is(.uccn-site-header, .uccn-site-footer) {
	/* The kit sets its font on <body>; setting it here wins through inheritance. */
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);

	& :is(h1, h2, h3, h4, h5, h6) {
		font-family: var(--wp--preset--font-family--heading) !important;
	}

	& a:not(.wp-element-button) {
		font-family: inherit !important;
		font-weight: inherit !important;
	}

	/* The current page in the menu is bold (assets/css/blocks/core-navigation.css). */
	& a[aria-current="page"]:not(.wp-element-button) {
		font-weight: 700 !important;
	}

	/* Theme buttons (Donate, Subscribe): styles.elements.button in theme.json. */
	& .wp-element-button {
		border: 0 !important;
		border-radius: 9999px !important;
		padding: 0.75rem 1.75rem !important;
		font-family: var(--wp--preset--font-family--body) !important;
		font-size: var(--wp--preset--font-size--medium) !important;
		font-weight: 600 !important;
		text-transform: none !important;
		text-shadow: none !important;
	}
}

/* Donate (`is-style-accent`, styles/blocks/button-accent.json): the kit colors every link. */
.uccn-site-header .is-style-accent .wp-element-button {
	color: var(--wp--preset--color--contrast) !important;

	&:hover {
		color: var(--wp--preset--color--accent) !important;
	}
}

/*
 * Navigation buttons (menu open and close, submenu toggles): core draws them as plain icons,
 * the kit's `button` rule turns them into blue boxes and the close button white on focus.
 * Values from core's navigation block styles.
 */
.uccn-site-header .wp-block-navigation button {
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background-color: transparent !important;
	color: currentColor !important;
	font: inherit !important;
	text-transform: inherit !important;
	text-shadow: none !important;
}

/*
 * Subscribe (footer newsletter band, "Blue gradient" section style): the kit paints buttons
 * blue, and white with blue text on hover and focus.
 */
.uccn-site-footer .uccn-newsletter .wp-element-button {
	background-color: var(--wp--preset--color--accent) !important;
	color: var(--wp--preset--color--contrast) !important;

	&:hover {
		background-color: var(--wp--preset--color--base) !important;
	}
}
