/*
 * Nomon Theme — base stylesheet, loaded on the frontend and inside the editor iframe.
 *
 * Tailwind handles reset and utilities; this file owns only what utilities can't express.
 * Responsibilities and the cascade smoke-test: docs/styling.md.
 */

/* Up front so layer order doesn't depend on when Blockstudio's inline style loads. Holds
 * only while Blockstudio emits layered utilities — smoke-test in docs/styling.md. */
@layer theme, base, components, utilities;

/* The server-side compile otherwise breaks single-axis `translate-*` utilities. */
@property --tw-translate-x { syntax: "*"; inherits: false; initial-value: 0; }
@property --tw-translate-y { syntax: "*"; inherits: false; initial-value: 0; }
@property --tw-translate-z { syntax: "*"; inherits: false; initial-value: 0; }

/* Site tokens that are not theme.json presets. */
:root {
	--site-gutter: 60px;
	--prose-cap: 940px;
	--content-edge: 75px;
	--ease-drawer: cubic-bezier(0.77, 0, 0.175, 1);

	/* Stacking scale; plugin layers are listed with their own values. */
	--nav-font-size: 1rem; /* Off-scale on purpose: 18 px desktop nav links don't fit at 1301 px. */
	--z-dropdown: 50;
	--z-sticky: 55;
	--z-search: 60;
	--z-drawer: 1010;
	--z-cart: 1020;
	--z-modal: 1100;
}

/* Plugin UI: nomon-helper quick-contact tab is z 1000 and its panel 999 (under the drawers);
 * the cookie modal is z 2147483647 (top). `html:root` beats the cookie plugin's own :root font. */
html:root {
	--nomon-font: var(--wp--preset--font-family--montserrat);
}

/* No quick-contact tab on checkout / order-received; nomon-wc-checkout's own documents carry only `nwc-checkout-body`. */
:is(.woocommerce-checkout, .nwc-checkout-body) :is(#nomon-quick-contact-button, #nomon-quick-contact-modal) {
	display: none !important;
}

/* Plugin type on the scale. Unlayered and `body`-prefixed: plugin rules are unlayered and some load after this file. */
body.nwc-checkout-body {
	--nwc-font-size-xs: var(--wp--preset--font-size--micro);
	--nwc-font-size-sm: var(--wp--preset--font-size--micro);
	--nwc-font-size-md: var(--wp--preset--font-size--body);
	--nwc-font-size-lg: var(--wp--preset--font-size--body);
	--nwc-font-size-xl: var(--wp--preset--font-size--body);
	--nwc-font-size-2xl: var(--wp--preset--font-size--title-s);
}
body :is(.nwc-checkout__item-qty, .nomon-category__badge, .nomon-cookie-list, .nomon-cookie-list code) { font-size: var(--wp--preset--font-size--micro); }
body :is(.nomon-cm__desc, .nomon-cm__footer, .nomon-category__name, .nomon-category__cookies, .nomon-btn, .nomon-iframe-placeholder__text, .nomon-quick-contact-text, .nomon_footer) { font-size: var(--wp--preset--font-size--caption); }
body .nwc-checkout__modal .input-text { font-size: var(--wp--preset--font-size--body); }
body :is(.nomon-cm__title, .nomon-pm__title) { font-size: var(--wp--preset--font-size--title-s); }
body .nomon-quick-contact-modal h2 { font-size: var(--wp--preset--font-size--title-m); }
body :is(.nomon-quick-contact-button, .nomon-quick-contact-modal-content) { box-shadow: none; }
body :is(.nwc-checkout__toggle-btn, .nwc-checkout__radio-price, .nwc-checkout__pickup-name, .nwc-checkout__item-name, .nwc-checkout__item-price, .nwc-checkout__totals-value) { font-weight: 400; }
body .nwc-checkout .nwc-checkout__coupon-btn { font-weight: 600; }

@media (max-width: 767.98px) {
	:root { --site-gutter: 40px; }

	/* `html:root` outranks the preset definitions in global-styles. */
	html:root {
		--wp--preset--font-size--title-2xl: 2.25rem;
		--wp--preset--font-size--title-xl: 1.75rem;
		--wp--preset--font-size--title-l: 1.75rem;
		--wp--preset--font-size--title-m: 1.375rem;
	}
}

