@charset "UTF-8";
/**
 * GenieBuilder — Search Bar group.
 * Quick / Advanced / Inline placements. Token-driven. Mic button on keyword field.
 */

.mlsg-gb-search {
	--gb-search-field-bg: #ffffff;
	--gb-search-field-text: var(--gb-color-text);
	--gb-search-field-border: var(--gb-color-border);
	--gb-search-radius: 0.5rem;
	--gb-search-btn-bg: var(--gb-color-primary);
	--gb-search-btn-text: #ffffff;
	--gb-search-mic: var(--gb-color-primary);
	display: flex;
	gap: var(--gb-space-sm);
	width: 100%;
}

.mlsg-gb-search__fields {
	display: flex;
	gap: var(--gb-space-sm);
	flex: 1 1 auto;
	min-width: 0;
}

.mlsg-gb-search__field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* A tick-box filter (Price Reduced, Open Houses Only), drawn as a field so
   it lines up with the inputs beside it. */
.mlsg-gb-search__check {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--gb-search-field-text);
	background: var(--gb-search-field-bg);
	border: 1px solid var(--gb-search-field-border);
	border-radius: var(--gb-search-radius, 0.5rem);
	cursor: pointer;
	white-space: nowrap;
}

.mlsg-gb-search__checkbox {
	flex: none;
	width: 1.125rem;
	height: 1.125rem;
	margin: 0;
	accent-color: var(--gb-color-primary);
	cursor: pointer;
}

.mlsg-gb-search__check:has(.mlsg-gb-search__checkbox:focus-visible) {
	outline: 2px solid var(--gb-color-primary);
	outline-offset: 1px;
}

.mlsg-gb-search__q {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.mlsg-gb-search__input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	color: var(--gb-search-field-text);
	background: var(--gb-search-field-bg);
	border: 1px solid var(--gb-search-field-border);
	border-radius: var(--gb-search-radius);
	line-height: 1.4;
}

.mlsg-gb-search__input:focus-visible {
	outline: 2px solid var(--gb-color-primary);
	outline-offset: 1px;
}

.mlsg-gb-search__q .mlsg-gb-search__input {
	padding-right: 3rem;
}

.mlsg-gb-search__mic {
	position: absolute;
	right: 0.375rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	color: var(--gb-search-mic);
	background: transparent;
	border: 0;
	border-radius: var(--gb-search-radius);
	cursor: pointer;
	font-size: 1rem;
}

.mlsg-gb-search__mic:hover {
	background: rgba(15, 118, 110, 0.08);
}

.mlsg-gb-search__mic.is-listening {
	color:var(--mlsg-danger);
	animation: mlsg-gb-pulse 1.2s ease-in-out infinite;
}

@keyframes mlsg-gb-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
	.mlsg-gb-search__mic.is-listening { animation: none; }
}

.mlsg-gb-search__actions {
	display: flex;
	align-items: flex-start;
	gap: var(--gb-space-sm);
}

.mlsg-gb-search__submit {
	display: inline-flex;
	align-items: center;
	gap: var(--gb-space-xs);
	padding: 0.75rem 1.25rem;
	font-size: 1rem;
	font-weight: 600;
	color: var(--gb-search-btn-text);
	background: var(--gb-search-btn-bg);
	border: 0;
	border-radius: var(--gb-search-radius);
	cursor: pointer;
	white-space: nowrap;
}

.mlsg-gb-search__more {
	align-self: center;
	font-size: var(--gb-font-meta);
	color: var(--gb-color-primary);
	text-decoration: none;
	white-space: nowrap;
}

.mlsg-gb-search__more:hover {
	text-decoration: underline;
}

.mlsg-gb-search__save {
	display: inline-flex;
	align-items: center;
	gap: var(--gb-space-xs);
	padding: 0.75rem 1rem;
	font-size: var(--gb-font-meta);
	color: var(--gb-color-primary);
	background: transparent;
	border: 1px solid var(--gb-search-field-border);
	border-radius: var(--gb-search-radius);
	cursor: pointer;
	white-space: nowrap;
}

/* Quick: keyword takes the whole bar */
.mlsg-gb-search--quick .mlsg-gb-search__field--q {
	flex: 1 1 auto;
}

/* Advanced: fields wrap into a responsive grid */
.mlsg-gb-search--advanced {
	flex-direction: column;
}

.mlsg-gb-search--advanced .mlsg-gb-search__fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: var(--gb-space-md);
}

.mlsg-gb-search--advanced .mlsg-gb-search__actions {
	margin-top: var(--gb-space-md);
}

/* Inline: condensed refine row that wraps */
.mlsg-gb-search--inline .mlsg-gb-search__fields {
	flex-wrap: wrap;
}

.mlsg-gb-search--inline .mlsg-gb-search__field {
	flex: 1 1 140px;
}

@media (max-width: 640px) {
	.mlsg-gb-search {
		flex-direction: column;
	}
	.mlsg-gb-search__fields {
		flex-direction: column;
	}
	.mlsg-gb-search__submit {
		width: 100%;
		justify-content: center;
	}
}

/* Pill-styled top-bar fields + controls */
.mlsg-gb-search__input {
	border-radius: var(--gb-search-radius, 0.5rem);
}
.mlsg-gb-search__submit {
	border-radius: var(--gb-search-radius, 0.5rem);
	font-weight: 600;
}

/* Beds / baths steppers */
.mlsg-gb-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--gb-search-field-border, var(--gb-color-border));
	border-radius: var(--gb-search-radius, 0.5rem);
	background:var(--gb-search-field-bg, var(--mlsg-white));
	overflow: hidden;
}
.mlsg-gb-stepper__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.5rem;
	border: 0;
	background: transparent;
	color: var(--gb-color-muted);
	cursor: pointer;
}
.mlsg-gb-stepper__btn:hover { color: var(--gb-color-primary); }
.mlsg-gb-stepper input {
	width: 3.5rem;
	text-align: center;
	border: 0 !important;
	background: transparent;
	pointer-events: none;
}
