/* Migala — Advanced Search widget
 * search/filter chrome driving a hidden native Voxel search form.
 * Brand yellow (--mas-accent) is used sparingly: the search button + selection
 * accents only. Primary action buttons are dark for legibility. */

.mas-root {
	--mas-accent: #ffeb00;      /* migala yellow — used sparingly */
	--mas-on-accent: #1a1a1a;   /* text/icon that sits on the yellow */
	--mas-dark: #1a1a1a;        /* primary buttons + strong text */
	--mas-pill-bg: #ffffff;
	--mas-text: #222222;
	--mas-muted: #565656;       /* darkened for legible secondary text (AA on white) */
	--mas-placeholder: #6b6b6b; /* input placeholders — readable, still clearly a hint */
	--mas-border: #dddddd;
	--mas-line: #ebebeb;
	--mas-hover: #f7f7f7;
	--mas-pill-radius: 40px;
	--mas-max-width: 850px;
	--mas-pill-height: 46px;    /* shared collapsed-pill height, desktop + mobile — matches Airbnb's */
	--mas-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.10);
	--mas-shadow-lg: 0 6px 20px rgba(0,0,0,.12), 0 3px 8px rgba(0,0,0,.08);

	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	width: 100%;
	color: var(--mas-text);
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}

.mas-root * { box-sizing: border-box; }
.mas-root button { font-family: inherit; }

/* search bar row (pill + mobile filters button) */
.mas-searchbar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: var(--mas-max-width);
	position: relative;
	height: var(--mas-pill-height);   /* reserved so an expanding (absolute) pill never reflows this row */
}
/* Filters entry point at rest: always visible beside the pill now that the quick-chips
   row (.mas-filters-row) is hidden until the bar is open (see below). */
.mas-root .mas-filters-beside {
	display: inline-flex;
	height: var(--mas-filters-btn-height, var(--mas-pill-height));
	padding: 0 var(--mas-filters-btn-padding, 20px);
	font-size: 14px;
	border-radius: var(--mas-filters-btn-radius, 999px);
}

/* mobile-only back button (shown only when there is a previous search) */
.mas-back-btn {
	display: none;
	flex: 0 0 auto;
	align-items: center; justify-content: center;
	width: 44px; height: 44px; border-radius: 999px;
	border: 1px solid var(--mas-border); background: #fff; color: var(--mas-dark);
	cursor: pointer;
}
.mas-back-btn:hover { background: var(--mas-hover); }

/* keep the search bar above the backdrop ONLY for field dropdowns, so jumping
   field→field switches dropdowns. For the Filters modal the bar stays dimmed. */
.mas-root.mas-open-dropdown .mas-searchbar { z-index: 1001; }

/* expanded search bar (a field dropdown is open): dim the whole pill to gray and lift the
   active field to white so the focused field is unmistakable. */
