/* Manta Smart Search — suggest dropdown + "did you mean" (RTL)
 *
 * The dropdown lives INSIDE the Search & Filter form markup
 * (ul > li.sf-field-search), where the theme styles list items as
 * inline/floated — hence the aggressive resets below.
 */

.searchandfilter li.sf-field-search,
.mss-anchor {
	position: relative;
}

/* The theme sets `.searchandfilter ul { display:flex }`, which would lay
 * the suggestions out in a row — so visibility is driven by the .mss-open
 * class with !important (jQuery show/hide inline styles can't win here). */
ul.mss-suggest {
	display: none !important;
}

ul.mss-suggest.mss-open {
	display: block !important;
}

.searchandfilter ul.mss-suggest {
	position: absolute !important;
	top: 100% !important;
	right: 0 !important;
	left: auto !important;
	z-index: 10000;
	box-sizing: border-box;
	min-width: 100%;
	max-width: 420px;
	margin: 4px 0 0 !important;
	padding: 6px 0 !important;
	list-style: none !important;
	float: none !important;
	direction: rtl;
	text-align: right;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	max-height: 320px;
	overflow-y: auto;
	overflow-x: hidden;
}

.searchandfilter ul.mss-suggest > li.mss-option {
	display: block !important;
	float: none !important;
	width: 100% !important;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 9px 16px !important;
	font-size: 15px;
	line-height: 1.4;
	color: #333;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: right;
}

.searchandfilter ul.mss-suggest > li.mss-option b {
	color: #1ba9c7; /* site's teal accent */
	font-weight: 700;
}

.searchandfilter ul.mss-suggest > li.mss-option:hover,
.searchandfilter ul.mss-suggest > li.mss-option.mss-active {
	background: #eef8fb;
}

/* "Did you mean" inside the zero-results block */

.mss-dym {
	margin-top: 12px;
	direction: rtl;
	text-align: right;
	font-size: 16px;
}

.mss-dym .mss-dym-label {
	margin-left: 8px;
	font-weight: 700;
}

.mss-dym .mss-dym-link {
	margin-left: 12px;
	color: #1ba9c7;
	text-decoration: underline;
	cursor: pointer;
}

.mss-dym .mss-dym-link:hover {
	text-decoration: none;
}

/* select2 dropdown for the specialty field — keep RTL sane */

.select2-dropdown {
	direction: rtl;
	text-align: right;
}

@media (max-width: 767px) {
	.searchandfilter ul.mss-suggest {
		max-width: none;
	}

	.searchandfilter ul.mss-suggest > li.mss-option {
		padding: 11px 14px !important;
		font-size: 14px;
	}
}
