/**
 * Standard WordPress blocks.
 *
 * Core and plugin blocks have no theme-owned per-block stylesheet. This file
 * supplies their shared layout and visual contract on the front end and in the
 * block editor. Project ACF blocks are excluded by namespace.
 */

:root {
	--sws-content: 640px;
	--sws-wide: 1300px;
	--sws-gutter: clamp(1rem, 4vw, 2.5rem);
	--sws-content-gap: var(--wp--preset--spacing--30, 1.5rem);
	--sws-content-main: var(--wp--preset--color--main, #3e66f3);
	--sws-content-main-hover: #2f55dd;
	--sws-content-title: var(--wp--preset--color--title, #1c1c25);
	--sws-content-white: var(--wp--preset--color--white, #fff);
	--sws-content-soft: #f6f7fa;
	--sws-content-line: rgb(28 28 37 / 14%);
}

/* Classic themes do not print the .wp-site-blocks layout root used by core. */
main.site-main {
	overflow-x: clip;
}

main.site-main > :where(:not(.alignfull):not(.alignwide):not([class*="wp-block-sws-theme-"])) {
	width: 100%;
	max-width: min(var(--sws-content), calc(100% - 2 * var(--sws-gutter)));
	margin-inline: auto;
}

main.site-main > :where(.alignwide:not([class*="wp-block-sws-theme-"])) {
	width: 100%;
	max-width: min(var(--sws-wide), calc(100% - 2 * var(--sws-gutter)));
	margin-inline: auto;
}

main.site-main > :where(.alignfull:not([class*="wp-block-sws-theme-"])) {
	width: 100%;
	max-width: none;
}

main.site-main > :where(:not([class*="wp-block-sws-theme-"])) {
	margin-block: 0;
}

/* Theme sections remain flush; a core/theme junction receives one shared gap. */
main.site-main > * + :not([class*="wp-block-sws-theme-"]),
main.site-main > :not([class*="wp-block-sws-theme-"]) + [class*="wp-block-sws-theme-"] {
	margin-block-start: var(--wp--style--global--block-gap, var(--sws-content-gap));
}

main.site-main > *:not([class*="wp-block-sws-theme-"]),
main.site-main > *:not([class*="wp-block-sws-theme-"]) * {
	box-sizing: border-box;
}

main.site-main::after {
	display: table;
	clear: both;
	content: "";
}

main.site-main > .alignleft:not([class*="wp-block-sws-theme-"]) {
	float: left;
	margin-inline: max(var(--sws-gutter), calc((100% - var(--sws-content)) / 2)) 2rem;
}

main.site-main > .alignright:not([class*="wp-block-sws-theme-"]) {
	float: right;
	margin-inline: 2rem max(var(--sws-gutter), calc((100% - var(--sws-content)) / 2));
}

main.site-main > .aligncenter:not([class*="wp-block-sws-theme-"]) {
	display: block;
	margin-inline: auto;
}

/* Shared surface contract. :where keeps project block styles authoritative. */
:is(.site-main, .editor-styles-wrapper) :where(
	p,
	li,
	dt,
	dd,
	figcaption,
	blockquote,
	pre,
	code,
	table,
	input,
	select,
	textarea,
	button
):not([class*="wp-block-sws-theme-"] *) {
	overflow-wrap: anywhere;
}

:is(.site-main, .editor-styles-wrapper) :where(
	.wp-block-columns > *,
	.wp-block-group > *,
	.wp-block-media-text > *,
	.wp-block-query > *,
	.wp-block-post-template > *,
	.wp-block-gallery > *,
	.wp-block-buttons > *
) {
	min-width: 0;
}

:is(.site-main, .editor-styles-wrapper) :where(h1, h2, h3, h4, h5, h6):not([class*="wp-block-sws-theme-"] *) {
	margin-block: 0;
	color: var(--sws-content-title);
	font-family: var(--wp--preset--font-family--geologica, Geologica, Inter, sans-serif);
	font-weight: 700;
	line-height: 1.2;
	text-wrap: balance;
}

:is(.site-main, .editor-styles-wrapper) :where(h1):not([class*="wp-block-sws-theme-"] *) {
	font-size: clamp(2rem, 1.15rem + 3.4vw, 3.5rem);
}

:is(.site-main, .editor-styles-wrapper) :where(h2):not([class*="wp-block-sws-theme-"] *) {
	font-size: clamp(1.75rem, 1.1rem + 2.6vw, 2.75rem);
}

:is(.site-main, .editor-styles-wrapper) :where(h3):not([class*="wp-block-sws-theme-"] *) {
	font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
}

:is(.site-main, .editor-styles-wrapper) :where(h4):not([class*="wp-block-sws-theme-"] *) {
	font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.5rem);
}

:is(.site-main, .editor-styles-wrapper) :where(h5, h6):not([class*="wp-block-sws-theme-"] *) {
	font-size: 1rem;
}

:is(.site-main, .editor-styles-wrapper) :where(p, li, dt, dd):not([class*="wp-block-sws-theme-"] *) {
	color: var(--sws-content-title);
	font-family: var(--wp--preset--font-family--inter, Inter, sans-serif);
	line-height: 1.625;
}

:is(.site-main, .editor-styles-wrapper) :where(a:not([class])):not([class*="wp-block-sws-theme-"] *) {
	color: var(--sws-content-main);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

:is(.site-main, .editor-styles-wrapper) :where(a:not([class]):hover):not([class*="wp-block-sws-theme-"] *) {
	color: var(--sws-content-main-hover);
}

:is(.site-main, .editor-styles-wrapper) :where(ul, ol):not([class*="wp-block-sws-theme-"] *) {
	padding-inline-start: 1.5rem;
}

:is(.site-main, .editor-styles-wrapper) :where(li + li):not([class*="wp-block-sws-theme-"] *) {
	margin-block-start: 0.375rem;
}

:is(.site-main, .editor-styles-wrapper) :where(li::marker):not([class*="wp-block-sws-theme-"] *) {
	color: var(--sws-content-main);
	font-weight: 700;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-list.is-style-checkmark-list) {
	list-style: "✓  ";
}

:is(.site-main, .editor-styles-wrapper) :where(blockquote, .wp-block-quote):not([class*="wp-block-sws-theme-"] *) {
	margin-inline: 0;
	padding: clamp(1.25rem, 3vw, 2rem);
	border-inline-start: 4px solid var(--sws-content-main);
	background: var(--sws-content-soft);
}

:is(.site-main, .editor-styles-wrapper) :where(blockquote p:first-child):not([class*="wp-block-sws-theme-"] *) {
	margin-block-start: 0;
}

:is(.site-main, .editor-styles-wrapper) :where(blockquote p:last-child):not([class*="wp-block-sws-theme-"] *) {
	margin-block-end: 0;
}

:is(.site-main, .editor-styles-wrapper) :where(cite, .wp-block-quote__citation):not([class*="wp-block-sws-theme-"] *) {
	display: block;
	margin-block-start: 0.75rem;
	color: var(--sws-content-title);
	font-size: 0.875rem;
	font-style: normal;
	font-weight: 600;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-pullquote) {
	padding-block: clamp(2rem, 5vw, 4rem);
	border-block: 3px solid var(--sws-content-main);
	text-align: center;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-pullquote blockquote) {
	padding: 0;
	border: 0;
	background: transparent;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-separator) {
	width: min(8rem, 100%);
	margin-inline: auto;
	border: 0;
	border-block-start: 2px solid var(--sws-content-main);
	opacity: 1;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-separator.is-style-wide) {
	width: 100%;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-separator.is-style-dots) {
	border: 0;
	color: var(--sws-content-main);
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-table, .wp-block-code, pre) {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

:is(.site-main, .editor-styles-wrapper) :where(table) {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

:is(.site-main, .editor-styles-wrapper) :where(th, td) {
	padding: 0.75rem 1rem;
	border: 1px solid var(--sws-content-line);
	text-align: start;
	vertical-align: top;
}

:is(.site-main, .editor-styles-wrapper) :where(th) {
	background: var(--sws-content-soft);
	color: var(--sws-content-title);
	font-weight: 700;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-table.is-style-stripes tbody tr:nth-child(odd)) {
	background: var(--sws-content-soft);
}

:is(.site-main, .editor-styles-wrapper) :where(code, kbd, samp) {
	padding: 0.125em 0.35em;
	border-radius: 0.3em;
	background: var(--sws-content-soft);
	color: var(--sws-content-title);
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
	font-size: 0.9em;
}

:is(.site-main, .editor-styles-wrapper) :where(pre, .wp-block-code) {
	padding: 1rem;
	border: 1px solid var(--sws-content-line);
	border-radius: 0.75rem;
	background: var(--sws-content-title);
	color: var(--sws-content-white);
	white-space: pre;
}

:is(.site-main, .editor-styles-wrapper) :where(pre code, .wp-block-code code) {
	padding: 0;
	background: transparent;
	color: inherit;
	font-size: 0.875rem;
	white-space: inherit;
}

:is(.site-main, .editor-styles-wrapper) :where(img, video, iframe, svg) {
	max-width: 100%;
}

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

:is(.site-main, .editor-styles-wrapper) :where(figure) {
	margin-inline: 0;
}

:is(.site-main, .editor-styles-wrapper) :where(figcaption, .wp-element-caption) {
	margin-block-start: 0.625rem;
	color: var(--sws-content-title);
	font-size: 0.875rem;
	line-height: 1.5;
	text-align: center;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-gallery) {
	gap: var(--wp--preset--spacing--20, 1rem);
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-cover) {
	min-height: clamp(20rem, 50vw, 34rem);
	border-radius: 1.25rem;
	background-color: var(--sws-content-title);
	overflow: clip;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-media-text) {
	gap: clamp(1.5rem, 4vw, 3rem);
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-media-text__content) {
	padding: clamp(1rem, 4vw, 2.5rem);
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-buttons) {
	gap: 0.75rem;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-element-button, .wp-block-button__link, button, input[type="submit"], input[type="button"]) {
	display: inline-flex;
	min-height: 3rem;
	align-items: center;
	justify-content: center;
	padding: 0.875rem 1.5rem;
	border: 0;
	border-radius: 100px;
	background: var(--sws-content-main);
	color: var(--sws-content-white);
	font: 700 1rem/1.2 var(--wp--preset--font-family--inter, Inter, sans-serif);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-element-button:hover, .wp-block-button__link:hover, button:hover, input[type="submit"]:hover, input[type="button"]:hover) {
	background: var(--sws-content-main-hover);
	color: var(--sws-content-white);
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-button.is-style-outline .wp-block-button__link) {
	border: 2px solid var(--sws-content-main);
	background: transparent;
	color: var(--sws-content-main);
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-button.is-style-outline .wp-block-button__link:hover) {
	background: var(--sws-content-main);
	color: var(--sws-content-white);
}

:is(.site-main, .editor-styles-wrapper) :where(a, button, input, select, textarea):focus-visible {
	outline: 3px solid var(--sws-content-main);
	outline-offset: 3px;
}

:is(.site-main, .editor-styles-wrapper) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea) {
	width: 100%;
	min-height: 3rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--sws-content-line);
	border-radius: 0.75rem;
	background: var(--sws-content-white);
	color: var(--sws-content-title);
	font: inherit;
}

:is(.site-main, .editor-styles-wrapper) :where(textarea) {
	min-height: 8rem;
	resize: vertical;
}

:is(.site-main, .editor-styles-wrapper) :where(label) {
	display: inline-block;
	margin-block-end: 0.375rem;
	color: var(--sws-content-title);
	font-weight: 600;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-search__inside-wrapper) {
	display: flex;
	gap: 0.75rem;
	padding: 0;
	border: 0;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-search__input) {
	min-width: 0;
}

:is(.site-main, .editor-styles-wrapper) :where(.wpcf7-form p) {
	margin-block: 0 1rem;
}

:is(.site-main, .editor-styles-wrapper) :where(.wpcf7-not-valid-tip) {
	margin-block-start: 0.375rem;
	color: #b42318;
	font-size: 0.875rem;
}

:is(.site-main, .editor-styles-wrapper) :where(.wpcf7-response-output) {
	margin: 1rem 0 0;
	padding: 0.875rem 1rem;
	border-radius: 0.75rem;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-calendar table) {
	table-layout: fixed;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-calendar caption) {
	margin-block-end: 0.75rem;
	color: var(--sws-content-title);
	font-weight: 700;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-latest-posts, .wp-block-latest-comments, .wp-block-page-list, .wp-block-categories-list, .wp-block-archives-list) {
	margin: 0;
	padding-inline-start: 1.25rem;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-latest-comments__comment) {
	margin-block: 0 1rem;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-rss__item, .wp-block-post-template > li) {
	padding: 1rem;
	border: 1px solid var(--sws-content-line);
	border-radius: 1rem;
	background: var(--sws-content-white);
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-post-template) {
	gap: var(--wp--preset--spacing--30, 1.5rem);
	padding: 0;
	list-style: none;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-query-pagination) {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-navigation, .wpml-language-switcher-block, .wpml-navigation-language-switcher-block) {
	font-family: var(--wp--preset--font-family--inter, Inter, sans-serif);
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-navigation ul, .wpml-language-switcher-block ul, .wpml-navigation-language-switcher-block ul) {
	gap: 0.75rem;
	padding: 0;
	list-style: none;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-navigation__submenu-icon) {
	min-width: 2.25rem;
	min-height: 2.25rem;
	padding: 0.5rem;
	border: 1px solid var(--sws-content-line) !important;
	border-radius: 100px;
	background: var(--sws-content-soft) !important;
	color: var(--sws-content-title);
}

:is(.site-main, .editor-styles-wrapper) :where(.yoast-breadcrumbs, .wp-block-yoast-seo-breadcrumbs) {
	color: var(--sws-content-title);
	font-size: 0.9375rem;
	line-height: 1.5;
}

:is(.site-main, .editor-styles-wrapper) :where(.schema-faq-section, .schema-how-to-step) {
	padding: 1rem;
	border: 1px solid var(--sws-content-line);
	border-radius: 1rem;
	background: var(--sws-content-soft);
}

:is(.site-main, .editor-styles-wrapper) :where(.schema-faq-section + .schema-faq-section, .schema-how-to-step + .schema-how-to-step) {
	margin-block-start: 1rem;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-details) {
	padding: 1rem;
	border: 1px solid var(--sws-content-line);
	border-radius: 0.75rem;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-details summary) {
	color: var(--sws-content-title);
	font-weight: 700;
	cursor: pointer;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-embed__wrapper) {
	position: relative;
	max-width: 100%;
	overflow: hidden;
}

:is(.site-main, .editor-styles-wrapper) :where(.wp-block-spacer) {
	margin-block: 0;
}

@media (prefers-reduced-motion: reduce) {
	:is(.site-main, .editor-styles-wrapper) :where(.wp-element-button, .wp-block-button__link, button, input) {
		scroll-behavior: auto;
		transition-duration: 0.01ms;
	}
}