.mas-root.mas-open-dropdown .mas-pill { background: var(--mas-line); border-color: var(--mas-line); }
.mas-root.mas-open-dropdown .mas-seg.active { background: #fff; box-shadow: var(--mas-shadow); }
.mas-root.mas-open-dropdown .mas-seg:not(.active) .mas-seg-label,
.mas-root.mas-open-dropdown .mas-seg:not(.active) .mas-seg-value { color: var(--mas-muted); }
.mas-root.mas-open-dropdown .mas-seg.mas-filled:not(.active) .mas-seg-value { color: var(--mas-dark); }
.mas-root.mas-open-dropdown .mas-seg:not(.active):hover { background: #e3e3e3; }
/* hide the dividers touching the active (white) field */
.mas-root.mas-open-dropdown .mas-pill-divider:has(+ .mas-seg.active) { background: transparent; }

/* lock background scroll while a popover/modal is open. Reserve the removed scrollbar's
   width as body padding (--mas-sbw, set by JS) so the page doesn't jump sideways. */
html.mas-scroll-lock, html.mas-scroll-lock body { overflow: hidden; }
html.mas-scroll-lock body { padding-right: var(--mas-sbw, 0px); }
/* hide Voxel's floating List/Map view toggle while our full-screen search overlay is open
   (it's a position:fixed button that would otherwise float on top of the panel) */
html.mas-scroll-lock .ts-switcher-btn { display: none !important; }

/* ----------------------------------------------------------------- top pill */

.mas-pill {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: var(--mas-max-width);
	background: var(--mas-pill-bg);
	border: 1px solid var(--mas-border);
	border-radius: var(--mas-pill-radius);
	box-shadow: var(--mas-shadow);
	padding: 3px;
	position: relative;
	z-index: 2;
}

.mas-seg {
	position: relative;
	flex: 1 1 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	text-align: left;
	background: transparent;
	border: 0;
	border-radius: 999px;
	padding: 9px 24px;
	cursor: pointer;
	min-width: 0;
	transition: background .15s ease, box-shadow .15s ease;
}
.mas-seg:hover { background: var(--mas-hover); }
.mas-seg.active { background: #fff; box-shadow: var(--mas-shadow); }
.mas-seg:focus-visible { outline: 2px solid var(--mas-dark); outline-offset: 2px; }

/* the label/value column inside the segment (sits left of the in-field clear button) */
.mas-seg-main {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1 1 auto;
	min-width: 0;
}

/* in-field clear (X): hidden until the segment holds a value */
.mas-seg-clear {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--mas-dark);
	cursor: pointer;
	transition: background .15s ease;
}
.mas-seg-clear:hover { background: rgba(0,0,0,.07); }
.mas-seg-clear svg { width: 14px; height: 14px; }
.mas-seg.mas-filled .mas-seg-clear { display: inline-flex; position: absolute; right: 10px; }

.mas-seg-label {
	font-size: 12px;
	font-weight: 700;
	color: var(--mas-dark);
	letter-spacing: .01em;
	line-height: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}
.mas-seg-value {
	font-size: 14px;
	color: var(--mas-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}
.mas-seg.mas-filled .mas-seg-value { color: var(--mas-dark); font-weight: 500; }

.mas-pill-divider {
	width: 1px;
	align-self: stretch;
	margin: 8px 0;
	background: var(--mas-border);
	flex: 0 0 auto;
}
.mas-seg:hover + .mas-pill-divider,
.mas-seg.active + .mas-pill-divider { background: transparent; }

.mas-search-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	min-width: 48px;
	padding: 0 20px;
	margin-left: 8px;
	border: 0;
	border-radius: 999px;
	background: var(--mas-accent);
	color: var(--mas-on-accent);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: filter .15s ease, transform .05s ease, padding .2s ease;
}
.mas-search-btn:hover { filter: brightness(.95); }
.mas-search-btn:active { transform: scale(.97); }
.mas-mobile-summary { display: none; }   /* desktop: use the segmented bar */

.mas-search-ico { display: inline-flex; }
.mas-search-text { display: none; }
.mas-root:not(.mas-collapsed) .mas-search-text { display: inline; }  /* show "Search" when expanded */

/* ---- collapsed (resting) pill: single-line segments (Airbnb-style — no caption
   label, just the value/placeholder), narrower width, icon-only search button ---- */
.mas-pill { transition: max-width .22s ease, padding .22s ease; }
.mas-root.mas-collapsed .mas-pill {
	max-width: 540px;
	cursor: pointer;
}
.mas-root.mas-collapsed .mas-seg { padding: 9px 18px; }
.mas-root.mas-collapsed .mas-seg-label { display: none; }
.mas-root.mas-collapsed .mas-seg-main { justify-content: center; }
.mas-root.mas-collapsed .mas-search-btn { width: 38px; min-width: 38px; height: 38px; padding: 0; }

/* ---- expanded pill: an absolutely-positioned overlay so growing into the taller,
   labeled two-line layout never reflows the header or the page beneath the widget —
   .mas-searchbar above reserves the collapsed pill's height regardless of this state. ---- */
.mas-root:not(.mas-collapsed) .mas-pill {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
}

/* ------------------------------------------------------------- filters row */

/* Hidden at rest (Airbnb's idle header carries no chip row) — only revealed while the
   Filters modal itself is open, so it never adds height to the idle pill and never
   collides with the per-field dropdown panel (which is gated on mas-open-dropdown,
   not mas-open-modal). The modal's own backdrop is already covering the page at that
   point, so this brief in-flow appearance under the header reads as part of "opening
   search", not as an unrelated content shift. */
.mas-filters-row {
	display: none;
	align-items: center;
	gap: 12px;
	width: 100%;
	max-width: var(--mas-max-width);
	min-width: 0;
}
.mas-root.mas-open-modal .mas-filters-row { display: flex; }
.mas-row-divider { width: 1px; height: 28px; background: var(--mas-border); flex: 0 0 auto; }

.mas-quick {
	display: flex;
	align-items: center;
	gap: 10px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	min-width: 0;
}
.mas-quick::-webkit-scrollbar { display: none; }

.mas-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	height: 32px;
	padding: 0 14px;
	background: var(--mas-pill-bg);
	border: 1px solid var(--mas-border);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 500;
	color: var(--mas-dark);
	cursor: pointer;
	white-space: nowrap;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.mas-chip:hover { border-color: #222; box-shadow: 0 2px 6px rgba(0,0,0,.10); }
.mas-chip-ico, .mas-chip-caret { display: inline-flex; color: var(--mas-muted); }
.mas-chip.mas-filled { border-color: var(--mas-dark); background: var(--mas-hover); }

.mas-chip-badge:empty { display: none; }
.mas-chip-badge {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
	background: var(--mas-dark); color: #fff; font-size: 11px; font-weight: 700;
}

/* Filters button — sized/colored from Elementor Style > Filters button controls
   (falls back to the shared chip look when unset). */
.mas-chip-filters {
	font-weight: 600;
	gap: var(--mas-filters-btn-gap, 8px);
	height: var(--mas-filters-btn-height, 32px);
	padding: 0 var(--mas-filters-btn-padding, 14px);
	background: var(--mas-filters-btn-bg, var(--mas-pill-bg));
	border-color: var(--mas-filters-btn-border, var(--mas-border));
	border-radius: var(--mas-filters-btn-radius, 999px);
	color: var(--mas-filters-btn-text, var(--mas-dark));
}
.mas-chip-filters .mas-chip-ico {
	color: var(--mas-filters-btn-text, var(--mas-muted));
	width: var(--mas-filters-btn-icon-size, 16px);
	height: var(--mas-filters-btn-icon-size, 16px);
}
.mas-chip-filters .mas-chip-ico svg,
.mas-chip-filters .mas-chip-ico i { width: 100%; height: 100%; font-size: var(--mas-filters-btn-icon-size, 16px); line-height: 1; }
.mas-chip-filters .mas-chip-badge { background: var(--mas-filters-btn-badge-bg, var(--mas-dark)); }
/* icon-only mode (no label): center the icon and drop the text gap */
.mas-chip-icon-only { gap: 0; }
.mas-chip-icon-only .mas-chip-txt { display: none; }

/* ------------------------------------------------------------ panel / modal */

.mas-backdrop {
	position: fixed; inset: 0;
	background: rgba(0,0,0,.4);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, visibility 0s linear .2s;
}
.mas-root.mas-open .mas-backdrop {
	opacity: 1;
	visibility: visible;
	transition: opacity .2s ease, visibility 0s linear 0s;
}

.mas-panel {
	display: none;
	position: absolute;
	top: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: 540px;
	background: #fff;
	border: 1px solid var(--mas-line);
	border-radius: 24px;
	box-shadow: var(--mas-shadow-lg);
	z-index: 1001;
	padding: 24px;
}
.mas-root.mas-open .mas-panel[aria-hidden="false"] { display: block; }

/* dropdown variant (the main 3 fields) — anchored under its segment by JS */
.mas-panel-dropdown {
	left: 0;            /* exact px set inline by JS */
	transform: none;
	width: 100%;
	max-width: 420px;
	display: none;
	flex-direction: column;
	max-height: min(68vh, 460px);
}
.mas-root.mas-open .mas-panel-dropdown[aria-hidden="false"] { display: flex; }
.mas-panel-dropdown .mas-panel-title,
.mas-panel-dropdown .mas-panel-footer { flex: 0 0 auto; }

/* scrollable region inside dropdown / step panel */
.mas-panel-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }

/* thin, minimalist scrollbars inside scrollable panels (replaces the chunky default) */
.mas-panel-scroll, .mas-modal-body {
	scrollbar-width: thin;                              /* Firefox */
	scrollbar-color: rgba(0,0,0,.22) transparent;
}
.mas-panel-scroll::-webkit-scrollbar,
.mas-modal-body::-webkit-scrollbar { width: 6px; height: 6px; }
.mas-panel-scroll::-webkit-scrollbar-track,
.mas-modal-body::-webkit-scrollbar-track { background: transparent; }
.mas-panel-scroll::-webkit-scrollbar-thumb,
.mas-modal-body::-webkit-scrollbar-thumb {
	background: rgba(0,0,0,.2); border-radius: 999px; border: 1px solid transparent; background-clip: padding-box;
}
.mas-panel-scroll:hover::-webkit-scrollbar-thumb,
.mas-modal-body:hover::-webkit-scrollbar-thumb { background: rgba(0,0,0,.32); background-clip: padding-box; }

.mas-root .mas-panel-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--mas-dark); }
.mas-panel-note { font-size: 14px; color: var(--mas-muted); padding: 8px 0 4px; }

