/* Asaseeyat Search. Rules are written with extra weight so that theme styles do not change the look. */

.asrch-open.asrch-open {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #eef5fc;
	box-shadow: none;
	color: var(--asrch-lens, #228ac8);
	line-height: 1;
	vertical-align: middle;
	cursor: pointer;
	animation: asrch-pulse 2.2s ease-out 0.8s 2;
}

.asrch-open.asrch-open:hover,
.asrch-open.asrch-open:focus {
	background: #e0eefb;
	border: 0;
	color: var(--asrch-lens, #228ac8);
}

.asrch-open.asrch-open:focus-visible {
	outline: 3px solid #228ac8;
	outline-offset: 2px;
}

.asrch-open.asrch-open svg {
	display: block;
	width: 26px;
	height: 26px;
	margin: 0;
	fill: none;
	stroke: currentColor;
}

.asrch-menu-item.asrch-menu-item {
	display: inline-flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0 6px;
}

.asrch-menu-item.asrch-menu-item::before,
.asrch-menu-item.asrch-menu-item::after {
	display: none;
}

.asrch-menu-item.asrch-mobile-item {
	align-self: center;
}

/* The button is taller than a line of menu text; this keeps the header as high as before. */
.asrch-menu-item.asrch-block-item {
	margin-block: -10px;
}

/* Block themes: keep the magnifier on the same line as the menu. */
.wp-block-navigation.asrch-has-icon:not(.is-vertical) {
	flex-wrap: nowrap;
}

.wp-block-navigation.asrch-has-icon:not(.is-vertical) > .wp-block-navigation__responsive-container:not(.is-menu-open) {
	flex: 0 1 auto;
	width: auto;
	min-width: 0;
}

html.asrch-lock {
	overflow: hidden;
}

#asrch-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: max(22px, 8vh) 14px 14px;
	background: rgba(8, 20, 48, 0.5);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: normal;
	text-align: start;
	text-transform: none;
}

#asrch-overlay[hidden] {
	display: none;
}

#asrch-overlay * {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

#asrch-overlay .asrch-pop {
	display: flex;
	flex-direction: column;
	width: min(640px, 100%);
	max-height: 100%;
	overflow: hidden;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 30px 70px rgba(0, 16, 50, 0.4);
	color: #14213d;
	animation: asrch-popin 0.22s ease;
}

#asrch-overlay .asrch-top {
	display: flex;
	flex: none;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-bottom: 1px solid #d9e2ee;
}

#asrch-overlay .asrch-poplens {
	display: grid;
	flex: none;
	place-items: center;
	color: var(--asrch-lens, #228ac8);
}

#asrch-overlay .asrch-poplens svg {
	width: 25px;
	height: 25px;
	fill: none;
}

#asrch-overlay .asrch-input {
	flex: 1;
	width: auto;
	min-width: 0;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 6px 2px;
	border: 0;
	border-radius: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: #14213d;
	font-size: 18px;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
}

#asrch-overlay .asrch-input::placeholder {
	color: #5f6e87;
	opacity: 1;
}

#asrch-overlay .asrch-input::-webkit-search-cancel-button {
	display: none;
}

#asrch-overlay .asrch-close {
	display: grid;
	flex: none;
	place-items: center;
	width: 34px;
	height: 34px;
	min-width: 0;
	min-height: 0;
	border: 0;
	border-radius: 8px;
	background: #eff4fa;
	box-shadow: none;
	color: #002060;
	line-height: 1;
	cursor: pointer;
}

#asrch-overlay .asrch-close:focus-visible {
	outline: 3px solid #228ac8;
	outline-offset: 2px;
}

#asrch-overlay .asrch-close svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
}

#asrch-overlay .asrch-body {
	flex: 1 1 auto;
	min-height: 70px;
	overflow: auto;
	padding: 8px 8px 6px;
}

#asrch-overlay .asrch-pop.is-busy .asrch-body {
	opacity: 0.55;
}

#asrch-overlay .asrch-results,
#asrch-overlay .asrch-results li {
	list-style: none;
}

#asrch-overlay .asrch-results li::before,
#asrch-overlay .asrch-results li::marker {
	content: none;
}

#asrch-overlay .asrch-result {
	display: block;
	padding: 11px 10px;
	border: 0;
	border-bottom: 1px solid #edf1f7;
	box-shadow: none;
	color: #14213d;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	overflow-wrap: anywhere;
}

#asrch-overlay .asrch-results li:last-child .asrch-result {
	border-bottom: 0;
}

#asrch-overlay .asrch-result:hover,
#asrch-overlay .asrch-result:focus {
	background: #f3f7fd;
	color: #14213d;
	text-decoration: none;
}

#asrch-overlay .asrch-result:focus-visible {
	outline: 2px solid #228ac8;
	outline-offset: -2px;
}

#asrch-overlay .asrch-pop[dir="rtl"] .asrch-result {
	text-align: right;
}

#asrch-overlay .asrch-message {
	padding: 22px;
	color: #506079;
	text-align: center;
}

#asrch-overlay .asrch-message:empty {
	display: none;
}

#asrch-overlay .asrch-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@keyframes asrch-pulse {
	0% { box-shadow: 0 0 0 0 rgba(63, 167, 224, 0.5); }
	70% { box-shadow: 0 0 0 12px rgba(63, 167, 224, 0); }
	100% { box-shadow: 0 0 0 0 rgba(63, 167, 224, 0); }
}

@keyframes asrch-popin {
	from { opacity: 0; transform: translateY(-10px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
	#asrch-overlay {
		padding: 12px 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.asrch-open.asrch-open,
	#asrch-overlay .asrch-pop {
		animation: none;
	}
}