@media (max-width: 478.98px) {
	:root { --site-gutter: 30px; }
}

/* Unlayered on purpose: wrapping this ties with preflight's `body { line-height: inherit }`. */
body {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 400;
	line-height: 1.6;
	color: var(--wp--preset--color--foreground);
}

.site { overflow-x: clip; }

/* Carousels bleed past the content edge on the right only; the left edge stays aligned (4 px spare for focus rings). */
:is(.solis-product-carousel__frame, .solis-videos) { clip-path: inset(-100vh -100vw -100vh -4px); }
:is(.solis-product-carousel__frame, .solis-videos) > .swiper { overflow: visible; }

/* Converted content carries `font-bold` on 55 headings; headings stay at the 600 heading weight. Unlayered to beat the utility. */
:is(h1, h2, h3, h4, h5, h6).font-bold { font-weight: 600; }

/* WP's `size-full` marker collides with Tailwind's utility of that name; unlayered on
 * purpose so it beats the layered utility. See docs/styling.md. */
.wp-block-image.size-full {
	width: auto;
	height: auto;
}

/* WooCommerce's `col-1`/`col-2` collide with Tailwind's grid-column utilities. See docs/styling.md. */
.col2-set > .col-1,
.col2-set > .col-2 {
	grid-column: auto;
}

/* Block, not inline-block: the line box under an inline anchor opens a gap above the caption. */
.wp-block-image > a {
	display: block;
	width: fit-content;
}

/* Text-align control is hidden; unlayered at (0,2,1) to beat core's unlayered `:root .has-text-align-*`. */
:root :is(p, h1, h2, h3, h4, h5, h6):is(
	.has-text-align-left,
	.has-text-align-center,
	.has-text-align-right
) {
	text-align: inherit;
}

@layer base {
	/* `body` outranks preflight's `h1…h6 { font: inherit }`, which loads later in the same layer. */
	body :is(h1, h2, h3, h4, h5, h6) { font-weight: 600; margin-block: 0 0.6em; }

	body h1 { font-size: var(--wp--preset--font-size--title-xl); line-height: 1.2; }
	body h2 { font-size: var(--wp--preset--font-size--title-l);  line-height: 1.25; }
	body h3 { font-size: var(--wp--preset--font-size--title-m);  line-height: 1.3; }
	body :is(h4, h5) { font-size: var(--wp--preset--font-size--title-s); line-height: 1.3; }
	body h6 { font-size: var(--wp--preset--font-size--body);     line-height: 1.3; }

	body :is(p, ul, ol, figure) + :is(h1, h2, h3, h4, h5, h6) { margin-top: 50px; }
	body :where(.site-content, .wp-block-group, .is-root-container, .solis-tractor-content, .solis-tabs__panel) > :is(h1, h2) + * { margin-top: 30px; }
	body :where(.site-content, .wp-block-group, .is-root-container, .solis-tractor-content, .solis-tabs__panel) > :is(h3, h4, h5, h6) + * { margin-top: 20px; }

	/* Default sibling gap; theme.json `blockGap: null` stops WP emitting its unlayered one. */
	body :where(.site-content, .wp-block-group, .is-root-container) > * + * { margin-top: 30px; }

	p { margin-block: 1.5em; }
	body :is(h1, h2, h3, h4, h5, h6, p):first-child { margin-top: 0; }
	p:last-child { margin-bottom: 0; }

	/* Articles read at one step down: h2 28, h3 22, h4–h6 18. */
	body.single-post .site-content h2 { font-size: var(--wp--preset--font-size--title-m); line-height: 1.3; }
	body.single-post .site-content h3 { font-size: var(--wp--preset--font-size--title-s); line-height: 1.3; }
	body.single-post .site-content :is(h4, h5, h6) { font-size: var(--wp--preset--font-size--body); line-height: 1.4; }

	/* Legacy content uses H1 for section titles (4 items); it renders at H2 size like the old site. */
	body :is(.site-content, .wp-block-group, .is-root-container) > h1 { font-size: var(--wp--preset--font-size--title-l); }

	/* Content copy: atoms directly inside a content wrapper reset to body text whatever the wrapper sets. */
	:is(.site-content, .wp-block-group, .is-root-container) > :is(p, ul, ol) {
		font-size: var(--wp--preset--font-size--body);
		font-weight: 400;
		line-height: 1.6;
	}

	.wp-block-list { margin-block: 1.5em; padding-inline: 1em; }
	.wp-block-list:where(ul) { list-style: disc; }
	.wp-block-list:where(ol) { list-style: decimal; }
	.wp-block-list li { margin-top: 0.5em; }
	.wp-block-list :where(li > .wp-block-list) { margin-block: 0; }

	figcaption { font-size: var(--wp--preset--font-size--caption); margin-top: 0.5em; }

	:is(p, .wp-block-list li, td) a { color: var(--wp--preset--color--accent); text-decoration: underline; }
	:is(.site-header, .site-footer, .site-breadcrumbs) a:is(:hover, :focus-visible) { text-decoration: underline; }

	:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

	.site-content > :first-child { margin-top: var(--content-edge); }
	.site-content > :last-child { margin-bottom: var(--content-edge); }
}

