/*
 * 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. Reference: docs/styling.md → Toivonkuulo tokens. */
:root {
	--site-gutter: 60px;
	--prose-cap: 780px;

	/* Stacking scale. Plugin layers outside it: Crisp 900 (inc/integrations/crisp.php), cookie button 1000, admin bar 99999, skip link and PhotoSwipe 100000, cookie banner 2147483647. */
	--z-dropdown: 50;
	--z-sticky: 55;
	--z-search: 60;
	--z-drawer: 1010;
	--z-cart: 1020;
	--z-modal: 1100;
}

/* nomon-wc-checkout documents: at 390 and 1024 the bottom-left cookie button covers the terms checkbox and "Lähetä tilaus" (#7 step 5, #31). */
.nwc-checkout-body :is(.crisp-client, .nomon-floating-btn) { display: none !important; }

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

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

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

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

/* Unlayered on purpose: wrapping this ties with preflight's `body { line-height: inherit }`. */
body {
	font-family: var(--wp--preset--font-family--roboto);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 400;
	line-height: 1.7;
	color: var(--wp--preset--color--foreground);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	hyphens: manual;
}

/* 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-family: var(--wp--preset--font-family--poppins);
		font-weight: 600;
		line-height: 1.4;
		margin-block: 50px 30px;
	}

	body h1 { font-size: var(--wp--preset--font-size--title-xl); }
	body h2 { font-size: var(--wp--preset--font-size--title-l); }
	body h3 { font-size: var(--wp--preset--font-size--title-s); }
	body :is(h4, h5, h6) { font-size: var(--wp--preset--font-size--title-xs); }

	body p { margin-block: 30px; }
	body figure { margin-block: 50px 0; }

	/* Stacked headings: any heading directly following another collapses its top margin. */
	body :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) { margin-top: 0; }

	:is(.site-content, .wp-block-group, .is-root-container) > :is(p, ul, ol) :is(strong, b) { font-weight: 600; }
	:is(.site-content, .wp-block-group, .is-root-container) > :is(p, ul, ol, .wp-block-table) a {
		color: var(--wp--preset--color--foreground);
		font-weight: 400;
		text-decoration: underline;
	}

	/* Restores the bullets/numbers Tailwind preflight zeroes: core/list, and class-less lists in classic content. */
	:is(.wp-block-list, :is(.site-content, .wp-block-group, .is-root-container) > :is(ul, ol):not([class]), .tk-accordion__panel :is(ul, ol):not([class])) {
		margin-block: 30px;
		padding-inline-start: 1em;
		list-style: outside disc;
	}
	:is(.wp-block-list, :is(.site-content, .wp-block-group, .is-root-container) > :is(ul, ol):not([class]), .tk-accordion__panel :is(ul, ol):not([class])):where(ol) { list-style-type: decimal; }
	:is(.wp-block-list, :is(.site-content, .wp-block-group, .is-root-container) > :is(ul, ol):not([class]), .tk-accordion__panel :is(ul, ol):not([class])) li { margin-top: 10px; }
	:is(.wp-block-list, :is(.site-content, .wp-block-group, .is-root-container) > :is(ul, ol):not([class]), .tk-accordion__panel :is(ul, ol):not([class])) :where(li > :is(ul, ol)) { margin-block: 0; padding-inline-start: 1em; list-style: outside disc; }
	:is(.wp-block-list, :is(.site-content, .wp-block-group, .is-root-container) > :is(ul, ol):not([class]), .tk-accordion__panel :is(ul, ol):not([class])) :where(li > ol) { list-style-type: decimal; }

	/* First/last reset: heading at top of a section, paragraph at end, don't push the container. */
	body :is(h1, h2, h3, h4, h5, h6, p, figure):first-child { margin-top: 0; }
	body :is(p, ul, ol):last-child { margin-bottom: 0; }

	:is(.site-header, .site-footer) a:is(:hover, :focus-visible) { text-decoration: underline; }

	/* Two-tone so the ring shows on white, on `accent-light` and on the hero gradient. */
	:focus-visible {
		outline: 2px solid var(--wp--preset--color--accent);
		outline-offset: 2px;
		box-shadow: 0 0 0 2px var(--wp--preset--color--background);
	}

	.site-content > :first-child { margin-top: var(--wp--preset--spacing--section); }
	.site-content > :last-child { margin-bottom: var(--wp--preset--spacing--section); }
	/* Keeps that margin inside <main>, so it adds to the footer's own 75 px instead of collapsing (legacy: 150). */
	.site-content { display: flow-root; }

	/* Section rhythm: only top-level sections, never root atoms (`p + p` in posts). Each
	 * composite block issue adds its `nomon-<name>` root class to BOTH lists. */
	:is(.site-content, .is-root-container) > :is(.wp-block-group, .wp-block-block, .nomon-locations, .nomon-services, .nomon-pricelist, .nomon-contact-people, .nomon-hero-slider, .nomon-newsletter, .nomon-image-card, .nomon-brands, .nomon-social-wall, .nomon-highlights, .nomon-cta, .nomon-link-boxes, .nomon-image-banner, .nomon-news, .nomon-articles, .nomon-products) + :is(.wp-block-group, .wp-block-block, .nomon-locations, .nomon-services, .nomon-pricelist, .nomon-contact-people, .nomon-hero-slider, .nomon-newsletter, .nomon-image-card, .nomon-brands, .nomon-social-wall, .nomon-highlights, .nomon-cta, .nomon-link-boxes, .nomon-image-banner, .nomon-news, .nomon-articles, .nomon-products) {
		margin-top: var(--wp--preset--spacing--section-gap);
	}
}

