/**
 * Header search: a small persistent icon stays put in the header row
 * (it never moves or disappears) and toggles a full-width dropdown
 * overlay panel — icon + input + clear + "Search" + a standalone close
 * button, plus a row of quick category chips beneath it.
 *
 * Behaviour (open/close, clear, category data) lives in
 * inc/search-collapse.php + assets/js/search-collapse.js — this file is
 * presentation only.
 *
 * @package dello
 */

/* Fixed-size anchor: never changes the header row's layout, whether the
   overlay is open or closed. */
.rt-header .rt-search-box2.cat-search-box {
	width: 22px !important;
	height: 22px !important;
}

/* Persistent icon — always visible, toggles the overlay. Positioned
   exactly like the old inline expanding icon used to be. */
.mm-search-toggle {
	position: absolute !important;
	top: 50% !important;
	right: 0 !important;
	transform: translateY(-50%) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 22px !important;
	height: 22px !important;
	border: 0 !important;
	padding: 0 !important;
	background: none !important;
	color: #272727 !important;
	cursor: pointer;
}
.mm-search-toggle svg {
	width: 20px !important;
	height: 20px !important;
	stroke-width: 1.6 !important;
}

/* The real search form + its overlay chrome. Always fixed/positioned so
   opening it is a smooth fade + slide, not a hard display:none snap; the
   `visibility` transition is delayed so it only flips to `hidden` (and
   drops out of hit-testing/tab order) after the fade-out finishes. */
.mm-search-panel {
	display: block !important;
	position: fixed !important;
	left: 0 !important;
	right: 0 !important;
	margin: 0 !important;
	background: #fff;
	box-shadow: 0 16px 32px rgba(20, 20, 20, 0.12);
	z-index: 999999;
	padding: 20px max(32px, calc((100vw - 1280px) / 2 + 32px)) 24px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-10px);
	transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.rt-search-box2.cat-search-box.search-open .mm-search-panel {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
	transition: opacity .22s ease, transform .22s ease, visibility 0s linear 0s;
}

.mm-search-panel__bar {
	display: flex !important;
	align-items: center !important;
	gap: 14px;
}
/* header-icons-fix.css pins .container/.search-area-grid/#search-box1 to a
   22px anchor box via `.rt-header .rt-search-box2.cat-search-box …` (4+
   classes, some with an #id). Every override below repeats that same
   ancestor prefix so it wins on specificity, not load order. */
.rt-header .rt-search-box2.cat-search-box .mm-search-panel .container {
	width: 100% !important;
	max-width: 100% !important;
	flex: 1 1 auto;
	padding: 0 !important;
	margin: 0 !important;
}
.rt-header .rt-search-box2.cat-search-box .mm-search-panel .search-area-grid {
	width: 100% !important;
	height: auto !important;
	background: transparent !important;
}
.rt-header .rt-search-box2.cat-search-box .mm-search-panel #search-box1,
.rt-header .rt-search-box2.cat-search-box .mm-search-panel #search-boxone {
	width: 100% !important;
	height: auto !important;
	padding: 0 !important;
}
.rt-header .rt-search-box2.cat-search-box .mm-search-panel .search-form {
	position: static !important;
	display: flex !important;
	align-items: center !important;
	width: 100% !important;
	height: 52px !important;
	background: #f3f3f3;
	border: 1px solid #e5e5e5;
	border-radius: 999px;
	padding: 0 8px 0 20px !important;
	gap: 10px;
}
.rt-header .rt-search-box2.cat-search-box .mm-search-panel .search-button2 {
	order: 1;
	position: static !important;
	transform: none !important;
	flex: 0 0 auto;
	width: 20px !important;
	height: 20px !important;
	border-radius: 0 !important;
	color: #6b6b6b;
	background: transparent;
}
.rt-header .rt-search-box2.cat-search-box .mm-search-panel .search-button2 svg {
	width: 20px !important;
	height: 20px !important;
}
.rt-header .rt-search-box2.cat-search-box .mm-search-panel input[type="text"] {
	order: 2;
	position: static !important;
	transform: none !important;
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0 !important;
	height: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	background: transparent !important;
	opacity: 1 !important;
	pointer-events: auto !important;
	font-family: inherit;
	font-size: 15px;
	color: #272727;
}

.mm-search-clear {
	order: 3;
	display: none;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border: 0;
	padding: 0;
	background: transparent;
	color: #9a9a9a;
	cursor: pointer;
}
.mm-search-clear.is-visible {
	display: flex;
}
.mm-search-clear svg {
	width: 16px;
	height: 16px;
}
.mm-search-clear:hover {
	color: #272727;
}

.mm-search-submit {
	order: 5;
	flex: 0 0 auto;
	align-self: stretch;
	margin: 6px 0 6px 6px;
	padding: 0 28px;
	border: 0;
	border-radius: 999px;
	background: #e04f16;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.3px;
	color: #fff;
	cursor: pointer;
}
.mm-search-submit:hover {
	background: #c8420f;
}

.mm-search-close {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 999px;
	background: #e04f16;
	cursor: pointer;
}
/* Force a white icon inside the orange close button — the page's
   Elementor CSS sets a blanket `.rt-search-box2 svg { color: #272727 }`
   that otherwise wins over inheritance from this button. */
.mm-search-close,
.mm-search-close svg {
	color: #fff !important;
}
.mm-search-close svg {
	width: 20px !important;
	height: 20px !important;
	stroke: #fff !important;
}
.mm-search-close:hover {
	background: #c8420f;
}

.mm-search-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}
.mm-search-chip {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid #e5e5e5;
	background: #fff;
	color: #272727;
	font-size: 14px;
	text-decoration: none;
	white-space: nowrap;
}
.mm-search-chip:hover {
	border-color: #e04f16;
	color: #e04f16;
}

@media (max-width: 560px) {
	.rt-search-box2.cat-search-box.search-open .mm-search-panel {
		padding-left: 20px;
		padding-right: 20px;
	}
	.mm-search-submit {
		display: none;
	}
}