.mas-panel-footer {
	display: flex; justify-content: space-between; align-items: center;
	margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--mas-line);
}

/* modal variant (Filters) */
.mas-panel-modal {
	position: fixed;                 /* centered in the viewport, scroll-independent */
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: calc(100% - 40px);
	max-width: 720px;
	max-height: min(86vh, 760px);
	padding: 0;
	overflow: hidden;
}
.mas-root.mas-open .mas-panel-modal[aria-hidden="false"] { display: flex; flex-direction: column; }

.mas-modal-head {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	padding: 18px 22px; border-bottom: 1px solid var(--mas-line); flex: 0 0 auto;
}
.mas-modal-title { font-size: 16px; font-weight: 700; }
.mas-modal-close {
	position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; border-radius: 999px; border: 1px solid transparent; background: transparent;
	cursor: pointer; color: var(--mas-dark);
}
.mas-modal-close:hover { background: var(--mas-hover); border-color: var(--mas-border); }

.mas-modal-body { overflow-y: auto; padding: 6px 24px; flex: 1 1 auto; }
.mas-modal-foot {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px 24px; border-top: 1px solid var(--mas-line); flex: 0 0 auto;
}

/* --------------------------------------------------------- accordion (modal) */

.mas-acc { border-bottom: 1px solid var(--mas-line); }
.mas-acc:last-child { border-bottom: 0; }
.mas-acc-head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	width: 100%; padding: 20px 2px; background: transparent; border: 0; cursor: pointer; text-align: left;
}
.mas-acc-label { font-size: 16px; font-weight: 600; color: var(--mas-dark); }
.mas-acc-caret { display: inline-flex; color: var(--mas-muted); transition: transform .2s ease; }
.mas-acc.open .mas-acc-caret { transform: rotate(180deg); }
.mas-acc-body { display: none; padding: 0 2px 22px; }
.mas-acc.open .mas-acc-body { display: block; }

