/* Al Mahjar Core — searchable dropdown (assets/select.js). The button copies the look of the select it replaces; palette tokens. */
.almahjar-sel {
	position: relative;
	display: block;
	width: 100%;
}
.almahjar-sel-native {
	position: absolute !important;
	inset-inline-start: 0;
	bottom: 0;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
	overflow: hidden;
}
.almahjar-sel-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--almahjar-line, rgba(0, 0, 0, 0.12));
	border-radius: 12px;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 1.3;
	text-align: start;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: pointer;
	box-sizing: border-box;
}
.almahjar-sel-btn:hover:not(:disabled) {
	border-color: color-mix(in srgb, currentColor 30%, transparent);
}
.almahjar-sel-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}
.almahjar-sel-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}
.almahjar-sel-txt {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	unicode-bidi: plaintext;
}
.almahjar-sel-btn.is-empty .almahjar-sel-txt {
	opacity: 0.55;
}
.almahjar-sel-arr {
	flex: none;
	width: 7px;
	height: 7px;
	margin-top: -3px;
	border-right: 1.6px solid currentColor;
	border-bottom: 1.6px solid currentColor;
	transform: rotate(45deg);
	opacity: 0.55;
	transition: transform 0.2s;
}
.almahjar-sel.is-open .almahjar-sel-arr {
	transform: rotate(225deg);
	margin-top: 3px;
}
.almahjar-sel-pop {
	position: absolute;
	top: calc(100% + 6px);
	inset-inline-start: 0;
	z-index: 40;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 220px;
	max-height: 300px;
	padding: 6px;
	background: #fff;
	color: #1b1715;
	border: 1px solid var(--almahjar-line, rgba(0, 0, 0, 0.1));
	border-radius: 14px;
	box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.28);
	box-sizing: border-box;
	animation: almahjar-sel-in 0.18s ease-out;
}
.almahjar-sel.is-up .almahjar-sel-pop {
	top: auto;
	bottom: calc(100% + 6px);
}
.almahjar-sel-pop[hidden] {
	display: none;
}
:has(> .almahjar-sel.is-open) {
	position: relative;
	z-index: 60;
}
@keyframes almahjar-sel-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
.almahjar-sel-q {
	flex: none;
	width: 100%;
	height: 38px;
	margin: 0 0 6px;
	padding: 0 12px;
	border: 1px solid var(--almahjar-line, rgba(0, 0, 0, 0.12));
	border-radius: 9px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: calc(14px * var(--almahjar-fs, 1));
	box-sizing: border-box;
}
.almahjar-sel-q:focus {
	outline: 2px solid color-mix(in srgb, currentColor 35%, transparent);
	outline-offset: 0;
}
.almahjar-sel-list {
	flex: 1;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: auto;
	list-style: none;
}
.almahjar-sel-list li[role="option"] {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0;
	padding: 9px 10px;
	border-radius: 9px;
	font-size: calc(14px * var(--almahjar-fs, 1));
	cursor: pointer;
	unicode-bidi: plaintext;
	text-align: start;
}
.almahjar-sel-list li[role="option"]:hover,
.almahjar-sel-list li.is-active {
	background: color-mix(in srgb, currentColor 6%, transparent);
}
.almahjar-sel-list li[aria-selected="true"] {
	font-weight: 600;
}
.almahjar-sel-list li[aria-selected="true"]::after {
	content: "";
	flex: none;
	width: 6px;
	height: 10px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-1px, -2px);
}
.almahjar-sel-list li[hidden] {
	display: none;
}
.almahjar-sel-none {
	padding: 12px 10px;
	font-size: calc(13.5px * var(--almahjar-fs, 1));
	opacity: 0.6;
	text-align: center;
}
@media (prefers-reduced-motion: reduce) {
	.almahjar-sel-pop {
		animation: none;
	}
	.almahjar-sel-arr {
		transition: none;
	}
}