/* Editor only: the Classic block and the synced-pattern editor get the front end's column and text. */
:root .is-root-container > [data-type="core/freeform"] {
	max-width: var(--prose-cap);
	margin-inline: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) auto !important;
}
.block-library-rich-text__tinymce > :is(p, ul, ol) {
	margin-block: 30px;
}
.post-type-wp_block .is-root-container {
	max-width: var(--wp--style--global--content-size);
	margin-inline: auto;
	padding-inline: var(--wp--style--root--padding-left);
}

/* Content column: every atom is capped and starts at the left edge of the 1320 container (the `max()` covers root atoms
 * in posts, whose parent is wider than the container); composite `nomon/*` blocks are not capped.
 * `: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, .nomon-buttons, .wp-block-shortcode) {
	max-width: var(--prose-cap);
	margin-inline: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) auto !important;
}

@layer base {
	/* Chevron box is 18px so the glyph is 9px high; the negative margin gives the gap back. */
	.site-breadcrumbs__item + .site-breadcrumbs__item::before {
		content: "";
		width: 18px;
		height: 18px;
		margin-inline: -6px;
		background-color: currentColor;
		mask: url("../icons/chevron.svg") center / contain no-repeat;
		rotate: -90deg;
	}

	/* A bare URL as link text is wider than a phone. */
	.site-content { overflow-wrap: break-word; }

	/* Wraps `paginate_links()` output: post archives and the product archive. */
	.nomon-pagination { margin-top: var(--wp--preset--spacing--stack); text-align: center; }
	.nomon-pagination .page-numbers {
		display: inline-block;
		min-width: 3.3em;
		padding: 10px;
	}
	@media (max-width: 478px) { .nomon-pagination .page-numbers { min-width: 44px; } }
	.nomon-pagination .page-numbers.current { font-weight: 600; }
	.nomon-pagination a.page-numbers:is(:hover, :focus-visible) { text-decoration: underline; }
}

/* Unlayered and `body`-prefixed: these replace core's unlayered block styles. */
body .wp-block-table { margin-block: 0; }
/* Phones scroll the table inside its figure rather than breaking words in equal-width columns. */
@media (max-width: 767.98px) {
	body .wp-block-table table.has-fixed-layout { table-layout: auto; min-width: 560px; }
	body .wp-block-table .has-fixed-layout :is(td, th) { word-break: normal; }
}
body .wp-block-table thead { border-bottom: 3px solid var(--wp--preset--color--accent); }
body .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background-color: var(--wp--preset--color--accent-light); }
body :is(.wp-block-table, .wp-block-image, .wp-caption) :is(figcaption, .wp-caption-text) {
	margin-block: 10px 0;
	font-size: 1rem;
	text-align: left;
}

/* Classic-editor posts have pasted wrappers at root; legacy capped every child of the post body. */
:root .single-post .site-content > :is(div, section, pre, header:not(.page-hero)):not(.wp-block-group, [class*="nomon-"]) {
	max-width: var(--prose-cap);
	margin-inline: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) auto !important;
	white-space: normal;
}