/* Content column. `:root` outranks the editor's (0,2,0) layout rule; `!important` matches WP's margin rule. */
:root :is(.site-content, .wp-block-group, .is-root-container) > :is(p, h1, h2, h3, h4, h5, h6, ul, ol, figure, .wp-block-table, .wp-block-embed, .wp-block-gallery, .nomon-gallery, .nomon-gallery-outer, .wp-block-nomon-gallery, .nomon-buttons, .wsf-form),
:root :is(.site-content, .wp-block-group, .is-root-container) > .wp-block-html > * {
	max-width: var(--prose-cap);
	margin-inline: auto !important;
}

/* Unlayered and (0,2,0) to beat core's unlayered `.wp-block-image { margin: 0 0 1em }` and kin. */
:is(.site-content, .wp-block-group, .wp-block-column, .is-root-container) > :is(.wp-block-image, .wp-block-embed, .wp-block-video, .wp-block-gallery) {
	margin-block: 1.5em;
}
:is(.site-content, .wp-block-group, .wp-block-column, .is-root-container) > .wp-block-table {
	margin-block: 1.5em;
}
figure.wp-block-table :is(th, td) {
	border: 1px solid var(--wp--preset--color--border);
	padding: 10px;
}

/* Auto-bleed, mirroring native `.alignfull`; `!important` matches WP's own margin rule. */
.has-global-padding > .wp-block-group.has-background {
	max-width: none;
	margin-left: calc(var(--wp--style--root--padding-left) * -1) !important;
	margin-right: calc(var(--wp--style--root--padding-right) * -1) !important;
	padding-left: var(--wp--style--root--padding-left);
	padding-right: var(--wp--style--root--padding-right);
}

/* Spacing controls are disabled in theme.json, so colored sections need a default. */
.wp-block-group.has-background {
	padding-block: var(--wp--preset--spacing--section);
}

/* Light text on every swatch that fails AA with black. */
:is(.has-dark-background-color, .has-foreground-background-color, .has-accent-background-color, .has-accent-dark-background-color, .has-sale-background-color) {
	color: var(--wp--preset--color--background);
}

/* Section rhythm between duplos; add composite block classes here as they ship. */
.has-global-padding > .wp-block-group + .wp-block-group {
	margin-top: var(--wp--preset--spacing--section);
}

