/**
 * Base styles theme.json cannot express. Keep this file small:
 * component styles belong in the block's own style.css.
 */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--focus);
	outline-offset: 2px;
}

.skip-link.screen-reader-text:focus {
	z-index: 100000;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--blue);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Short pages keep the footer at the bottom of the screen. */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100dvh;

	> main {
		flex: 1 0 auto;
	}
}

/*
 * Header, main, footer and Nook sections stack flush: each section sets its
 * own padding, as in Figma. Core blocks inside page content keep the gap.
 */
:where(.wp-site-blocks) > *,
.wp-block-post-content > [class*="wp-block-nook-"] {
	margin-block: 0;
}

img {
	height: auto;
	max-width: 100%;
}

/* Text highlight from Figma: a soft green marker behind a phrase (==text== in editor fields). */
mark {
	padding: 0.05em 0;
	background: var(--wp--custom--highlight);
	color: inherit;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

/* In-page links ("Razišči prostore") glide to their section. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

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