/* 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);
}

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

	/* Gutenberg can't hide these toolbar buttons, so cancel the effect instead. */
	:is(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;
	}
	/* Buttons: the same, by owner's decision (2026-11-26). The pill classes are what every theme button shares. */
	a:is(.rounded-full.border-2, .button, .wp-element-button, .nomon-social-wall__link):is(.is-external-link, .is-new-window)::after {
		content: none;
	}
}

/* Light-violet call-to-action box, shared by `nomon/cta` and `nomon/newsletter`. */
.nomon-cta-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 150px 60px;
	border-radius: 15px;
	background-color: var(--wp--preset--color--accent-light);
	text-align: center;
}
.nomon-cta-box__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--title-l);
}
.nomon-cta-box__text {
	margin: 15px 0 0;
	color: var(--wp--preset--color--accent);
}
.nomon-cta-box__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px 15px;
	margin-top: 40px;
}
@media (max-width: 767.98px) {
	.nomon-cta-box { padding: 75px 25px; }
}

/* MailerPress opt-in form (`template-parts/newsletter-form.php`), in the footer and in
 * `nomon/newsletter`. Width and alignment belong to the caller's wrapper, not to these rules. */
.mailerpress_shortcode-optin-form__field label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.mailerpress_shortcode-optin-form__field input {
	display: block;
	width: 100%;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 5px;
	background-color: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
	font-size: 1rem;
}
.mailerpress_shortcode-optin-form__field input::placeholder {
	color: var(--wp--preset--color--accent);
	opacity: 1;
}
.mailerpress_shortcode-optin-form__submit { margin-top: 20px; }
.mailerpress_shortcode-optin-form__button {
	padding: 8px 25px;
	border: 2px solid var(--wp--preset--color--accent);
	border-radius: 999px;
	background-color: var(--wp--preset--color--background);
	color: var(--wp--preset--color--accent);
	font-size: 1rem;
	line-height: 1.7;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: color 0.15s, background-color 0.15s;
}
.mailerpress_shortcode-optin-form__button:is(:hover, :focus-visible) {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--background);
}
.mailerpress-notice,
.nomon-newsletter-note {
	margin: 15px 0 0;
	font-size: 1rem;
}
.mailerpress-notice.error { color: var(--wp--preset--color--danger-dark); }
.nomon-newsletter-note { margin-top: 0; color: var(--wp--preset--color--muted); }

/* 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; }
/* Post carousels (nomon/news, nomon/articles): slides peek past the container; the section clips. */
.nomon-carousel.swiper { overflow: visible; }
.nomon-carousel .swiper-slide { width: calc((100% - 50px) / 3); }
@media (max-width: 767px) { .nomon-carousel .swiper-slide { width: 90%; } }

/* 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]) {
	display: contents;
}

/* Editor-only: an InnerBlocks parent emptied of its children stays selectable. */
[data-type="nomon/image-card"]:not(:has(.wp-block)) {
	min-height: 4rem;
}

/* Editor-only: the block wrapper, not the link, is the flex child of `nomon/buttons`. */
[data-type="nomon/button"] {
	display: grid;
}
.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, var(--site-gutter));
}

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

.edit-post-visual-editor__post-title-wrapper .editor-post-title::before {
	content: "Sivun otsikko";
	display: block;
	color: #666;
	font-size: 0.875rem;
	font-weight: 500;
	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;
}

:root {
	/* Must stay numeric: JS reads it via getComputedStyle for matchMedia. */
	--breakpoint-nav: 1099px;
	/* Sticky header height + 20px; the header rules below set the heights. */
	--scroll-offset: 139px;
	--ease-drawer: cubic-bezier(0.77, 0, 0.175, 1);

	--hamburger-color: var(--wp--preset--color--accent);
	--hamburger-color-active: var(--wp--preset--color--accent);
	--hamburger-width: 2rem;
	--hamburger-layer-height: 3px;

	/* Desktop dropdowns */
	--color-main-level: var(--wp--preset--color--accent);
	--typography-size-main-level: 1rem;
	--typography-weight-main-level: 400;
	--padding-main-level-vertical: 10px;
	--gap-main-level-horizontal: 45px;
	--gap-between-dropdown-toggle: 5px;
	--dropdown-toggle-size: 22px;

	--color-sub-menu: var(--wp--preset--color--accent);
	--color-background-sub-menu: var(--wp--preset--color--background);
	--color-background-hover-sub-menu: var(--wp--preset--color--accent-light);
	--color-separator-sub-menu: var(--wp--preset--color--surface);
	--typography-size-sub-menu: 1rem;
	--typography-weight-sub-menu: 400;
	--height-sub-menu-link: 60px;
	--padding-sub-menu-link-horizontal: 20px;
	--min-width-sub-menu: 245px;

	/* Mobile drawer */
	--width-navigation: 100%;
	--color-background-menu-items: var(--wp--preset--color--background);
	--color-separator-nav-mobile: var(--wp--preset--color--border-subtle);
	--color-main-level-menu-item-mobile: var(--wp--preset--color--accent);
	--typography-size-main-level-mobile: 1rem;
	--typography-weight-main-level-mobile: 400;
	--padding-menu-item-mobile: 10px;
	--indent-sub-menu-mobile: 15px;
}