@layer base {
	html {
		scroll-behavior: smooth;
		scroll-padding-top: var(--scroll-offset, 2rem);
	}

	body :is(strong, b) { font-weight: 600; }

	/* Gutenberg can't hide these toolbar buttons, so cancel the effect instead. */
	body :where(h1, h2, h3, h4, h5, h6) :is(strong, b, em, i) {
		font-weight: inherit;
		font-style: inherit;
	}

	.screen-reader-text {
		border: 0;
		clip-path: inset(50%);
		height: 1px;
		margin: -1px;
		overflow: hidden;
		padding: 0;
		position: absolute;
		width: 1px;
		word-wrap: normal !important;
	}

	.skip-link:focus {
		clip-path: none;
		height: auto;
		margin: 0;
		overflow: auto;
		padding: 1rem;
		position: absolute;
		inset-block-start: 0;
		inset-inline-start: 0;
		width: auto;
		z-index: 100000;
		background: #000;
		color: #fff;
		text-decoration: underline;
	}

	/* WCAG 2.4.4: per-site CSS may restyle or hide the glyph, never the screen-reader text. */
	a.is-external-link::after,
	a.is-new-window::after {
		content: " ↗";
		display: inline-block;
		font-size: 0.85em;
		vertical-align: super;
		line-height: 1;
	}
	a.is-new-window::after {
		content: " ⧉";
	}
	a.is-external-link.is-new-window::after {
		content: " ⧉";
	}

	/* Hides the glyph in the footer and credit bar only; the screen-reader text stays. */
	:is(.site-footer, .nomon_footer) a.is-external-link::after,
	:is(.site-footer, .nomon_footer) a.is-new-window::after,
	:is(.site-footer, .nomon_footer) a.is-external-link.is-new-window::after {
		content: none;
	}
}

/* Critical Swiper layout before the lazy vendor CSS lands. No pre-init `visibility: hidden`
 * — that hid the hero from FlyingPress's above-the-fold pass, costing the LCP preload. */
.swiper { overflow: hidden; }
.swiper-wrapper { display: flex; }
.swiper-slide { flex-shrink: 0; width: 100%; }
/* Overrides FlyingPress Lazy Render's inline style — see docs/runtimes.md. */
.swiper-slide,
.swiper-slide * { content-visibility: visible !important; }

/* Editor-only: flattens Gutenberg's InnerBlocks wrapper chain, which breaks parent flex/grid.
 * Unlayered to outrank editor styles; descendant combinators because `useBlockProps` shifts a level. */
[data-type^="nomon/"] .block-editor-inner-blocks,
[data-type^="nomon/"] .block-editor-block-list__layout:not([data-type], .nomon-image-card__content) {
	display: contents;
}

/* Editor-only: equal-width flex children of `nomon/buttons`. */
.nomon-buttons--equal.flex-row > [data-type="nomon/button"] {
	flex: 1 1 0%;
	min-width: 0;
}

/* Editor-only: Blockstudio's marker span takes `:first-child`, so the block after it gets a block gap. */
:is(.is-layout-flow, .is-layout-constrained) > [data-blockstudio-render-marker]:first-child + * {
	margin-block-start: 0;
}

/* Editor-only: the front end swaps the `+` glyph for `plus.svg` (inc/integrations/core-blocks.php). */
[data-type="core/accordion-heading"] .wp-block-accordion-heading__toggle-icon {
	position: relative;
	-webkit-text-fill-color: transparent;
}
[data-type="core/accordion-heading"] .wp-block-accordion-heading__toggle-icon::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: currentColor;
	mask: url("../icons/plus.svg") center / contain no-repeat;
}

/* Editor-only: a drag saves the box's computed `aspectRatio`, which the ratio dropdown
 * cannot display or clear (`docs/integrations.md`). Selector length beats the components
 * stylesheet's own `.has-show-handle` rule at (0,3,0). */
[data-type="core/image"] .components-resizable-box__container.has-show-handle .components-resizable-box__handle {
	display: none;
}

/* Editor-only: makes the post title read as page metadata, not the first H1. No negative
 * inline margin needed — `useRootPaddingAwareAlignments` leaves body itself unpadded. */
/* WP core's editor styles add a top padding to the iframe body; zero it. */
body {
	padding-top: 0;
}

.edit-post-visual-editor__post-title-wrapper {
	background-color: #f0f0f0;
	color: #1e1e1e;
	margin-block-start: 0 !important;
	margin-block-end: 3rem;
	padding-inline: var(--wp--style--root--padding-left, clamp(1rem, 5vw, 5rem));
}

.edit-post-visual-editor__post-title-wrapper .editor-post-title {
	color: inherit;
	margin: 0 auto;
	max-width: var(--wp--style--global--content-size, 1540px);
	padding-block: 3rem;
	font-size: var(--wp--preset--font-size--title-l);
}