/* ------------------------------------------------------- hierarchical terms */

.mas-term-tree { display: flex; flex-direction: column; }
.mas-term-node { display: flex; flex-direction: column; }
.mas-term-line {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	border-radius: 10px;
}
.mas-term-line:hover { background: var(--mas-hover); }

.mas-term {
	display: flex; align-items: center;
	flex: 1 1 auto; padding: 11px 10px; cursor: pointer; font-size: 15px; color: var(--mas-dark); min-width: 0;
}
.mas-term-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mas-term input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--mas-dark); cursor: pointer; margin-right: 12px; }
/* icon size and icon→label spacing are controllable via the widget Style controls */
.mas-term-icon {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--mas-dark);
	width: var(--mas-term-icon-size, 22px); height: var(--mas-term-icon-size, 22px);
	margin-right: var(--mas-term-icon-gap, 10px);
}
.mas-term-icon svg, .mas-term-icon img { width: 100%; height: 100%; object-fit: contain; }

/* parent indicator: number of checked children */
.mas-term-count {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
	background: var(--mas-dark); color: #fff; font-size: 11px; font-weight: 700;
}

.mas-term-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; margin-right: 4px; flex: 0 0 auto;
	border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--mas-dark);
	transition: transform .2s ease, background .15s ease;
}
.mas-term-toggle:hover { background: rgba(0,0,0,.06); }
.mas-term-toggle.open { transform: rotate(180deg); }