@media (min-width: 768px) {
	:root { --width-navigation: 420px; }
	.site-header:has(.site-header__top) { --topbar-h: 36px; }
}

@media (min-width: 1100px) {
	:root { --scroll-offset: 155px; }
}

/* The top bar scrolls away; the rows below it stay. */
.site-header {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--topbar-h, 0px));
	z-index: var(--z-sticky);
	background-color: var(--wp--preset--color--background);
}
/* Core's admin bar is not fixed at this width. */
@media (max-width: 600px) {
	.site-header { top: 0; }
}
/* The drawer lives inside the header's stacking context. */
body.js-nav-active .site-header { z-index: var(--z-drawer); }

.site-header__grid {
	display: grid;
	grid-template: "logo actions" auto "search search" auto / 1fr auto;
	align-items: center;
	row-gap: 15px;
	padding-block: 5px 6px;
}
.site-header__logo { grid-area: logo; justify-self: start; }
/* Hides the glyph only; the screen-reader text from main.js stays. */
.site-header a:is(.is-external-link, .is-new-window)::after { content: none; }
.site-header__actions {
	grid-area: actions;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 5px;
	/* Room for the burger (62px), which is positioned from the nav below. */
	margin-right: 67px;
}
.site-header__booking { display: none; }
@media (min-width: 600px) {
	.site-header__actions { gap: 15px; margin-right: 77px; }
	.site-header__booking { display: inline-flex; }
}

.nomon-search { grid-area: search; position: relative; min-width: 0; }
.nomon-search :is(.sss_maybe_close_button, .sssresetwrapper) { display: none; }
.nomon-search .ssswrapper {
	display: flex;
	align-items: center;
	height: 47px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 5px;
	background-color: var(--wp--preset--color--background);
}
.nomon-search .ssswrapper:has(.ssstext:focus-visible) {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}
.nomon-search .sssinputwrapper { flex: 1 1 auto; min-width: 0; }
.nomon-search .ssstext {
	width: 100%;
	height: 45px;
	padding: 0 0 0 16px;
	border: 0;
	background: transparent;
	font-size: 1rem;
	color: var(--wp--preset--color--foreground);
}
.nomon-search .ssstext:focus-visible { outline: none; box-shadow: none; }
.nomon-search .ssstext::placeholder { color: var(--wp--preset--color--muted); opacity: 1; }
.nomon-search .sss_search_button {
	display: grid;
	place-items: center;
	width: 48px;
	height: 35px;
	color: var(--wp--preset--color--accent);
	cursor: pointer;
}
/* Stands in for the plugin's icon font, which goes with its stylesheet. */
.nomon-search :is(.sss_search_button, .sss_see_all) i {
	display: block;
	width: 22px;
	height: 22px;
	background-color: currentColor;
	mask: url("../icons/search.svg") center / contain no-repeat;
}

