/*
 * Search Card widget (widgets/class-search-card.php).
 * A card with tabs; each tab holds a Listeo search form (full width or boxed)
 * whose fields are laid out as a grid. Everything is scoped to .listeo-search-card.
 */

.listeo-search-card {
	--lsc-accent: var(--listeo-primary-color, #f30c0c);
	--lsc-cols: 4;
	--lsc-gap: 12px;
	--lsc-row-gap: 20px;
	/* Fields as in the theme's boxed search form: 54px, 1px #e2e2e2, 5px radius, gray text. */
	--lsc-field-height: 54px;
	--lsc-field-radius: 5px;
	--lsc-field-border: #e2e2e2;
	--lsc-field-bg: #fff;
	--lsc-field-color: #808080;
	--lsc-muted: #808080;
	--lsc-tab-color: #888;
	--lsc-tab-gap: 28px;
	--lsc-icon-size: 18px;
	position: relative;
	z-index: 20;
	box-sizing: border-box;
	width: 100%;
	max-width: 1180px;
	margin-inline: auto;
	padding: 35px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
	color: var(--lsc-field-color);
	text-align: start;
}

.listeo-search-card *,
.listeo-search-card *::before,
.listeo-search-card *::after {
	box-sizing: border-box;
}

/* Header */
.listeo-search-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: var(--lsc-row-gap);
}

.listeo-search-card .listeo-search-card__title {
	margin: 0;
	padding: 0;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
	color: #1b1b1b;
}

/* Tabs: text with an underline under the active one (as the theme's search tabs). */
.listeo-search-card__tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--lsc-tab-gap);
	margin: 0 0 var(--lsc-row-gap);
	padding: 0;
	border-bottom: 1px solid #eee;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.listeo-search-card__tabs::-webkit-scrollbar {
	display: none;
}

.listeo-search-card .listeo-search-card__tab {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: auto;
	margin: 0;
	padding: 0 0 14px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--lsc-tab-color);
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition: color 0.2s ease;
}

.listeo-search-card .listeo-search-card__tab::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: transparent;
	transition: background-color 0.2s ease;
}

.listeo-search-card .listeo-search-card__tab:hover {
	background: transparent;
	color: #333;
}

.listeo-search-card .listeo-search-card__tab.is-active,
.listeo-search-card .listeo-search-card__tab[aria-selected="true"] {
	color: #333;
	background: var(--lsc-tab-active-bg, transparent);
}

.listeo-search-card .listeo-search-card__tab.is-active::after,
.listeo-search-card .listeo-search-card__tab[aria-selected="true"]::after {
	background: var(--lsc-accent);
}

.listeo-search-card .listeo-search-card__tab:focus {
	outline: none;
}

.listeo-search-card .listeo-search-card__tab:focus-visible {
	outline: 2px solid var(--lsc-accent);
	outline-offset: 2px;
}

.listeo-search-card__tab-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: var(--lsc-icon-size);
	height: var(--lsc-icon-size);
	font-size: var(--lsc-icon-size);
	line-height: 1;
	color: var(--lsc-muted);
}

.listeo-search-card__tab.is-active .listeo-search-card__tab-icon {
	color: var(--lsc-accent);
}

.listeo-search-card__tab-icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.listeo-search-card__tab-icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Editor notices (empty card, missing search form) */
.listeo-search-card-notice {
	padding: 14px 16px;
	border: 1px dashed #d0d0d0;
	border-radius: 8px;
	background: #fafafa;
	color: #666;
	font-size: 14px;
}

/* No "Save search" in the card (the theme does not show it on the front page either). */
.listeo-search-card .listeo-save-search-wrapper {
	display: none;
}

/* Panels */
.listeo-search-card__panel[hidden] {
	display: none !important;
}

.listeo-search-card .listeo-search-card-form {
	position: relative;
	margin: 0;
	padding: 0;
}

/* Fields grid: .main-search-input (full width forms) or the form itself (boxed forms). */
.listeo-search-card .listeo-search-card-form .main-search-input,
.listeo-search-card form.listeo-search-card-form--boxed {
	display: grid;
	grid-template-columns: repeat(var(--lsc-cols), minmax(0, 1fr));
	gap: var(--lsc-gap);
	/* start: a tall cell (inline slider) does not stretch the others, whose icons sit at 50%. */
	align-items: start;
	width: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	top: auto;
}

.listeo-search-card .listeo-search-card-form .main-search-input-item,
.listeo-search-card .listeo-search-card-form .main-search-input .main-search-input-item:nth-last-child(2),
.listeo-search-card .listeo-search-card-form .main-search-input-item:last-of-type {
	flex: none;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	position: relative;
}

.listeo-search-card .listeo-search-card-form .main-search-input-item > div,
.listeo-search-card .listeo-search-card-form .main-search-input-item .listeo-segmented-wrap {
	padding: 0;
	margin: 0;
}

/* Rows that are not fields: panels of boxed forms, "more options". */
.listeo-search-card .listeo-search-card-form--boxed > .row,
.listeo-search-card .listeo-search-card-form .more-search-options,
.listeo-search-card .listeo-search-card-form .more-search-options-trigger,
.listeo-search-card .listeo-search-card-form .custom-search-fields-container {
	grid-column: 1 / -1;
	margin: 0;
}

