#ngfs-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: var(--ngfs-z-index, 999999);
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, .58);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

#ngfs-overlay.ngfs-overlay--active {
	display: block;
}

body.ngfs-search-open {
	overflow: hidden;
}

body.ngfs-search-open [data-ngfs-hidden="true"] {
	display: none !important;
}

/* Professional top-header search panel */
.ngfs-overlay__inner {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	background: #fff;
	border-bottom: 1px solid rgba(15, 23, 42, .10);
	box-shadow: 0 12px 35px rgba(15, 23, 42, .16);
	box-sizing: border-box;
	animation: ngfs-slide-down .18s ease-out;
}

@keyframes ngfs-slide-down {
	from {
		transform: translateY(-10px);
		opacity: .96;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.ngfs-search-box {
	width: min(1180px, 100%);
	margin: 0 auto;
	padding: 22px 64px 24px 24px;
	position: relative;
	box-sizing: border-box;
}

.ngfs-heading {
	margin: 0 0 13px;
	padding: 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: -.01em;
	color: #172033;
}

.ngfs-close {
	position: absolute;
	top: 20px;
	right: 16px;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f2f4f7;
	color: #263142;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 27px;
	font-family: Arial, sans-serif;
	font-weight: 400;
	line-height: 1;
	z-index: 20;
	transition: background .15s ease, transform .15s ease, color .15s ease;
}

.ngfs-close:hover,
.ngfs-close:focus-visible {
	background: #e6e9ee;
	color: #111827;
	transform: scale(1.04);
	outline: none;
}

.ngfs-form {
	margin: 0;
	width: 100%;
}

.ngfs-input-wrap {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 58px;
	margin: 0;
	border: 1px solid #cfd5dd;
	border-radius: 8px;
	background: #fff;
	box-sizing: border-box;
	position: relative;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.ngfs-input-wrap:focus-within {
	border-color: #8b95a5;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, .08);
}

.ngfs-search-symbol {
	flex: 0 0 auto;
	width: 46px;
	padding: 0;
	text-align: center;
	font-size: 19px;
	color: #667085;
	line-height: 1;
}

.ngfs-input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	height: 56px !important;
	margin: 0 !important;
	padding: 0 10px !important;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	color: #172033 !important;
	font-size: 17px !important;
	line-height: 1.4 !important;
}

.ngfs-input::placeholder {
	color: #98a2b3;
	opacity: 1;
}

.ngfs-submit {
	flex: 0 0 auto;
	height: 42px;
	margin-right: 8px;
	padding: 0 21px;
	border: 0;
	border-radius: 6px;
	background: #172033;
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	line-height: 42px;
	transition: opacity .15s ease, transform .15s ease;
}

.ngfs-submit:hover,
.ngfs-submit:focus-visible {
	opacity: .9;
	transform: translateY(-1px);
	outline: none;
}

/* Live search dropdown */
.ngfs-live-results {
	display: none;
	position: absolute;
	top: calc(100% - 2px);
	left: 24px;
	right: 64px;
	max-height: min(55vh, 480px);
	overflow-y: auto;
	background: #fff;
	border: 1px solid #d9dee6;
	border-top: 0;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 16px 35px rgba(15, 23, 42, .15);
	z-index: 30;
}

.ngfs-live-results.ngfs-live-results--visible {
	display: block;
}

.ngfs-result {
	display: flex;
	align-items: center;
	gap: 13px;
	min-height: 68px;
	padding: 10px 14px;
	text-decoration: none !important;
	color: #172033 !important;
	background: #fff;
	border-bottom: 1px solid #edf0f3;
	box-sizing: border-box;
	transition: background .12s ease;
}

.ngfs-result:last-child {
	border-bottom: 0;
}

.ngfs-result:hover,
.ngfs-result:focus-visible {
	background: #f8fafc;
	outline: none;
}

.ngfs-result__media {
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	overflow: hidden;
	background: #f3f5f7;
}

.ngfs-result__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ngfs-result__placeholder {
	color: #98a2b3;
	font-size: 20px;
}

.ngfs-result__text {
	min-width: 0;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.ngfs-result__text strong {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: #172033;
}

.ngfs-result__price {
	font-size: 13px;
	line-height: 1.35;
	color: #667085;
}

.ngfs-result__type {
	flex: 0 0 auto;
	padding: 4px 8px;
	border-radius: 999px;
	background: #f2f4f7;
	color: #667085;
	font-size: 11px;
	font-weight: 600;
}

.ngfs-loading,
.ngfs-no-results {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 64px;
	padding: 14px;
	color: #667085;
	font-size: 13px;
	box-sizing: border-box;
}

.ngfs-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid #d9dee6;
	border-top-color: #667085;
	border-radius: 50%;
	animation: ngfs-spin .65s linear infinite;
}

@keyframes ngfs-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
	.ngfs-search-box {
		padding: 16px 54px 18px 14px;
	}

	.ngfs-heading {
		font-size: 16px;
		margin-bottom: 10px;
	}

	.ngfs-close {
		top: 12px;
		right: 10px;
		width: 36px;
		height: 36px;
		font-size: 25px;
	}

	.ngfs-input-wrap {
		min-height: 52px;
		border-radius: 7px;
	}

	.ngfs-search-symbol {
		width: 38px;
		font-size: 17px;
	}

	.ngfs-input {
		height: 50px !important;
		padding: 0 7px !important;
		font-size: 16px !important;
	}

	.ngfs-submit {
		height: 38px;
		margin-right: 6px;
		padding: 0 13px;
		line-height: 38px;
		font-size: 13px;
	}

	.ngfs-live-results {
		left: 14px;
		right: 54px;
		max-height: 55vh;
	}

	.ngfs-result {
		min-height: 62px;
		padding: 9px 11px;
	}

	.ngfs-result__media {
		width: 42px;
		height: 42px;
		flex-basis: 42px;
	}

	.ngfs-result__type {
		display: none;
	}
}

/* Admin-controlled visibility for the Search submit button inside the form only. */
body.ngfs-hide-form-search-button #ngfs-overlay .ngfs-submit {
	display: none !important;
}