.nomon-search :is(.sssresults, .nomon-search__empty) {
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	right: 0;
	z-index: var(--z-search);
	margin: 0;
	border-radius: 8px;
	background-color: var(--wp--preset--color--background);
	box-shadow: 0 2px 4px -1px rgb(0 0 0 / 0.2), 0 4px 5px 0 rgb(0 0 0 / 0.14), 0 1px 10px 0 rgb(0 0 0 / 0.12);
	font-size: 1rem;
	line-height: 1.4;
}
.nomon-search .sssresults { display: none; overflow: hidden; }
.nomon-search__empty { padding: 16px; }
/* The plugin shows the panel as soon as a request starts and keeps it when the field is cleared. */
.nomon-search .super-speedy-search-form:has(.ssstext:placeholder-shown) .sssresults,
.nomon-search .sssresults:not(:has(li)),
.nomon-search .sss_suggestions_container:not(:has(li)) { display: none !important; }
.nomon-search .sss_scroll_container {
	max-height: min(550px, calc(100dvh - 200px));
	padding-block: 5px 8px;
	overflow-y: auto;
}
.nomon-search .sssresults ul { margin: 0; padding: 0; list-style: none; }
.nomon-search :is(.sss_list_header, .noHover a) {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px 4px;
	font-weight: 600;
}
.nomon-search .sss_suggestions_container:not(:has(.sss-suggestions li)) .sss_list_header,
.nomon-search .sss-excerpt { display: none; }
.nomon-search .sssresults a {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 4px 16px;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
}
.nomon-search .sssresults li:not(.noHover) a:is(:hover, :focus-visible) { background-color: var(--wp--preset--color--surface); }
.nomon-search .sssresults a:focus-visible { outline-offset: -2px; }
.nomon-search .sss_suggestions_container strong { font-weight: inherit; }
.nomon-search .sss-combo-count,
.nomon-search .sss_flash:empty { display: none; }
.nomon-search .sss_items .wp-post-image {
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 4px;
	object-fit: cover;
}
.nomon-search .sss_content { min-width: 0; }
.nomon-search .sss-title { display: block; }
.nomon-search .sss_rating_price_wrapper {
	display: block;
	font-size: 0.75rem;
	color: var(--wp--preset--color--muted);
}
.nomon-search .sss_see_all a { gap: 5px; padding: 0; font-weight: 600; }
.nomon-search .sss_see_all i { width: 14px; height: 14px; }

.hamburger {
	display: block;
	width: var(--hamburger-width);
	height: var(--hamburger-layer-height);
	background-color: var(--hamburger-color);
	position: relative;
	transition: all 0.2s ease 0s;
	flex-shrink: 0;
}
.hamburger::before,
.hamburger::after {
	content: "";
	display: block;
	width: var(--hamburger-width);
	height: var(--hamburger-layer-height);
	background-color: var(--hamburger-color);
	position: absolute;
	transition: all 0.2s ease 0s;
}
.hamburger::before { top: -0.5625rem; }
.hamburger::after  { bottom: -0.5625rem; }

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

.nav-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 46px;
	position: absolute;
	top: calc(var(--topbar-h, 0px) + 5px);
	right: var(--site-gutter);
	z-index: calc(var(--z-drawer) + 1);
	border: 1px solid var(--wp--preset--color--border-subtle);
	border-radius: 5px;
	background-color: var(--wp--preset--color--background);
	cursor: pointer;
}

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

@media (max-width: 1099.98px) {
	/* Zero-height here: only the absolutely positioned burger and the fixed drawer show. */
	.nav-primary::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: calc(var(--z-drawer) - 1);
		background-color: rgb(0 0 0 / 0.45);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s, visibility 0.3s;
	}
	.js-nav-active .nav-primary::before { opacity: 1; visibility: visible; }

	.nav-primary .menu-items-wrapper {
		position: fixed;
		top: 0;
		left: 0;
		width: var(--width-navigation);
		height: 100dvh;
		padding: 61px 20px 20px;
		background-color: var(--color-background-menu-items);
		transform: translate3d(-100%, 0, 0);
		transition: transform 0.3s var(--ease-drawer), visibility 0.3s;
		visibility: hidden;
		overflow-y: auto;
		z-index: var(--z-drawer);
	}
	.js-nav-active .nav-primary .menu-items-wrapper {
		visibility: visible;
		transform: translate3d(0, 0, 0);
	}

	.nav-primary :is(.menu-items, .sub-menu) { margin: 0; padding: 0; list-style: none; }
	.nav-primary :is(.menu-items, .nav-primary__booking) {
		padding-top: 15px;
		border-top: 1px solid var(--color-separator-nav-mobile);
	}
	.nav-primary__booking { margin-top: 15px; }
	.nav-primary .menu-item { position: relative; }
	.nav-primary .menu-item > a {
		display: block;
		padding: var(--padding-menu-item-mobile);
		color: var(--color-main-level-menu-item-mobile);
		font-size: var(--typography-size-main-level-mobile);
		font-weight: var(--typography-weight-main-level-mobile);
		line-height: 1.7;
	}
	.nav-primary .menu-item-has-children > a { padding-right: 54px; }

	.nav-primary .sub-menu { display: none; padding-left: var(--indent-sub-menu-mobile); }
	.nav-primary .sub-menu.toggled-on { display: block; }

	.nav-primary .dropdown-toggle {
		position: absolute;
		top: 1.5px;
		right: 0;
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		color: var(--color-main-level-menu-item-mobile);
		cursor: pointer;
	}
	.nav-primary .dropdown-toggle svg {
		width: var(--dropdown-toggle-size);
		height: var(--dropdown-toggle-size);
		transition: transform 200ms;
		pointer-events: none;
	}
	.nav-primary .dropdown-toggle.toggled-on svg { transform: rotate(180deg); }
}

