/* One opt-in core Search style. Native forms and PQF keep owning all behavior. */
:where(.wp-block-search.is-style-site-search, .wp-block-plainplugins-taxonomy-filter) {
	--fp-search-height: 44px;
	--fp-search-radius: 7px;
	--fp-search-border: color-mix(in srgb, var(--wp--preset--color--custom-contrast) 18%, transparent);
	--fp-search-surface: var(--wp--preset--color--custom-base-2);
	--fp-search-ink: var(--wp--preset--color--custom-contrast);
	--fp-search-muted: var(--wp--preset--color--custom-contrast-2);
	--fp-search-accent: var(--wp--preset--color--custom-accent);
	--fp-search-focus: var(--wp--preset--color--custom-accent);
	/* The native core Search glyph, also used on its icon submit button. */
	--fp-search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z'/%3E%3C/svg%3E");
}
.wp-block-search.is-style-site-search { min-inline-size: 0; color: var(--fp-search-ink); font-size: 14px; line-height: 1.4; }
.is-style-site-search .wp-block-search__inside-wrapper {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 8px;
	min-inline-size: 0;
	min-block-size: var(--fp-search-height);
	padding: 4px 5px 4px 12px;
	border: 1px solid var(--fp-search-border);
	border-radius: var(--fp-search-radius);
	background: var(--fp-search-surface);
	color: var(--fp-search-ink);
}
.is-style-site-search .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--fp-search-focus);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--custom-accent) 18%, transparent);
}
.is-style-site-search .wp-block-search__input {
	box-sizing: border-box;
	flex: 1;
	min-inline-size: 0;
	inline-size: 100%;
	min-block-size: 34px;
	padding: 4px 0;
	border: 0;
	border-radius: 0;
	outline: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	box-shadow: none;
}
.is-style-site-search .wp-block-search__input::placeholder { color: var(--fp-search-muted); opacity: 1; }
.is-style-site-search .wp-block-search__label:not(.screen-reader-text) {
	display: block;
	margin-block-end: 8px;
	color: var(--fp-search-muted);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
}
.is-style-site-search .wp-block-search__button {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	min-inline-size: 70px;
	min-block-size: 34px;
	padding: 0 13px;
	margin: 0;
	border: 0;
	background: var(--fp-search-accent);
	color: var(--wp--preset--color--custom-base-2);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}
.is-style-site-search .wp-block-search__button:hover { background: color-mix(in srgb, var(--wp--preset--color--custom-accent) 85%, var(--wp--preset--color--custom-base-inverted)); }
.is-style-site-search .wp-block-search__button:focus-visible { outline: 2px solid var(--fp-search-focus); outline-offset: 2px; }
/* Global forms keep core's text submit; this leading glyph is decorative. */
.is-style-site-search:not(.pqf-query-search):not(.wp-block-search__icon-button) .wp-block-search__inside-wrapper::before {
	content: "";
	flex: none;
	inline-size: 18px;
	block-size: 18px;
	background-color: var(--fp-search-muted);
	mask: var(--fp-search-icon) center / contain no-repeat;
}
/* Preserve the accessible native icon submit as the leading, quiet control.
 * It remains useful with JavaScript disabled; PQF enhances typing by itself. */