.mas-term-children { display: none; margin-left: 16px; padding-left: 12px; border-left: 1px solid var(--mas-line); }
.mas-term-children.open { display: block; }

/* highlight the matched substring while filtering */
.mas-term-name strong { font-weight: 700; color: var(--mas-dark); }

/* search-within-options box (sticky at the top of the term list) */
.mas-terms { display: flex; flex-direction: column; }
.mas-term-search {
	position: sticky; top: 0; z-index: 1;
	display: flex; align-items: center; gap: 10px;
	margin-bottom: 8px; padding: 2px 0 10px;
	background: #fff; border-bottom: 1px solid var(--mas-line);
}
.mas-term-search-ico { display: inline-flex; flex: 0 0 auto; color: var(--mas-muted); margin-left: 6px; }
.mas-term-search-ico svg { width: 18px; height: 18px; }
.mas-root input.mas-term-search-input {
	flex: 1 1 auto; height: 44px; padding: 0 6px;
	border: 0 !important; border-radius: 0; box-shadow: none !important; background: transparent;
}
.mas-root input.mas-term-search-input:focus { outline: none; box-shadow: none !important; }

/* ------------------------------------------------------------- other inputs */

.mas-range { display: flex; gap: 14px; }
.mas-range-field { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--mas-muted); }
.mas-range-affix { font-weight: 600; }

/* explicit color + specificity guard against the theme's global input styles
   (which otherwise wash the typed text out to a near-invisible light gray) */
.mas-root input.mas-input {
	width: 100%; height: 46px; padding: 0 14px;
	border: 1px solid var(--mas-border); border-radius: 10px;
	font-size: 14px; color: var(--mas-text) !important; background: #fff;
	caret-color: var(--mas-dark);   /* visible blinking cursor (was washed out) */
}
.mas-root input.mas-input::placeholder { color: var(--mas-placeholder); opacity: 1; }
.mas-input-lg { height: 54px; font-size: 16px; border-radius: 12px; }
.mas-root input.mas-input:focus { outline: none; border-color: var(--mas-dark); box-shadow: 0 0 0 3px rgba(0,0,0,.10); }

.mas-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; padding: 6px 0; }
.mas-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mas-switch-track { position: relative; width: 46px; height: 28px; border-radius: 999px; background: #ccc; transition: background .15s ease; flex: 0 0 auto; }
.mas-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s ease; }
.mas-switch input:checked + .mas-switch-track { background: var(--mas-dark); }
.mas-switch input:checked + .mas-switch-track::after { transform: translateX(18px); }
.mas-switch-label { font-size: 15px; color: var(--mas-dark); }

/* location field + proximity */
.mas-loc { position: relative; display: flex; flex-direction: column; gap: 16px; }

