/* Nova Supply base layer: rules theme.json cannot express. Tokens only. */

/* Form controls never overflow their container. */
:where(input, select, textarea) { box-sizing: border-box; max-width: 100%; }

::selection {
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--on-accent);
}

/* Focus: solid 2px focus outline at 2px offset on every interactive element. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--border--width-strong) solid var(--wp--preset--color--focus);
	outline-offset: 2px;
}

/* Buttons: fixed control height, label centred. */
:where(.wp-element-button, .wp-block-button__link) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--20);
	min-height: var(--wp--custom--control--height);
	transition: background-color var(--wp--custom--transition--fast), color var(--wp--custom--transition--fast), border-color var(--wp--custom--transition--fast);
}
:where(.wp-element-button, .wp-block-button__link):active { opacity: 0.9; }

/* WordPress privacy-policy boilerplate: hide the editor's "Suggested text:" hints on the front end. */
.privacy-policy-tutorial { display: none; }

/* Mono voice: kickers, SKUs, codes. */
:where(code, kbd, samp, pre) { font-family: var(--wp--preset--font-family--mono); }

/* Headings keep tight leading from their own size tokens. */
:where(h1, h2, h3, h4, h5, h6) { text-wrap: balance; }

/* In-page links (#reviews, #comment-12, …) scroll smoothly and stop below the sticky header
   with room to spare. Reduced motion turns the smoothing off below. */
html { scroll-behavior: smooth; }
:target,
#reviews,
[id^="comment-"] {
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--layout--header-height) + var(--wp--preset--spacing--50));
}
/* Under 600px the admin bar scrolls away, so only the header covers the page. */
@media (max-width: 600px) {
	:target,
	#reviews,
	[id^="comment-"] { scroll-margin-top: calc(var(--wp--custom--layout--header-height) + var(--wp--preset--spacing--50)); }
}
/* #reviews is the reviews heading: leave room for the "Reviews" kicker above it too. */
#reviews { scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--layout--header-height) + var(--wp--preset--spacing--50) + var(--wp--preset--spacing--60)); }
@media (max-width: 600px) {
	#reviews { scroll-margin-top: calc(var(--wp--custom--layout--header-height) + var(--wp--preset--spacing--50) + var(--wp--preset--spacing--60)); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