.is-style-site-search.pqf-query-search .wp-block-search__inside-wrapper { flex-direction: row-reverse; gap: 8px; padding-inline: 8px 12px; }
.is-style-site-search.pqf-query-search .wp-block-search__button,
.is-style-site-search.wp-block-search__icon-button .wp-block-search__button {
	min-inline-size: 24px;
	inline-size: 24px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--fp-search-muted);
	box-shadow: none;
}
.is-style-site-search.pqf-query-search .wp-block-search__button::before {
	content: "";
	inline-size: 18px;
	block-size: 18px;
	background-color: currentcolor;
	mask: var(--fp-search-icon) center / contain no-repeat;
}
.is-style-site-search.pqf-query-search .wp-block-search__button svg { display: none; }
.is-style-site-search .wp-block-search__input::-webkit-search-cancel-button,
.wp-block-plainplugins-taxonomy-filter__search-input::-webkit-search-cancel-button {
	appearance: none;
	inline-size: 14px;
	block-size: 14px;
	margin-inline-start: 8px;
	background-color: var(--fp-search-muted);
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 5 10 10M15 5 5 15' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	cursor: pointer;
}
/* Native Navigation owns the mobile overlay, focus management and dismissal. */
.wp-block-search.fp-header-search { inline-size: 300px; max-inline-size: 100%; flex: 0 1 300px; }
.fp-header-search .wp-block-search__inside-wrapper { inline-size: 100%; }
.fp-header-search.wp-block-search__icon-button .wp-block-search__inside-wrapper { flex-direction: row-reverse; padding-inline: 8px 12px; }
.fp-header-search.wp-block-search__icon-button .wp-block-search__button svg { inline-size: 18px; block-size: 18px; }
.wp-block-navigation__responsive-container.is-menu-open .fp-header-search { inline-size: 100%; flex-basis: auto; font-size: 16px; }
/* An ordinary core Button anchor with an opt-in native style, shared by the editor. */
.wp-block-button.is-style-header-account { --fp-button-lift: 0px; font-size: inherit; }
.is-style-header-account .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-block-size: 44px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 1.5;
	text-decoration: none;
	box-shadow: none;
	translate: none;
	scale: none;
}
.is-style-header-account .wp-block-button__link::before {
	content: "";
	flex: none;
	inline-size: 18px;
	block-size: 18px;
	background: currentcolor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7.5' r='3.5' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M4.5 21v-2a7.5 7.5 0 0 1 15 0v2' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.is-style-header-account .wp-block-button__link:hover { background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 6px; box-shadow: none; }
.is-style-header-account .wp-block-button__link:focus-visible { outline: 2px solid var(--wp--preset--color--custom-accent); outline-offset: 4px; }
/* Core supplies overlay behavior. Open it before the full header would wrap;
 * Navigation blocks configured without an overlay keep their native setting. */
@media (width <= 1023px) {
	header .wp-block-navigation:has(.wp-block-navigation__responsive-container-open) .wp-block-navigation__responsive-container-open { display: flex; }
	header .wp-block-navigation:has(.wp-block-navigation__responsive-container-open) .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
}
/* The existing option finder shares the field; it keeps its own local search. */
.wp-block-plainplugins-taxonomy-filter__search { position: relative; display: grid; align-items: center; }
.wp-block-plainplugins-taxonomy-filter__search::before {
	content: "";
	grid-area: 1 / 1;
	position: relative;
	z-index: 1;
	margin-inline-start: 12px;
	inline-size: 18px;
	block-size: 18px;
	background-color: var(--fp-search-muted);
	mask: var(--fp-search-icon) center / contain no-repeat;
	pointer-events: none;
}
.wp-block-plainplugins-taxonomy-filter .wp-block-plainplugins-taxonomy-filter__search-input {
	grid-area: 1 / 1;
	--pqf-control-font-size: 14px;
	box-sizing: border-box;
	inline-size: 100%;
	min-inline-size: 0;
	min-block-size: var(--fp-search-height);
	border: 1px solid var(--fp-search-border);
	border-radius: var(--fp-search-radius);
	padding: 8px 12px 8px 38px;
	background: var(--fp-search-surface);
	color: var(--fp-search-ink);
	font: 400 14px/1.4 var(--wp--preset--font-family--inter, sans-serif);
	box-shadow: none;
}
.wp-block-plainplugins-taxonomy-filter__search-input::placeholder { color: var(--fp-search-muted); opacity: 1; }
.wp-block-plainplugins-taxonomy-filter .wp-block-plainplugins-taxonomy-filter__search-input:focus {
	outline: 0;
	border-color: var(--fp-search-focus);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--custom-accent) 18%, transparent);
}
@media (width <= 781px) {
	.wp-block-search.is-style-site-search { font-size: 16px; }
	.is-style-site-search .wp-block-search__button { font-size: 12px; }
	.wp-block-plainplugins-taxonomy-filter .wp-block-plainplugins-taxonomy-filter__search-input { --pqf-control-font-size: 16px; font-size: 16px; }
}