/* location input with a "use my location" button on the right */
.mas-loc-field { position: relative; }
.mas-root .mas-loc-field input.mas-input { padding-right: 54px; }
.mas-loc-geo {
	position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; flex: 0 0 auto;
	border: 1px solid var(--mas-border); border-radius: 999px; background: #fff;
	color: var(--mas-dark); cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}
.mas-loc-geo:hover { background: var(--mas-hover); border-color: #222; }
.mas-loc-geo svg { width: 18px; height: 18px; }
.mas-loc-geo-loading { opacity: .55; pointer-events: none; }
.mas-prox { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.mas-prox-slider-row { display: flex; align-items: center; gap: 14px; }

/* value badge */
.mas-prox-val {
	flex: 0 0 auto; min-width: 62px;
	text-align: center;
	font-size: 13px; font-weight: 600; color: var(--mas-dark);
	background: var(--mas-hover); border: 1px solid var(--mas-border);
	border-radius: 8px; padding: 4px 10px; line-height: 1.4;
}

/* modern range slider — Preline-style */
.mas-prox-slider {
	-webkit-appearance: none;
	appearance: none;
	flex: 1 1 auto;
	width: 100%;
	height: 22px;       /* match thumb height — avoids margin-top centering hacks */
	outline: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	background-color: transparent;
	/* draw only a 6px-tall strip as the track, centered vertically */
	background-image: linear-gradient(
		to right,
		var(--mas-dark) var(--mas-slider-pct, 0%),
		var(--mas-line) var(--mas-slider-pct, 0%)
	);
	background-size: 100% 6px;
	background-position: center;
	background-repeat: no-repeat;
}

/* WebKit thumb — no margin-top needed with the height/background-size approach */
.mas-prox-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--mas-dark);
	box-shadow: 0 1px 4px rgba(0,0,0,.18);
	cursor: pointer;
	transition: box-shadow .15s ease, transform .1s ease;
}
.mas-prox-slider::-webkit-slider-thumb:hover {
	box-shadow: 0 0 0 6px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.18);
	transform: scale(1.08);
}
.mas-prox-slider::-webkit-slider-thumb:active { transform: scale(1.14); }

/* Firefox track + fill */
.mas-prox-slider::-moz-range-track {
	height: 6px; border-radius: 999px; background: var(--mas-line); border: 0;
}
.mas-prox-slider::-moz-range-progress {
	height: 6px; border-radius: 999px; background: var(--mas-dark);
}
.mas-prox-slider::-moz-range-thumb {
	width: 22px; height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--mas-dark);
	box-shadow: 0 1px 4px rgba(0,0,0,.18);
	cursor: pointer;
}

/* Voxel's geocoder suggestion dropdown must sit above our popover/modal */
.ts-autocomplete-dropdown,
.pac-container { z-index: 100002 !important; }

/* ----------------------------------------------------------------- buttons */

/* !important guards the colors against the theme's global button styles
   (otherwise the bg can be overridden, leaving white text on a light button). */
.mas-btn-dark {
	height: 48px; padding: 0 24px; border: 0; border-radius: 10px;
	background: var(--mas-dark) !important; color: #fff !important;
	font-size: 15px; font-weight: 600; cursor: pointer; transition: filter .15s ease;
}
.mas-btn-dark:hover { filter: brightness(1.4); }
.mas-btn-ghost {
	height: 48px; padding: 0 6px; border: 0; background: transparent !important;
	font-size: 15px; font-weight: 600; text-decoration: underline; color: var(--mas-dark) !important; cursor: pointer;
}

/* --------------------------------------------------- hide bound native form */
.elementor-widget.mas-hidden-search-form,
.mas-hidden-search-form .ts-search-widget {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap; pointer-events: none;
}

/* ----------------------------------------------------------------- mobile */

