/* FiboSearch in the shop header (shop.php), from theme.json: palette, type, the theme's button.
   .ub-search--wide: a field with a "Caută" button from 782 px; .ub-search--icon: an icon below, with
   FiboSearch's own full-screen overlay. */

.ub-search--wide { flex: 1 1 auto; min-inline-size: 0; max-inline-size: 36rem; margin-inline: auto; }
.ub-search--icon { flex: none; }
@media (max-width: 781px) { .ub-search--wide { display: none; } }
@media (min-width: 782px) { .ub-search--icon { display: none; } }

.ub-search .dgwt-wcas-search-wrapp { inline-size: 100%; max-inline-size: none; min-inline-size: 0; margin: 0; }
.ub-search .dgwt-wcas-search-form { margin: 0; }
.ub-search--wide .dgwt-wcas-sf-wrapp {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 4px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--form--radius, 10px);
	background: var(--wp--preset--color--surface);
}
/* One focus ring at a time (grun-ro H108, 2026-10-30: the field's ring inside the box's looked "double
   highlighted"). While the field has focus the box is the ring (its border and 2 px around it, 3 px like
   kit.css's), and the field's own goes; "Caută" keeps its ring, drawn inside it. */
.ub-search--wide .dgwt-wcas-sf-wrapp:has(input:focus) {
	border-color: var(--ub-focus, var(--wp--preset--color--primary));
	box-shadow: 0 0 0 2px var(--ub-focus, var(--wp--preset--color--primary));
	background: var(--wp--preset--color--base);
}
.ub-search--wide .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus-visible { outline: none !important; }
.ub-search--wide .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:focus-visible { outline-color: var(--wp--preset--color--on-primary) !important; outline-offset: -5px !important; }
.ub-search--wide .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
	flex: 1 1 auto;
	inline-size: auto;
	min-inline-size: 0;
	block-size: 2.75rem;
	padding: 0 0.75rem;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--wp--preset--color--ink);
	font-family: inherit;
	font-size: 1rem;
	line-height: 2.75rem;
}
.ub-search--wide .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder { color: var(--wp--preset--color--muted); font-style: normal; opacity: 1; }
.ub-search--wide .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
	position: static;
	flex: none;
	inline-size: auto;
	min-inline-size: 0;
	block-size: 2.75rem;
	min-block-size: 2.75rem;
	margin: 0;
	padding: 0 1.25rem;
	border: 0;
	border-radius: calc(var(--wp--custom--form--radius, 10px) - 2px);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 2.75rem;
	text-shadow: none;
	text-transform: none;
	opacity: 1;
}
.ub-search--wide .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover { background: color-mix(in srgb, var(--wp--preset--color--primary) 80%, #000); }
.ub-search--wide .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit::before,
.ub-search--wide .dgwt-wcas-ico-magnifier { display: none; }
.ub-search--wide .dgwt-wcas-preloader { inset-inline-end: 6.25rem; }

/* The phone icon: a 44 px target in the header's ink. FiboSearch fades the icon's form in with its
   script; here the form only ever opens in its overlay, so it needn't wait (readable without JS). */
.ub-search.ub-search--icon .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-search-form { opacity: 1; } /* beats html:not(…) in FiboSearch's CSS */
.ub-search--icon .dgwt-wcas-search-icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 2.75rem; block-size: 2.75rem; }
.ub-search--icon .dgwt-wcas-search-icon svg path { fill: var(--wp--preset--color--ink); }

/* Suggestions (under either field; FiboSearch appends them to the page body) */
.dgwt-wcas-suggestions-wrapp {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: 0 0 12px 12px;
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--lifted);
	font-family: inherit;
}
.dgwt-wcas-suggestion { padding: 0.625rem 0.875rem; border-bottom-color: var(--wp--preset--color--line); color: var(--wp--preset--color--ink); font-size: 0.9375rem; }
.dgwt-wcas-suggestion-selected { background-color: var(--wp--preset--color--surface); box-shadow: inset 3px 0 0 var(--wp--preset--color--primary); }
.dgwt-wcas-st { color: var(--wp--preset--color--ink); line-height: 1.3; }
.dgwt-wcas-st strong { color: var(--wp--preset--color--primary); font-weight: 700; }
.dgwt-wcas-si img { border-color: var(--wp--preset--color--line); border-radius: 6px; background: var(--wp--preset--color--surface); }
.dgwt-wcas-sp { color: var(--wp--preset--color--ink); font-weight: 700; white-space: nowrap; }
.dgwt-wcas-suggestion-more, .dgwt-wcas-suggestion-more .dgwt-wcas-st-more { justify-content: center; color: var(--wp--preset--color--primary); font-weight: 600; }
.dgwt-wcas-suggestion-nores { color: var(--wp--preset--color--muted); }