.post-type-post .edit-post-visual-editor__post-title-wrapper .editor-post-title {
	font-size: var(--wp--preset--font-size--title-xl);
}

.edit-post-visual-editor__post-title-wrapper .editor-post-title::before {
	content: "Sivun otsikko";
	display: block;
	color: #666;
	font-size: var(--wp--preset--font-size--caption);
	font-weight: 400;
	margin-block-end: 0.75rem;
}

.post-type-post .edit-post-visual-editor__post-title-wrapper .editor-post-title::before {
	content: "Artikkelin otsikko";
}

.edit-post-visual-editor__post-title-wrapper .editor-post-title [data-rich-text-placeholder]::after {
	color: #666;
	opacity: 1;
}

/* Header navigation: desktop dropdown row and the ≤1300 drawer. Markup: header.php + Nav_Walker.
 * Layered so `xl:hidden` / `max-xl:hidden` on the same elements still win. */
@layer components {
	.nav-desktop .menu-items {
		display: flex;
		gap: 30px;
		height: 100%;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.nav-desktop .menu-item {
		position: relative;
		display: flex;
		align-items: center;
	}

	.nav-desktop .menu-item > :is(a, span) {
		color: inherit;
		font-size: var(--nav-font-size);
		font-weight: 500;
		white-space: nowrap;
		text-decoration: none;
	}

	.nav-desktop .menu-item > :is(a:hover, a:focus-visible, span:hover) { text-decoration: underline; }

	.nav-desktop .dropdown-toggle {
		display: grid;
		place-items: center;
		margin-left: 10px;
		padding: 0;
		color: inherit;
		cursor: pointer;
	}

	.nav-desktop .dropdown-toggle svg {
		width: 12px;
		height: 12px;
	}

	.nav-desktop :is(.sub-menu, .mega-panel) {
		position: absolute;
		z-index: var(--z-dropdown);
		border: 1px solid var(--wp--preset--color--border);
		border-top: 0;
		background: var(--wp--preset--color--background);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.18s ease-out, transform 0.18s ease-out, visibility 0.18s;
	}

	.nav-desktop .sub-menu {
		top: calc(100% + 1px);
		left: 0;
		min-width: 220px;
		margin: 0;
		padding: 8px 0;
		list-style: none;
	}

	.nav-desktop .sub-menu.is-out-of-viewport { left: auto; right: 0; }

	.nav-desktop :is(.sub-menu, .mega-panel) .menu-item > a {
		display: block;
		padding: 12px 20px;
		color: inherit;
		font-size: var(--wp--preset--font-size--caption);
		font-weight: 400;
		white-space: nowrap;
		text-decoration: none;
		transition: background-color 0.15s, padding 0.15s;
	}

	.nav-desktop :is(.sub-menu, .mega-panel) .menu-item > a:is(:hover, :focus-visible) { background: var(--wp--preset--color--surface); }
	.nav-desktop :is(.sub-menu, .mega-panel) .menu-item > a:focus-visible { outline-offset: -2px; }

	/* Static item: the panel positions against .site-header, inset to the content width like the nav row. */
	.nav-desktop .menu-item.megamenu { position: static; }

	.nav-desktop .mega-panel {
		top: 100%;
		left: max(60px, calc((100% - var(--wp--style--global--wide-size)) / 2));
		right: max(60px, calc((100% - var(--wp--style--global--wide-size)) / 2));
	}

	.nav-desktop :is(.sub-menu, .mega-panel) .menu-item { display: list-item; }

	.nav-desktop .mega-panel .menu-item > a {
		padding: 8px 12px;
		white-space: normal;
	}

	.nav-desktop .menu-item:is(:hover, :focus-within, .hover-intent) > :is(.sub-menu, .mega-panel),
	.nav-desktop :is(.sub-menu, .mega-panel).toggled-on {
		opacity: 1;
		visibility: visible;
	}

	/* Esc: stays hidden while the pointer or focus is still inside the item. */
	.nav-desktop .menu-item.is-dismissed > :is(.sub-menu, .mega-panel) {
		opacity: 0;
		visibility: hidden;
		transition: none;
	}

	.nav-desktop .menu-item:is(:hover, :focus-within, .hover-intent):not(.is-dismissed) > .dropdown-toggle svg,
	.nav-desktop .dropdown-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

	@media (prefers-reduced-motion: no-preference) {
		.nav-desktop .dropdown-toggle svg { transition: transform 0.2s; }

		.nav-desktop :is(.sub-menu, .mega-panel) { transform: translateY(-8px); }

		.nav-desktop .menu-item:is(:hover, :focus-within, .hover-intent) > :is(.sub-menu, .mega-panel),
		.nav-desktop :is(.sub-menu, .mega-panel).toggled-on { transform: none; }

		.nav-desktop .menu-item.is-dismissed > :is(.sub-menu, .mega-panel) { transform: translateY(-8px); }

		/* Left and right padding trade 4 px so the row width, and the panel, stay put. */
		.nav-desktop .sub-menu .menu-item > a:is(:hover, :focus-visible) { padding-inline: 24px 16px; }
		.nav-desktop .mega-panel .menu-item > a:is(:hover, :focus-visible) { padding-inline: 16px 8px; }
	}

	.nav-drawer .dropdown-toggle.toggled-on svg {
		transform: rotate(180deg);
	}

	.nav-toggle {
		position: relative;
		z-index: calc(var(--z-drawer) + 1);
		display: grid;
		place-items: center;
		width: 60px;
		height: 44px;
		padding: 10px;
		background: var(--wp--preset--color--foreground);
		cursor: pointer;
	}

	.nav-toggle:focus-visible { outline-color: var(--wp--preset--color--foreground); }

	.hamburger,
	.hamburger::before,
	.hamburger::after {
		display: block;
		width: 32px;
		height: 2px;
		border-radius: 1px;
		background: var(--wp--preset--color--background);
		transition: transform 0.2s, background-color 0.2s;
	}

	.hamburger { position: relative; }

	.hamburger::before,
	.hamburger::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.hamburger::before { top: -9px; }
	.hamburger::after { top: 9px; }

	.js-nav-active .hamburger { background-color: transparent; }
	.js-nav-active .hamburger::before { top: 0; transform: rotate(-45deg); }
	.js-nav-active .hamburger::after { top: 0; transform: rotate(45deg); }

	body.js-nav-active { overflow: hidden; }

	.nav-backdrop,
	.nav-drawer {
		position: fixed;
		z-index: var(--z-drawer);
		visibility: hidden;
		transition: transform 0.3s var(--ease-drawer), opacity 0.3s var(--ease-drawer), visibility 0s 0.3s;
	}

	.nav-backdrop {
		inset: 0;
		background: rgb(0 0 0 / 0.5);
		opacity: 0;
	}

	.nav-drawer {
		top: var(--wp-admin--admin-bar--height, 0px);
		bottom: 0;
		left: 0;
		width: 300px;
		max-width: 100%;
		padding: 30px;
		overflow-y: auto;
		background: var(--wp--preset--color--background);
		transform: translate3d(-100%, 0, 0);
	}

	.js-nav-active :is(.nav-backdrop, .nav-drawer) {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition-delay: 0s;
	}

	.nav-drawer .menu-items {
		margin: 0;
		padding: 0 0 20px;
		list-style: none;
		border-bottom: 1px solid var(--wp--preset--color--border-subtle);
	}

	.nav-drawer .menu-item {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.nav-drawer .menu-item > :is(a, span) {
		flex: 1;
		padding: 10px;
		color: inherit;
		font-size: var(--wp--preset--font-size--body);
		font-weight: 400;
		text-decoration: none;
	}

	.nav-drawer .dropdown-toggle {
		display: grid;
		place-items: center;
		width: 36px;
		height: 31px;
		padding: 0;
		color: inherit;
		cursor: pointer;
	}

	.nav-drawer .dropdown-toggle svg {
		width: 10px;
		height: 10px;
		transition: transform 0.2s;
	}

	.nav-drawer .sub-menu {
		display: none;
		flex-basis: 100%;
		margin: 0;
		padding: 0 0 0 20px;
		list-style: none;
	}

	.nav-drawer .sub-menu.toggled-on { display: block; }
}

/* Header search: Super Speedy Search markup; the plugin stylesheet is dequeued, so this is all of its look. */
@layer components {
	.site-search :is(.super-speedy-search-form, form) { position: relative; width: 100%; }
	.site-search :is(.sss_maybe_close_button, .sssbuttonwrapper, .sssresetwrapper) { display: none !important; }

	.site-search .ssstext {
		position: relative;
		z-index: var(--z-search);
		width: 100%;
		height: 3rem;
		padding: 0 1.25rem 0 3.25rem;
		border: 1px solid var(--wp--preset--color--border-subtle);
		border-radius: 0;
		background: var(--wp--preset--color--background);
		font: inherit;
		font-size: var(--wp--preset--font-size--caption);
		color: var(--wp--preset--color--foreground);
	}
	.site-search .ssstext:focus-visible {
		outline: none;
		border-color: var(--wp--preset--color--accent);
		box-shadow: inset 0 0 0 1px var(--wp--preset--color--accent);
	}
	.site-search:focus-within .sssresults { border-color: var(--wp--preset--color--accent); }
	.site-search .ssstext::placeholder { color: var(--wp--preset--color--muted); opacity: 1; }
	.site-search__icon {
		position: absolute;
		top: 50%;
		left: 1.25rem;
		z-index: calc(var(--z-search) + 1);
		width: 1.125rem;
		height: 1.125rem;
		color: var(--wp--preset--color--muted);
		transform: translateY(-50%);
		pointer-events: none;
	}

	.site-search .sssresults {
		display: none;
		position: absolute;
		inset-inline: 0;
		top: 100%;
		z-index: var(--z-search);
		padding-block: 8px;
		border: 1px solid var(--wp--preset--color--border);
		border-top: 0;
		background: var(--wp--preset--color--background);
	}
	/* SSS shows the panel inline as soon as a request starts, and keeps it when the field is cleared. */
	.site-search .super-speedy-search-form:has(.ssstext:placeholder-shown) .sssresults,
	.site-search .sssresults:not(:has(li)) { display: none !important; }
	.site-search .sss_scroll_container { max-height: calc(100vh - 6rem); overflow-y: auto; }
	.site-search .sss_suggestions_container:not(:has(li)) { display: none !important; }
	.site-search :is(.sss-suggestions, .sss-taxonomies, .sss-taxonomy-combinations, .sss_items) { margin: 0; padding: 0; list-style: none; background: none; }
	.site-search .sss-combo-count { display: none; }

	.site-search .sss_list_header {
		padding: 12px 20px 6px;
		background: none;
		color: var(--wp--preset--color--muted);
		font-size: var(--wp--preset--font-size--micro);
		font-weight: 600;
		letter-spacing: 0.06em;
		text-transform: uppercase;
	}

	.site-search .sssresults li a {
		display: flex;
		align-items: center;
		gap: 14px;
		padding: 8px 20px;
		color: var(--wp--preset--color--foreground);
		font-size: var(--wp--preset--font-size--caption);
		line-height: 1.3;
		text-decoration: none;
		transition: background-color 0.15s, padding 0.15s;
	}
	.site-search .sssresults li a:is(:hover, :focus) { background: var(--wp--preset--color--surface); }
	.site-search .sssresults :is(li a, .sss_see_all a):focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: -2px; }
	.site-search .sss_suggestions_container a { padding-block: 10px; }
	.site-search .sss_suggestions_container strong { font-weight: inherit; }
	.site-search .sss_items .wp-post-image,
	.site-search .sss_items .sss-placeholder {
		flex: none;
		width: 48px;
		height: 48px;
		margin: 0;
		border: 1px solid var(--wp--preset--color--border-subtle);
		background: var(--wp--preset--color--background);
		object-fit: contain;
	}
	.site-search .sss_flash:empty { display: none; }
	.site-search .sss_content { min-width: 0; }
	.site-search .sss-title { font-weight: 500; }
	.site-search .sss_price { display: block; margin-top: 2px; font-weight: 700; }
	.site-search .sss_price del { margin-right: 0.5em; font-weight: 400; color: var(--wp--preset--color--muted); }
	.site-search .sss_price ins { text-decoration: none; }

	.site-search .bottom_see_all_wrapper { padding: 10px 20px 4px; }
	.site-search .sss_see_all { display: block; flex: 1 1 auto; }
	.site-search .sssresults .sss_see_all a {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 10px;
		height: 3rem;
		background: var(--wp--preset--color--surface);
		color: var(--wp--preset--color--foreground);
		font-size: var(--wp--preset--font-size--caption);
		font-weight: 600;
		text-decoration: none;
		transition: background-color 0.15s;
	}
	.site-search .sssresults .sss_see_all a:is(:hover, :focus) { background: var(--wp--preset--color--border-subtle); }
	.site-search .sss_see_all i { display: none; }
	.site-search .sss_see_all a::after {
		content: "";
		width: 24px;
		height: 12px;
		background: var(--wp--preset--color--accent);
		mask: url("../icons/arrow-right.svg") center / contain no-repeat;
		transition: transform 0.15s;
	}

	@media (prefers-reduced-motion: no-preference) {
		/* Left and right padding trade 4 px so the row width stays put, as in the nav dropdowns. */
		.site-search .sssresults li a:is(:hover, :focus-visible) { padding-inline: 24px 16px; }
		.site-search .sss_see_all a:is(:hover, :focus-visible)::after { transform: translateX(4px); }
	}
	.site-search__empty {
		position: absolute;
		inset-inline: 0;
		top: 100%;
		z-index: var(--z-search);
		margin: 0;
		padding: 15px 10px;
		border: 1px solid var(--wp--preset--color--border-subtle);
		border-top: 0;
		background: var(--wp--preset--color--background);
		font-size: var(--wp--preset--font-size--body);
	}

	@media (width < 81.3125rem) {
		.site-search .ssstext,
		.site-search:focus-within .ssstext { height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: var(--wp--preset--font-size--body); color: var(--wp--preset--color--foreground); }
		.site-search .ssstext::placeholder { color: var(--wp--preset--color--foreground); }
		.site-search .ssstext,
		.site-search:focus-within .ssstext { padding-left: 2rem; }
		.site-search .ssstext:focus-visible { box-shadow: inset 0 -2px 0 var(--wp--preset--color--accent); }
		.site-search__icon { left: var(--site-gutter); color: var(--wp--preset--color--foreground); }
		/* Anchor the panel to the full-width bar, not the field. */
		.site-search .super-speedy-search-form { position: static; }
		.site-search .sss_scroll_container { max-height: calc(100vh - 11rem); }
	}
}

.nomon-category__cookies > summary::after {
	width: 12px;
	height: 12px;
	border: 0;
	background: currentColor;
	mask: url("../icons/chevron.svg") center / contain no-repeat;
	transform: none;
}

.nomon-category__cookies[open] > summary::after {
	transform: rotate(180deg);
}

/* One arrow for every slider: blue tab flush to the slide edge. Swiper toggles the state classes. */
.nomon-slider-arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 35px;
	height: 75px;
	margin-top: -37.5px;
	padding: 0;
	border: 0;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--background);
	cursor: pointer;
	transition: background-color 0.15s;
}
.nomon-slider-arrow:hover { background: var(--wp--preset--color--accent-dark); }
.nomon-slider-arrow:focus-visible { outline: 2px solid var(--wp--preset--color--foreground); outline-offset: 2px; }
.nomon-slider-arrow svg { width: 20px; height: 20px; }
.nomon-slider-arrow--prev { left: 0; }
.nomon-slider-arrow--next { right: 0; }
.nomon-slider-arrow.swiper-button-disabled { background: color-mix(in srgb, var(--wp--preset--color--accent) 40%, transparent); pointer-events: none; }
.nomon-slider-arrow.swiper-button-lock { display: none; }

@media (width < 48rem) {
	.nomon-slider-arrow { width: 28px; height: 56px; margin-top: -28px; }
	.nomon-slider-arrow svg { width: 16px; height: 16px; }
}