@media (prefers-reduced-motion: reduce) {
	.nav-primary::before,
	.nav-primary .menu-items-wrapper,
	.hamburger,
	.hamburger::before,
	.hamburger::after { transition: none; }
}

@media (min-width: 1100px) {
	.nav-toggle,
	.nav-primary__booking { display: none; }

	.site-header__grid {
		grid-template: "logo search actions" auto / minmax(0, 1fr) minmax(0, 3fr) minmax(max-content, 2fr);
		column-gap: 50px;
		min-height: 77px;
		padding-block: 10px;
	}
	.site-header__actions { margin-right: 0; }

	.nav-primary {
		padding-block: 5px;
		border-top: 1px solid var(--wp--preset--color--border-subtle);
		box-shadow: 0 5px 10px 0 rgb(0 0 0 / 0.08);
	}

	.nav-primary .menu-items {
		display: flex;
		column-gap: var(--gap-main-level-horizontal);
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.nav-primary .menu-item {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.nav-primary .menu-item > a {
		color: var(--color-main-level);
		font-size: var(--typography-size-main-level);
		font-weight: var(--typography-weight-main-level);
		line-height: 1.7;
		padding-block: var(--padding-main-level-vertical);
		white-space: nowrap;
	}

	/* Decorative on desktop: clicks fall through, the sub-menu opens on hover and focus. */
	.nav-primary .dropdown-toggle {
		display: inline-flex;
		/* The 24-unit icon carries 5px of empty space on each side at this size. */
		margin-inline: var(--gap-between-dropdown-toggle) -5px;
		color: var(--color-main-level);
		pointer-events: none;
	}
	.nav-primary .dropdown-toggle svg {
		width: var(--dropdown-toggle-size);
		height: var(--dropdown-toggle-size);
	}

	/* `display: none`, not `visibility`: a hidden box would still add scroll width. */
	.nav-primary .sub-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		width: max-content;
		min-width: var(--min-width-sub-menu);
		margin: 0;
		padding: 0;
		list-style: none;
		background-color: var(--color-background-sub-menu);
		box-shadow: 0 0 10px 5px rgb(0 0 0 / 0.05);
		z-index: var(--z-dropdown);
	}
	.nav-primary .sub-menu .sub-menu { top: 0; left: 100%; }
	.nav-primary .sub-menu.is-out-of-viewport { left: auto; right: 0; }
	.nav-primary .sub-menu .sub-menu.is-out-of-viewport { left: auto; right: 100%; }

	/* :hover for mouse, :focus-within for keyboard, .hover-intent (JS) for the close delay and taps. */
	.nav-primary .menu-item-has-children:is(:hover, :focus-within, .hover-intent) > .sub-menu { display: block; }

	.nav-primary .sub-menu .menu-item { border-bottom: 1px solid var(--color-separator-sub-menu); }
	.nav-primary .sub-menu .menu-item:is(:hover, :focus-within) { background-color: var(--color-background-hover-sub-menu); }
	.nav-primary .sub-menu .menu-item:is(:hover, :focus-within) > a { text-decoration: underline; }
	.nav-primary .sub-menu .menu-item > a {
		flex: 1 1 auto;
		color: var(--color-sub-menu);
		font-size: var(--typography-size-sub-menu);
		font-weight: var(--typography-weight-sub-menu);
		line-height: var(--height-sub-menu-link);
		padding-block: 0;
		padding-inline: var(--padding-sub-menu-link-horizontal);
	}
	.nav-primary .sub-menu .dropdown-toggle {
		margin-inline: 28px calc(var(--padding-sub-menu-link-horizontal) - 5px);
		color: var(--color-sub-menu);
	}
}
