/**
 * Inspire Global theme foundation.
 *
 * Keep visual tokens in theme.json. This file contains only behavior that
 * theme.json cannot yet express consistently in the editor and front end.
 */

:where(.wp-site-blocks, .editor-styles-wrapper) {
	overflow-wrap: break-word;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(img, video, canvas, iframe) {
	max-inline-size: 100%;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(img, video) {
	height: auto;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where([id], :focus-visible) {
	scroll-margin-block-start: var(--wp--preset--spacing--64, 64px);
}

:where(.wp-site-blocks, .editor-styles-wrapper) :focus-visible,
.skip-link:focus-visible {
	outline: var(--wp--custom--focus--width, 2px) solid var(--wp--custom--focus--inner-color, #fff);
	outline-offset: var(--wp--custom--focus--offset, 2px);
	box-shadow: 0 0 0 var(--wp--custom--focus--outer-width, 5px) var(--wp--custom--focus--outer-color, #0d1e3a);
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(
	button,
	[role="button"],
	input[type="button"],
	input[type="reset"],
	input[type="submit"],
	select,
	summary,
	.wp-element-button
) {
	min-block-size: 44px;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(a, button, [role="button"], .wp-element-button) {
	transition-duration: var(--wp--custom--motion--duration-fast, 150ms);
	transition-property: background-color, border-color, box-shadow, color, outline-color;
	transition-timing-function: var(--wp--custom--motion--easing-standard, cubic-bezier(0.2, 0, 0, 1));
}

.ig-layout-grid {
	display: grid;
	grid-template-columns: repeat(var(--wp--custom--layout--grid--columns-mobile, 4), minmax(0, 1fr));
	gap: var(--wp--custom--layout--grid--gap, 16px);
}

.ig-layout-grid > * {
	grid-column: 1 / -1;
	min-width: 0;
}

@media (min-width: 48rem) {
	.ig-layout-grid {
		grid-template-columns: repeat(var(--wp--custom--layout--grid--columns-tablet, 6), minmax(0, 1fr));
	}
}

@media (min-width: 64rem) {
	.ig-layout-grid {
		grid-template-columns: repeat(var(--wp--custom--layout--grid--columns-desktop, 12), minmax(0, 1fr));
	}
}

@media (forced-colors: active) {
	:where(.wp-site-blocks, .editor-styles-wrapper) :focus-visible,
	.skip-link:focus-visible {
		outline-color: Highlight;
		box-shadow: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	:where(.wp-site-blocks, .editor-styles-wrapper),
	:where(.wp-site-blocks, .editor-styles-wrapper) *,
	:where(.wp-site-blocks, .editor-styles-wrapper) *::before,
	:where(.wp-site-blocks, .editor-styles-wrapper) *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-delay: 0ms !important;
		transition-duration: 0.01ms !important;
	}
}