@media (max-width: 768px) {
	.mas-root { gap: 12px; }

	/* Filters button sits to the RIGHT of the search pill (mobile) */
	.mas-searchbar { justify-content: flex-start; gap: 10px; }
	.mas-searchbar .mas-pill { flex: 1 1 auto; min-width: 0; }  /* allow shrink so the summary truncates */
	.mas-root.mas-collapsed .mas-pill { max-width: none; }

	.mas-pill { border-radius: 999px; padding: 3px 3px 3px 16px; }
	/* collapse the 3 segments into a single one-line summary (matches the new desktop
	   collapsed pill: --mas-pill-height is shared by both, so heights stay equal) */
	.mas-seg, .mas-pill-divider { display: none; }
	/* keep a visible circular Search button on the pill so users know they can search
	   directly (tapping the summary still opens the step flow) */
	.mas-root .mas-pill .mas-search-btn {
		display: inline-flex; width: 38px; height: 38px; min-width: 38px; padding: 0; margin-left: 8px;
	}
	.mas-root .mas-pill .mas-search-text { display: none; }   /* icon-only on mobile */
	.mas-mobile-summary {
		display: flex; flex-direction: row; align-items: baseline; gap: 6px;
		flex: 1 1 auto; min-width: 0; text-align: left;
		background: transparent; border: 0; cursor: pointer; padding: 0px 10px;
	}
	.mas-ms-title { flex: 0 0 auto; font-size: 14px; line-height: 1; font-weight: 700; color: var(--mas-dark); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.mas-ms-sub { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1; font-weight: 400; color: var(--mas-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.mas-ms-sub:empty { display: none; }
	.mas-ms-sub:not(:empty)::before { content: "\00b7"; margin-right: 6px; }

	/* circular Filters button beside the pill (always visible at rest, same as desktop) */
	.mas-root .mas-filters-beside {
		width: var(--mas-filters-btn-height, var(--mas-pill-height)); height: var(--mas-filters-btn-height, var(--mas-pill-height)); padding: 0; justify-content: center;
		flex: 0 0 auto; position: relative; border-color: var(--mas-filters-btn-border, var(--mas-dark));
	}
	.mas-filters-beside .mas-chip-txt { display: none; }
	.mas-filters-beside .mas-chip-badge { position: absolute; top: -4px; right: -4px; }
	.mas-root .mas-filters-row .mas-filters-desktop { display: none; }
	.mas-filters-row { gap: 10px; }
	.mas-row-divider { display: none; }

	/* full-screen panel + modal, with internal scroll */
	.mas-panel,
	.mas-panel-modal,
	.mas-panel-dropdown {
		position: fixed; inset: 0; max-width: none; max-height: 100dvh; height: 100dvh;
		transform: none; left: 0 !important; top: 0 !important; border: 0; border-radius: 0;
	}
	.mas-root.mas-open .mas-panel[aria-hidden="false"],
	.mas-root.mas-open .mas-panel-dropdown[aria-hidden="false"],
	.mas-root.mas-open .mas-panel-modal[aria-hidden="false"] { display: flex; flex-direction: column; }
	.mas-panel-footer, .mas-modal-foot { margin-top: auto; }

	/* mobile back button: visible only when a previous search exists */
	.mas-root.mas-can-back .mas-back-btn { display: inline-flex; }

	/* mobile step flow: close header (top-right) + stacked field cards */
	.mas-panel { padding: 14px 16px; }
	.mas-panel-head { position: relative; min-height: 44px; flex: 0 0 auto; }
	.mas-panel-head .mas-modal-close { left: auto; right: 4px; }
	.mas-mstep {
		display: block; width: 100%; text-align: left;
		background: #fff; border: 1px solid var(--mas-border); border-radius: 16px;
		padding: 18px 16px; margin-bottom: 12px; cursor: pointer; box-shadow: var(--mas-shadow);
	}
	.mas-mstep.collapsed { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
	.mas-mstep.open { cursor: default; }
	.mas-mstep-title { font-size: 20px; font-weight: 700; color: var(--mas-dark); margin-bottom: 14px; }
	.mas-mstep-label { font-size: 14px; font-weight: 600; color: var(--mas-muted); }
	.mas-mstep-val { font-size: 14px; font-weight: 600; color: var(--mas-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