.listeo-search-card .listeo-search-card-form--boxed > .row .panel-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Selects (bootstrap-select) */
.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group {
	width: 100% !important;
	margin: 0;
}

.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle {
	display: flex;
	align-items: center;
	width: 100%;
	height: var(--lsc-field-height);
	padding: 0 40px 0 16px;
	padding-inline: 16px 40px;
	border: 1px solid var(--lsc-field-border);
	border-radius: var(--lsc-field-radius);
	background: var(--lsc-field-bg);
	color: var(--lsc-field-color);
	font-size: 16px;
	font-weight: 500;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle:hover {
	border-color: #d0d0d0;
}

.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group.open > .dropdown-toggle,
.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle:focus-visible {
	border-color: #d0d0d0;
	box-shadow: none;
	outline: none;
}

.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle .filter-option {
	position: static;
	top: auto;
	left: auto;
	float: none;
	min-width: 0;
	height: auto;
	padding: 0;
	width: 100%;
	text-align: start;
	line-height: 1.3;
}

.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle .filter-option-inner,
.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle .filter-option-inner-inner {
	height: auto;
	line-height: 1.3;
}

.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle.bs-placeholder .filter-option {
	color: var(--lsc-muted);
}

.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group.disabled > .dropdown-toggle,
.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle.disabled,
.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group.disabled > .dropdown-toggle:hover,
.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle.disabled:hover {
	background: #f7f7f7;
	border-color: #e4e4e4;
	color: #999;
	opacity: 1;
	cursor: not-allowed;
	box-shadow: none;
}

.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group.disabled > .dropdown-toggle .filter-option,
.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle.disabled .filter-option {
	color: #999;
}

.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group.disabled > .dropdown-toggle .caret,
.listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle.disabled .caret {
	opacity: 0.45;
}

/* Open list: as in the theme's search forms, it overlaps the field by 4px (no gap). */
.listeo-search-card .listeo-search-card-form .bootstrap-select div.dropdown-menu {
	top: calc(100% - 4px);
	margin: 0;
	border: 1px solid #dbdbdb;
	border-radius: var(--lsc-field-radius);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Text fields: keyword, location */
.listeo-search-card .listeo-search-card-form .main-search-input input[type="text"],
.listeo-search-card .listeo-search-card-form .main-search-input input[type="text"]:focus,
.listeo-search-card .listeo-search-card-form--boxed input[type="text"],
.listeo-search-card .listeo-search-card-form--boxed input[type="text"]:focus {
	width: 100%;
	height: var(--lsc-field-height);
	line-height: normal;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--lsc-field-border);
	border-radius: var(--lsc-field-radius);
	background: var(--lsc-field-bg);
	color: var(--lsc-field-color);
	font-size: 16px !important;
	font-weight: 500 !important;
	box-shadow: none;
}

.listeo-search-card .listeo-search-card-form input[type="text"]:focus {
	border-color: #d0d0d0;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

.listeo-search-card .listeo-search-card-form .main-search-input-item.location input[type="text"] {
	padding-inline-end: 44px;
}

.listeo-search-card .listeo-search-card-form .main-search-input-item.location > div > a,
.listeo-search-card .listeo-search-card-form .main-search-input-item.location a {
	right: auto;
	inset-inline-end: 6px;
	background: transparent;
	z-index: 102;
}

/* Panel dropdowns (price slider, checkboxes) and drilldown menus look like a select. */
.listeo-search-card .listeo-search-card-form .panel-dropdown {
	display: block;
	width: 100%;
	margin: 0;
}

.listeo-search-card .listeo-search-card-form .panel-dropdown > a,
.listeo-search-card .listeo-search-card-form .drilldown-menu .menu-toggle {
	display: flex;
	align-items: center;
	width: 100%;
	height: var(--lsc-field-height);
	margin: 0;
	padding: 0 40px 0 16px;
	padding-inline: 16px 40px;
	border: 1px solid var(--lsc-field-border);
	border-radius: var(--lsc-field-radius);
	background: var(--lsc-field-bg);
	color: var(--lsc-field-color);
	font-size: 15px;
	font-weight: 500;
	box-shadow: none;
}

.listeo-search-card .listeo-search-card-form .panel-dropdown .panel-dropdown-content {
	top: calc(100% + 6px);
	border-radius: 8px;
}

/* "Buttons (pick one)": same height as the selects; the pill look comes from the theme. */
.listeo-search-card .listeo-search-card-form .listeo-segmented {
	min-height: var(--lsc-field-height);
	height: 100%;
	margin: 0;
	padding: 4px;
	flex-wrap: nowrap;
}

.listeo-search-card .listeo-search-card-form .listeo-segmented .listeo-segmented__button {
	padding: 4px 12px;
	white-space: nowrap;
}

/* Search button (also with the result count) */
.listeo-search-card .listeo-search-card-form button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	height: var(--lsc-field-height);
	margin: 0;
	padding: 0 24px;
	border-radius: var(--lsc-button-radius, var(--lsc-field-radius));
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
}

/* Location field: the container has a scoped id (autocomplete-container-{form id}). */
.listeo-search-card .listeo-search-card-form [id^="autocomplete-container"] {
	position: relative;
	z-index: 101;
}

/* OSM suggestions under a location field of a form with its own id (listeo.leaflet.js). */
.listeo-search-card .listeo-geocode-cont {
	position: absolute;
	z-index: 110;
	top: calc(100% + 6px);
	left: 0;
	display: none;
	width: 100%;
	background: #fff;
	border: 1px solid #e3e3e3;
	border-radius: var(--lsc-field-radius);
	box-shadow: 0 10px 30px rgba(16, 24, 40, 0.14);
	overflow: hidden;
}

.listeo-search-card .listeo-geocode-cont.active {
	display: block;
}

.listeo-search-card .listeo-geocode-cont ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.listeo-search-card .listeo-geocode-cont ul li {
	margin: 0;
	padding: 11px 16px 11px 38px; /* the pin icon of the theme sits at the left */
	border-bottom: 1px solid #ededed;
	color: #666;
	font-size: 14px;
	line-height: 20px;
	cursor: pointer;
}

.listeo-search-card .listeo-geocode-cont ul li:last-child {
	border-bottom: 0;
}

.listeo-search-card .listeo-geocode-cont ul li.selected,
.listeo-search-card .listeo-geocode-cont ul li:hover {
	background: #f7f7f7;
}

.listeo-search-card .listeo-geocode-cont span.highlight {
	color: #222;
	font-weight: 700;
}

.listeo-search-card .listeo-geocode-cont ul li.powered-by-osm {
	padding: 8px 16px;
	color: #999;
	font-size: 12px;
	text-align: end;
	pointer-events: none;
}

.listeo-search-card .type-and-hit-enter {
	inset-inline-end: 44px;
	right: auto;
	top: 50%;
	transform: translateY(-50%);
}

/*
 * Inside hero widgets ("Search form style: Tabbed", class listeo-search-card--hero).
 * Minimal: the card keeps its look; narrow hero columns get 2 field columns
 * (the hero's Columns control, when set, wins: it has a higher specificity).
 */
.listeo-search-card--hero {
	margin-top: 10px;
	margin-bottom: 0;
}

.alt-search-box .listeo-search-card--hero,
.listeo-simple-hero__search .listeo-search-card--hero {
	--lsc-cols: 2;
}

/*
 * Card title inside a hero: the hero's heading rules (theme .main-search-container h1/h2,
 * the banner "Title Color" control: {{WRAPPER}} h1, h2, h4, h5) must not restyle it.
 * Specificity 0,3,2: above the hero rules (up to 0,3,1), below the card's own
 * Title color and typography controls (0,4,0).
 */
body .listeo-search-card--hero .listeo-search-card__header :is(h1, h2, h3, h4, h5, h6, div).listeo-search-card__title {
	margin: 0;
	padding: 0;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
	color: #1b1b1b;
}

/* Boxed banner: the banner box is already a white card. */
.alt-search-box .listeo-search-card--hero {
	padding: 0;
	background: transparent;
	box-shadow: none;
}

/* Compact filters: a row of small pill buttons under the fields and the search button.
   The field rules above read these variables, so selects, panels and buttons become pills. */
.listeo-search-card .listeo-search-card-form .listeo-compact-filters {
	--lsc-field-height: 38px;
	--lsc-field-radius: 100px;
	grid-column: 1 / -1;
	order: 1;
	align-self: center;
	margin: 0;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .panel-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	float: none;
	width: auto;
	padding: 0;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .panel-wrapper > * {
	position: relative;
	flex: 0 0 auto;
	width: auto;
	max-width: 100%;
	margin: 0;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .bootstrap-select.btn-group {
	width: auto !important;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .bootstrap-select.btn-group > .dropdown-toggle,
.listeo-search-card .listeo-search-card-form .listeo-compact-filters .panel-dropdown > a,
.listeo-search-card .listeo-search-card-form .listeo-compact-filters .drilldown-menu .menu-toggle {
	width: auto;
	padding-inline: 15px 34px;
	font-size: 14.5px;
	white-space: nowrap;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .bootstrap-select.btn-group > .dropdown-toggle {
	padding-inline-end: 35px;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .listeo-compact-filter.has-value .bootstrap-select.btn-group > .dropdown-toggle {
	border-color: currentColor;
}

/* Pills: a small chevron, centred (the theme's icon is sized for the 54px fields). */
.listeo-search-card .listeo-search-card-form .listeo-compact-filters .bootstrap-select .dropdown-toggle .caret {
	top: 50%;
	right: 13px;
	width: 14px;
	height: 14px;
	margin-top: -7px;
	border: 0;
	color: #a1a1aa;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .bootstrap-select .dropdown-toggle .caret::after {
	content: "";
	position: static;
	display: block;
	width: 14px;
	height: 14px;
	margin: 0;
	background-color: currentColor;
	font-size: 0;
	line-height: 0;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Lists and panels of the pills open faster than the theme's 0.4s / 0.3s. */
.listeo-search-card .listeo-search-card-form .listeo-compact-filters .bootstrap-select .dropdown-menu,
.listeo-search-card .listeo-search-card-form .listeo-compact-filters .panel-dropdown .panel-dropdown-content {
	transition-duration: 0.15s;
}

/* The theme's white bar that joins an open select to its list: not on a pill. */
.listeo-search-card .listeo-search-card-form .listeo-compact-filters .bootstrap-select::before {
	display: none;
}

/* Lists and panels of a pill: the card's usual corners (not the pill's), just below the pill. */
.listeo-search-card .listeo-search-card-form .listeo-compact-filters .bootstrap-select div.dropdown-menu {
	top: calc(100% + 6px);
	min-width: 220px;
	border-radius: 5px;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .panel-dropdown .panel-dropdown-content,
.listeo-search-card .listeo-search-card-form .listeo-compact-filters .drilldown-menu .menu-panel {
	border-radius: 5px;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .panel-dropdown {
	display: inline-block;
	width: auto;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .listeo-segmented {
	padding: 3px;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .listeo-segmented .listeo-segmented__button {
	padding: 3px 14px;
	font-size: 14px;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .select2-container {
	width: auto !important;
	min-width: 120px;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .select2-container .select2-selection--multiple {
	display: flex;
	align-items: center;
	height: var(--lsc-field-height);
	min-height: 0;
	padding: 0 12px;
	overflow: hidden;
	border: 1px solid var(--lsc-field-border);
	border-radius: var(--lsc-field-radius);
	background: var(--lsc-field-bg);
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .select2-container .select2-selection__rendered {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters .select2-container .select2-search__field {
	height: auto;
	margin: 0;
	font-size: 14.5px;
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters :is(.listeo-compact-filter--checkbox, .listeo-compact-filter--open-now) .checkboxes {
	display: flex;
	align-items: center;
	height: var(--lsc-field-height);
	margin: 0 !important;
	padding: 0 15px;
	border: 1px solid var(--lsc-field-border);
	border-radius: var(--lsc-field-radius);
	background: var(--lsc-field-bg);
}

.listeo-search-card .listeo-search-card-form .listeo-compact-filters :is(.listeo-compact-filter--checkbox, .listeo-compact-filter--open-now) .checkboxes label {
	margin: 0;
	font-size: 14.5px;
	white-space: nowrap;
}

/* ==========================================================================
   Style: Modern (Style tab > Card > Style). Pill tabs with a sliding background,
   fields joined into one bar (labels on top), compact filters as pills.
   Rows, corners and the button row are set by search-card.js (layoutModern).
   ========================================================================== */
.listeo-search-card--modern {
	--lsc-ink: #18181b;
	--lsc-line: #e4e4e7;
	--lsc-soft: #f4f4f5;
	--lsc-field-color: #3f3f46;
	--lsc-muted: #71717a;
	padding: 20px 24px 22px;
	border-radius: 12px;
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.45);
}

/* Tabs */
.listeo-search-card--modern .listeo-search-card__tabs {
	position: relative;
	gap: 6px;
	margin-bottom: 18px;
	border-bottom: 0;
}

.listeo-search-card.listeo-search-card--modern .listeo-search-card__tab {
	z-index: 1;
	height: 38px;
	padding: 0 16px 0 13px;
	border-radius: 100px;
	color: var(--lsc-muted);
	font-size: 15.5px;
	transition: background-color 0.15s ease, color 0.25s ease;
}

.listeo-search-card.listeo-search-card--modern .listeo-search-card__tab::after {
	display: none;
}

.listeo-search-card.listeo-search-card--modern .listeo-search-card__tab:hover {
	background: var(--lsc-soft);
	color: var(--lsc-ink);
}

.listeo-search-card.listeo-search-card--modern .listeo-search-card__tab.is-active,
.listeo-search-card.listeo-search-card--modern .listeo-search-card__tab[aria-selected="true"] {
	background: var(--lsc-tab-active-bg, var(--lsc-accent));
	color: #fff;
}

.listeo-search-card.listeo-search-card--modern.has-tab-pill .listeo-search-card__tab.is-active,
.listeo-search-card.listeo-search-card--modern.has-tab-pill .listeo-search-card__tab[aria-selected="true"] {
	background: transparent;
}

.listeo-search-card--modern .listeo-search-card__tab .listeo-search-card__tab-icon,
.listeo-search-card--modern .listeo-search-card__tab.is-active .listeo-search-card__tab-icon {
	color: currentColor;
}

.listeo-search-card__tab-pill {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 0;
	width: 0;
	height: 0;
	border-radius: 100px;
	background: var(--lsc-tab-active-bg, var(--lsc-accent, var(--listeo-primary-color, #f30c0c)));
	pointer-events: none;
	transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
	.listeo-search-card__tab-pill {
		transition: none;
	}
}

/* Tab switch: the fields of the old tab blur and fade out, the new ones fade in from a blur
   (the card height is animated by search-card.js). */
.listeo-search-card--modern .listeo-search-card__panel.is-leaving {
	z-index: 0;
	pointer-events: none;
	animation: lsc-panel-out 0.25s linear both;
}

.listeo-search-card--modern .listeo-search-card__panel.is-entering {
	position: relative;
	z-index: 1;
	animation: lsc-panel-in 0.25s ease-out both;
}

@keyframes lsc-panel-out {
	to {
		opacity: 0;
		filter: blur(4px);
	}
}

@keyframes lsc-panel-in {
	from {
		opacity: 0;
		filter: blur(6px);
	}
	to {
		opacity: 1;
		filter: none;
	}
}

/* Joined bar: 1px lines between the cells (gap + shadow), corners on the outer cells. */
.listeo-search-card--modern .listeo-search-card-form .main-search-input {
	gap: 1px;
}

.listeo-search-card--modern .listeo-search-card-form .main-search-input > .main-search-input-item {
	--lsc-field-height: 66px;
	--lsc-field-border: transparent;
	--lsc-field-radius: 0px;
	--lsc-field-bg: transparent;
	align-self: stretch;
	min-height: 66px;
	background: #fff;
	box-shadow: 0 0 0 1px var(--lsc-line);
	transition: background-color 0.15s ease;
}

/* AI search: fill the cell and use the same inner spacing as the other fields. */
.listeo-search-card--modern .listeo-search-card-form .main-search-input-item.ai_search .ai-search-form-wrapper {
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.listeo-search-card--modern .listeo-search-card-form .main-search-input-item.ai_search .search-input-wrapper {
	box-sizing: border-box;
	height: var(--lsc-field-height);
	padding: 0 16px;
}

.listeo-search-card--modern .listeo-search-card-form .main-search-input-item.ai_search .ai-btn-container {
	right: auto;
	inset-inline-end: 16px;
}

.listeo-search-card--modern .listeo-search-card-form .main-search-input-item .bootstrap-select div.dropdown-menu {
	left: -1px;
	right: auto;
	min-width: calc(100% + 2px) !important;
	border-radius: 0 0 6px 6px;
}

.listeo-search-card--modern .listeo-search-card-form .bootstrap-select .dropdown-menu > .inner::-webkit-scrollbar {
	width: 5px;
}

.listeo-search-card--modern .listeo-search-card-form .bootstrap-select .dropdown-menu > .inner::-webkit-scrollbar-track {
	background-color: transparent;
}

.listeo-search-card--modern .listeo-search-card-form .bootstrap-select .dropdown-menu > .inner::-webkit-scrollbar-thumb {
	border-radius: 12px;
	background-color: #d8d8d8;
}

.listeo-search-card--modern .main-search-input > .lsc-tl { border-top-left-radius: 6px; }
.listeo-search-card--modern .main-search-input > .lsc-tr { border-top-right-radius: 6px; }
.listeo-search-card--modern .main-search-input > .lsc-bl { border-bottom-left-radius: 6px; }
.listeo-search-card--modern .main-search-input > .lsc-br { border-bottom-right-radius: 6px; }

.listeo-search-card--modern .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle {
	color: var(--lsc-ink);
	font-size: 16px;
}

.listeo-search-card--modern .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle.bs-placeholder .filter-option {
	color: var(--lsc-field-color);
	font-weight: 400;
}

.listeo-search-card--modern .listeo-search-card-form .main-search-input-item .bootstrap-select.btn-group > .dropdown-toggle:not(.bs-placeholder) .filter-option {
	font-weight: 600;
}

.listeo-search-card--modern .listeo-search-card-form .main-search-input-item .bootstrap-select.btn-group > .dropdown-toggle:hover,
.listeo-search-card--modern .listeo-search-card-form .main-search-input-item .bootstrap-select.btn-group.open > .dropdown-toggle {
	border-color: transparent;
}

.listeo-search-card--modern .listeo-search-card-form .bootstrap-select.btn-group.disabled > .dropdown-toggle,
.listeo-search-card--modern .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle.disabled,
.listeo-search-card--modern .listeo-search-card-form .bootstrap-select.btn-group.disabled > .dropdown-toggle:hover,
.listeo-search-card--modern .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle.disabled:hover {
	border-color: transparent;
	background: transparent;
	opacity: 1;
}

.listeo-search-card--modern .listeo-search-card-form .bootstrap-select.btn-group.disabled > .dropdown-toggle .filter-option,
.listeo-search-card--modern .listeo-search-card-form .bootstrap-select.btn-group.disabled > .dropdown-toggle:hover .filter-option,
.listeo-search-card--modern .listeo-search-card-form .bootstrap-select.btn-group.disabled > .dropdown-toggle .caret {
	color: #b4b4bb;
}

.listeo-search-card--modern .main-search-input-item:has(.bootstrap-select.disabled) {
	background: #fcfcfc;
}

/* Label above the value (Search Forms > field > Label). */
.listeo-search-card--modern .listeo-search-field-label {
	position: absolute;
	top: 12px;
	left: 18px;
	right: 40px;
	z-index: 1;
	overflow: hidden;
	color: var(--lsc-muted);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	text-overflow: ellipsis;
	pointer-events: none;
}

[dir="rtl"] .listeo-search-card--modern .listeo-search-field-label {
	right: 18px;
	left: 40px;
}

.listeo-search-card--modern .main-search-input-item:has(> .listeo-search-field-label) .bootstrap-select.btn-group > .dropdown-toggle,
.listeo-search-card--modern .main-search-input-item:has(> .listeo-search-field-label) .panel-dropdown > a,
.listeo-search-card--modern .main-search-input-item:has(> .listeo-search-field-label) .drilldown-menu .menu-toggle,
.listeo-search-card--modern .listeo-search-card-form .main-search-input .main-search-input-item:has(> .listeo-search-field-label) input[type="text"] {
	padding-top: 20px;
}

/* "Buttons (pick one)": a gray track with white buttons; a dark pill slides to the chosen one
   (search-card.js, initSegmented). Before the script runs the chosen button itself is dark. */
.listeo-search-card--modern .listeo-search-card-form .listeo-segmented {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: stretch;
	gap: 0;
	padding: 4px;
	border: 0;
	border-radius: 100px;
	background: #f1f1f1;
}

.listeo-search-card--modern .listeo-search-card-form .listeo-segmented::before {
	content: "";
	position: absolute;
	inset: 4px;
	z-index: 0;
	border-radius: 100px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.listeo-search-card--modern .listeo-search-card-form .listeo-segmented .listeo-segmented__button {
	position: relative;
	z-index: 2;
	flex: 1 1 0;
	padding: 0 14px;
	border: 0;
	border-radius: 100px;
	background: transparent;
	box-shadow: none;
	color: var(--lsc-ink);
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.3s ease;
}

body .listeo-search-card--modern .listeo-search-card-form .listeo-segmented .listeo-segmented__input:checked + .listeo-segmented__button {
	background: var(--lsc-tab-active-bg, var(--lsc-accent));
	box-shadow: none;
	color: #fff;
}

body .listeo-search-card--modern .listeo-search-card-form .listeo-segmented.has-seg-pill .listeo-segmented__input:checked + .listeo-segmented__button {
	background: transparent;
}

.listeo-search-card--modern .lsc-seg-pill {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	border-radius: 100px;
	background: var(--lsc-tab-active-bg, var(--lsc-accent));
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
	pointer-events: none;
	transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
	.listeo-search-card--modern .lsc-seg-pill {
		transition: none;
	}
}

/* In the bar: the track sits inside the cell. */
.listeo-search-card--modern .listeo-search-card-form .main-search-input-item .listeo-segmented {
	width: auto;
	min-height: 0;
	height: calc(var(--lsc-field-height) - 20px);
	margin: 10px 12px;
}

.listeo-search-card--modern .main-search-input-item:has(> .listeo-search-field-label) .listeo-segmented {
	height: calc(var(--lsc-field-height) - 40px);
	margin-top: 32px;
}

/* Compact filters: the same, as a pill. */
.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .listeo-segmented {
	min-height: 0;
	height: var(--lsc-field-height);
	padding: 3px;
	border-radius: 100px;
}

.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .listeo-segmented::before {
	inset: 3px;
	border-radius: 100px;
}

.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .listeo-segmented .listeo-segmented__button,
.listeo-search-card--modern .listeo-compact-filters .lsc-seg-pill {
	border-radius: 100px;
}

.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .listeo-segmented .listeo-segmented__button {
	flex: 0 0 auto;
	padding: 0 14px;
	font-size: 14px;
}

/* Button: on its own row under the bar, at the right (next to the compact filters). */
.listeo-search-card--modern .listeo-search-card-form button.button {
	align-self: center;
	height: 56px;
	margin-top: 16px;
	border-radius: 6px;
	box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--lsc-accent) 60%, transparent);
	font-size: 16.5px;
}

.listeo-search-card--modern .listeo-search-card-form button.button::before {
	content: "";
	position: static;
	display: block;
	opacity: 1;
	transform: none;
	border-radius: 0;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-inline-end: 10px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Compact filters: pills, dark when set. */
.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters {
	--lsc-field-height: 36px;
	--lsc-field-border: var(--lsc-line);
	margin-top: 16px;
}

.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .bootstrap-select.btn-group > .dropdown-toggle {
	color: var(--lsc-ink);
	font-size: 14.5px;
}

.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .listeo-compact-filter:not(.has-value) .bootstrap-select.btn-group > .dropdown-toggle:hover,
.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .listeo-compact-filter:not(.has-value) .bootstrap-select.btn-group.open > .dropdown-toggle {
	border-color: var(--lsc-line);
}

.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .listeo-compact-filter.has-value .bootstrap-select.btn-group > .dropdown-toggle {
	border-color: var(--lsc-tab-active-bg, var(--lsc-accent));
	background: var(--lsc-tab-active-bg, var(--lsc-accent));
	color: #fff;
}

.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .listeo-compact-filter.has-value .bootstrap-select.btn-group > .dropdown-toggle .filter-option,
.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .listeo-compact-filter.has-value .bootstrap-select.btn-group > .dropdown-toggle .caret {
	color: #fff;
	font-weight: 600;
}

.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .panel-dropdown > a,
.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters .drilldown-menu .menu-toggle,
.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters :is(.listeo-compact-filter--checkbox, .listeo-compact-filter--open-now) .checkboxes label {
	color: var(--lsc-ink);
}

/* Modern, before the scripts run: the button already next to the compact filters
   (search-card.js then balances the rows), and the native selects shown like the
   fields until bootstrap-select replaces them, so nothing is empty or jumps. */
.listeo-search-card--modern .listeo-search-card-form .main-search-input > button.button {
	grid-column: -2 / -1;
	order: 2;
}

.listeo-search-card--modern .listeo-search-card-form .main-search-input > .listeo-compact-filters {
	grid-column: 1 / -2;
}

.listeo-search-card--modern .listeo-search-card-form :not(.bootstrap-select) > select.selectpicker {
	display: block !important;
	width: 100%;
	height: var(--lsc-field-height);
	margin: 0;
	padding: 0 40px 0 16px;
	border: 1px solid var(--lsc-field-border);
	border-radius: var(--lsc-field-radius);
	background: var(--lsc-field-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
	box-shadow: none;
	color: var(--lsc-field-color);
	font: inherit;
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
}

.listeo-search-card--modern .listeo-search-card-form :not(.bootstrap-select) > select.selectpicker:disabled {
	color: #b4b4bb;
}

.listeo-search-card--modern .main-search-input-item:has(> .listeo-search-field-label) :not(.bootstrap-select) > select.selectpicker {
	padding-top: 20px;
}

.listeo-search-card--modern .listeo-search-card-form .listeo-compact-filters :not(.bootstrap-select) > select.selectpicker {
	width: auto;
	padding: 0 35px 0 15px;
	background-position: right 13px center;
	background-size: 14px;
	font-size: 14.5px;
}

@media (max-width: 1024px) {
	.listeo-search-card--modern .listeo-search-card-form .main-search-input > button.button,
	.listeo-search-card--modern .listeo-search-card-form .main-search-input > .listeo-compact-filters {
		grid-column: 1 / -1;
	}
}

/* Tablet and phone */
@media (max-width: 1024px) {
	.listeo-search-card {
		padding: 28px;
	}
}

@media (max-width: 767px) {
	.listeo-search-card {
		padding: 22px 18px;
	}

	.listeo-search-card .listeo-search-card__title,
	body .listeo-search-card--hero .listeo-search-card__header :is(h1, h2, h3, h4, h5, h6, div).listeo-search-card__title {
		font-size: 21px;
	}

	/* Phones: every tab visible; tabs wrap to a second line instead of scrolling. */
	.listeo-search-card__tabs {
		flex-wrap: wrap;
		gap: 10px 20px;
		overflow: visible;
	}

	.listeo-search-card .listeo-search-card__tab {
		padding-bottom: 10px;
		gap: 6px;
		font-size: 15px;
	}

	.listeo-search-card.listeo-search-card--modern .listeo-search-card__tab {
		height: 36px;
		padding: 0 14px 0 12px;
		font-size: 14.5px;
	}
	/* A compact filter button is not a suitable width for its mobile popup. */
	.listeo-search-card .listeo-search-card-form .listeo-compact-filters {
		position: relative;
	}
	.listeo-search-card .listeo-search-card-form .listeo-compact-filters .panel-wrapper,
	.listeo-search-card .listeo-search-card-form .listeo-compact-filters .panel-wrapper > .panel-dropdown {
		position: static;
	}
	.listeo-search-card .listeo-search-card-form .listeo-compact-filters .panel-dropdown .panel-dropdown-content {
		left: 0;
		right: 0;
		top: calc(100% + 6px);
		width: 100%;
		max-width: none;
	}
}

/* Dark mode (theme option) */
body#dark-mode .listeo-search-card {
	--lsc-field-bg: #262626;
	--lsc-field-border: #3a3a3a;
	--lsc-field-color: #eee;
	--lsc-muted: #a0a0a0;
	--lsc-tab-color: #ddd;
	background: #1e1e1e;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body#dark-mode .listeo-search-card .listeo-search-card__title {
	color: #f2f2f2;
}

body#dark-mode .listeo-search-card__tabs {
	border-bottom-color: #333;
}

body#dark-mode .listeo-search-card .listeo-search-card__tab:hover,
body#dark-mode .listeo-search-card .listeo-search-card__tab.is-active {
	color: #f2f2f2;
}

body#dark-mode .listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group.disabled > .dropdown-toggle,
body#dark-mode .listeo-search-card .listeo-search-card-form .bootstrap-select.btn-group > .dropdown-toggle.disabled {
	background: #222;
	border-color: #2e2e2e;
	color: #777;
}

body#dark-mode .listeo-search-card .listeo-geocode-cont {
	background: #222;
	border-color: #333;
}

body#dark-mode .listeo-search-card .listeo-geocode-cont ul li {
	border-color: #333;
	color: #bbb;
}

body#dark-mode .listeo-search-card .listeo-geocode-cont ul li.selected,
body#dark-mode .listeo-search-card .listeo-geocode-cont ul li:hover {
	background: #2a2a2a;
}

body#dark-mode .listeo-search-card .listeo-geocode-cont span.highlight {
	color: #eee;
}

/* Standalone merged fields keep the page layout, without the hero card shell. */
.listeo-search-card--form-builder {
	--lsc-cols: 2;
	--lsc-field-radius: 10px;
	--lsc-field-color: #374449;
	--lsc-field-border: #e2e5e5;
	max-width: none;
	padding: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}
.listeo-search-card--form-builder .main-search-input {
	--lsc-field-height: 60px;
	row-gap: 0;
}
/* The initial HTML uses the same two-column layout before the script balances it. */
.listeo-search-card--form-builder .listeo-search-card-form .main-search-input > .listeo-compact-filters {
	grid-column: 1 / -1;
}
.listeo-search-card--form-builder .main-search-input > .main-search-input-item:nth-child(odd of .main-search-input-item:not(.listeo-filter-hidden)):nth-last-child(1 of .main-search-input-item:not(.listeo-filter-hidden)) {
	grid-column: 1 / -1;
}
.listeo-search-card--form-builder .listeo-search-card-form > .listeo-segmented-wrap {
	margin-bottom: 16px;
}
.listeo-search-card--form-builder .listeo-search-card-form > .listeo-segmented-wrap .listeo-segmented {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
	width: auto;
	max-width: 100%;
	min-height: 0;
	height: auto;
	margin: 0;
	padding: 0;
	border-radius: 7px;
	background: transparent;
	box-shadow: none;
}
.listeo-search-card--form-builder .listeo-search-card-form > .listeo-segmented-wrap .listeo-segmented::before {
	display: none;
}
body .listeo-search-card--form-builder .listeo-search-card-form > .listeo-segmented-wrap .listeo-segmented .listeo-segmented__button {
	flex: 0 0 auto;
	min-height: 34px;
	padding: 7px 12px;
	border-radius: 100px;
	font-size: 14px;
	font-weight: 500;
}
.listeo-search-card--form-builder .lsc-seg-pill {
	border-radius: 100px;
	box-shadow: none;
}
.listeo-search-card--form-builder .listeo-search-card-form .main-search-input > button.button {
	grid-column: 1 / -1 !important;
	justify-self: end;
	width: auto;
	min-width: 120px;
	height: 40px;
	min-height: 40px;
	margin-top: 14px;
	padding: 8px 18px;
	border-radius: 100px;
	font-size: 14px;
	line-height: 24px;
	box-shadow: none;
}
.listeo-search-card--form-builder .listeo-search-card-form .main-search-input-item:has(> .listeo-search-field-label) input[type="text"] {
	padding-top: 20px !important;
}

/* Compact panel chevrons reserve the same space as select chevrons. */
.listeo-search-card .listeo-search-card-form .listeo-compact-filters .panel-dropdown > a::after {
	position: absolute;
	right: 13px;
	inset-inline-end: 13px;
	top: 50%;
	float: none;
	width: 14px;
	margin: 0;
	line-height: 14px;
	text-align: center;
	transform: translateY(-50%);
}
.listeo-search-card .listeo-search-card-form .listeo-compact-filters .panel-dropdown.active > a::after {
	transform: translateY(-50%) rotate(180deg);
}
/* The location link is the hit area. Its icon must not be positioned a second time. */
.listeo-search-card--form-builder .listeo-search-card-form .main-search-input-item.location a {
	position: absolute;
	top: 0;
	bottom: 0;
	inset-inline-end: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 100%;
	transform: none;
	background: transparent;
}
.listeo-search-card--form-builder .listeo-search-card-form .main-search-input-item.location a i {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	line-height: 1;
	transform: none;
	background: transparent;
}
.listeo-search-card--form-builder .type-and-hit-enter {
	display: none;
}

/* Dropdown checkbox lists use their natural height, not the height of a filter pill. */
.listeo-search-card .listeo-search-card-form .panel-dropdown-content .panel-checkboxes-container {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 16px;
	padding: 0;
}
.listeo-search-card .listeo-search-card-form .panel-dropdown-content .panel-checkbox-wrap {
	width: auto;
	min-width: 0;
}
.listeo-search-card .listeo-search-card-form .panel-dropdown-content .panel-checkbox-wrap label {
	margin: 0;
	white-space: normal;
}
.listeo-search-card--form-builder .listeo-segmented__button img {
	width: 18px;
	height: 18px;
	margin-inline-end: 7px;
	object-fit: contain;
	filter: grayscale(1);
}
.listeo-search-card--form-builder .listeo-segmented__input:checked + .listeo-segmented__button img {
	filter: brightness(0) invert(1);
}

/* Anchor both default and scoped location suggestions to the full input height. */
.listeo-search-card .listeo-search-card-form :is(#leaflet-geocode-cont, .listeo-geocode-cont) {
	top: 100%;
	margin-top: 0;
	box-sizing: border-box;
}
