/*
 * Al Duffa · search pop-up.
 * Uses the design's own tokens (--navy, --gold, --display, …) from alduffa-site.css.
 */
html.ald-s-lock { overflow: hidden; }

.ald-s {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: clamp(14px, 8vh, 88px) 16px 16px;
	background: rgba(6, 24, 42, 0);
	-webkit-backdrop-filter: blur(0);
	backdrop-filter: blur(0);
	transition: background .3s ease, backdrop-filter .3s ease, -webkit-backdrop-filter .3s ease;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.ald-s[hidden] { display: none; }
.ald-s.open {
	background: rgba(6, 24, 42, .74);
	-webkit-backdrop-filter: blur(10px) saturate(1.1);
	backdrop-filter: blur(10px) saturate(1.1);
}

/* ---- panel ---- */
.ald-s-panel {
	position: relative;
	width: min(800px, 100%);
	background: var(--bg-2);
	border-radius: 26px;
	box-shadow: 0 44px 100px rgba(3, 15, 28, .5), 0 0 0 1px rgba(255, 255, 255, .07);
	overflow: hidden;
	opacity: 0;
	transform: translateY(22px) scale(.985);
	transition: opacity .28s ease, transform .38s cubic-bezier(.2, .85, .25, 1);
}
.ald-s.open .ald-s-panel { opacity: 1; transform: none; }

/* ---- top (navy) ---- */
.ald-s-top {
	position: relative;
	padding: 34px 34px 30px;
	color: #fff;
	background:
		radial-gradient(circle at 92% -10%, rgba(199, 161, 91, .34), transparent 46%),
		linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
	overflow: hidden;
}
.ald-s-top::before {
	content: "";
	position: absolute;
	inset-inline-start: -70px;
	bottom: -90px;
	width: 220px;
	height: 220px;
	border: 2px solid rgba(199, 161, 91, .32);
	border-radius: 50%;
	pointer-events: none;
}
.ald-s-top > * { position: relative; }
.ald-s-eyebrow { color: var(--gold); }
.ald-s-title {
	margin-top: 10px;
	font-size: clamp(1.7rem, 4vw, 2.4rem);
	line-height: 1.1;
	color: #fff;
	max-width: 18ch;
}
.ald-s-close {
	position: absolute;
	top: 18px;
	inset-inline-end: 18px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .28);
	background: rgba(255, 255, 255, .08);
	color: #fff;
	transition: background .18s ease, transform .18s ease;
}
.ald-s-close:hover { background: rgba(255, 255, 255, .18); transform: rotate(90deg); }

/* ---- the search field ---- */
.ald-s-form { margin-top: 24px; }
.ald-s-field {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 7px 7px 20px;
	padding-inline: 20px 7px;
	background: #fff;
	border: 2px solid transparent;
	border-radius: 18px;
	box-shadow: 0 16px 36px rgba(0, 0, 0, .28);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.ald-s-field:focus-within {
	border-color: var(--gold);
	box-shadow: 0 16px 36px rgba(0, 0, 0, .28), 0 0 0 5px rgba(199, 161, 91, .25);
}
.ald-s-ico { flex: none; color: var(--navy-soft); }
.ald-s-input {
	flex: 1;
	min-width: 0;
	height: 52px;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--navy);
	font: 500 1.2rem var(--body);
	caret-color: var(--gold-deep);
	-webkit-appearance: none;
	appearance: none;
}
.ald-s-input::placeholder { color: #8a9aa3; font-weight: 400; }
.ald-s-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ald-s-clear {
	flex: none;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: var(--bg-3);
	color: var(--muted);
}
.ald-s-clear:hover { background: var(--line); color: var(--navy); }
.ald-s-go {
	flex: none;
	display: grid;
	place-items: center;
	width: 50px;
	height: 50px;
	border: 0;
	border-radius: 14px;
	background: var(--gold);
	color: #18252b;
	transition: background .18s ease, transform .18s ease;
}
.ald-s-go:hover { background: #d3b06d; transform: translateX(2px); }
html[dir="rtl"] .ald-s-arrow { transform: scaleX(-1); }
html[dir="rtl"] .ald-s-go:hover { transform: translateX(-2px); }

/* ---- body ---- */
.ald-s-body {
	padding: 22px 26px 8px;
	max-height: min(52vh, 480px);
	min-height: 150px;
	overflow-y: auto;
	scrollbar-width: thin;
}
.ald-s-label {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--gold-deep);
}
html[dir="rtl"] .ald-s-label { letter-spacing: 0; }
.ald-s-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ald-s-group + .ald-s-group { margin-top: 20px; }

/* popular searches */
.ald-s-chips { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 14px; }
.ald-s-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--bg);
	color: var(--navy);
	font: 600 .9rem var(--body);
	transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease;
}
.ald-s-chip::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--gold);
}
.ald-s-chip:hover { background: var(--navy); color: #fff; border-color: var(--navy); transform: translateY(-2px); }

/* result rows */
.ald-s-list { display: flex; flex-direction: column; gap: 4px; }
.ald-s-item {
	display: grid;
	grid-template-columns: 46px 1fr auto;
	align-items: center;
	gap: 16px;
	padding: 12px 14px;
	border-radius: 16px;
	border-inline-start: 3px solid transparent;
	text-decoration: none;
	color: var(--ink);
	transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.ald-s-item:hover,
.ald-s-item.is-active {
	background: var(--bg-3);
	border-inline-start-color: var(--gold);
	transform: translateX(3px);
}
html[dir="rtl"] .ald-s-item:hover,
html[dir="rtl"] .ald-s-item.is-active { transform: translateX(-3px); }
.ald-s-item:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ald-s-ic {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: var(--teal-soft);
	color: var(--teal);
	overflow: hidden;
}
.ald-s-ic svg { width: 22px; height: 22px; }
.ald-s-ic img { width: 100%; height: 100%; object-fit: cover; }
.ald-s-ic.t-design_program, .ald-s-ic.t-program { background: var(--navy); color: #e6c578; }
.ald-s-ic.t-design_event, .ald-s-ic.t-event { background: var(--gold-soft); color: var(--gold-deep); }
.ald-s-ic.t-design_initiative { background: #e4efed; color: var(--teal); }
.ald-s-ic.t-post { background: var(--bg-3); color: var(--navy-soft); }
.ald-s-txt { min-width: 0; }
.ald-s-name {
	display: block;
	font: 400 1.14rem/1.25 var(--display);
	color: var(--navy);
	letter-spacing: -.01em;
}
html[dir="rtl"] .ald-s-name { font-family: var(--arabic); font-weight: 700; }
.ald-s-ex {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 3px;
	font-size: .86rem;
	line-height: 1.5;
	color: var(--muted);
}
.ald-s-go2 { color: var(--gold-deep); opacity: 0; transition: opacity .16s ease, transform .16s ease; }
.ald-s-item:hover .ald-s-go2,
.ald-s-item.is-active .ald-s-go2 { opacity: 1; transform: translateX(3px); }
html[dir="rtl"] .ald-s-go2 { transform: scaleX(-1); }
.ald-s mark {
	padding: 0 3px;
	border-radius: 4px;
	background: var(--gold-soft);
	color: inherit;
	box-shadow: inset 0 -2px 0 var(--gold);
}

/* loading */
.ald-s-skel { display: grid; grid-template-columns: 46px 1fr; gap: 16px; padding: 12px 14px; }
.ald-s-skel i,
.ald-s-skel b,
.ald-s-skel u {
	display: block;
	border-radius: 10px;
	background: linear-gradient(90deg, var(--bg-3) 25%, #f6f9f9 50%, var(--bg-3) 75%);
	background-size: 200% 100%;
	animation: ald-s-shimmer 1.2s linear infinite;
}
.ald-s-skel i { width: 46px; height: 46px; border-radius: 14px; grid-row: span 2; }
.ald-s-skel b { height: 16px; width: 58%; }
.ald-s-skel u { height: 12px; width: 88%; text-decoration: none; }
@keyframes ald-s-shimmer { to { background-position: -200% 0; } }

/* nothing found */
.ald-s-empty { text-align: center; padding: 22px 10px 14px; }
.ald-s-empty-ic {
	display: grid;
	place-items: center;
	width: 68px;
	height: 68px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: var(--gold-soft);
	color: var(--gold-deep);
}
.ald-s-empty h3 { font-size: 1.35rem; color: var(--navy); }
.ald-s-empty p { margin: 8px auto 18px; max-width: 42ch; color: var(--muted); font-size: .92rem; }
.ald-s-empty .ald-s-chips { justify-content: center; }

/* ---- footer ---- */
.ald-s-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 26px;
	border-top: 1px solid var(--line);
	background: var(--bg);
	font-size: .78rem;
	color: var(--muted);
}
.ald-s-keys { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.ald-s-keys > span { display: inline-flex; align-items: center; gap: 5px; }
.ald-s kbd {
	display: inline-grid;
	place-items: center;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	border: 1px solid var(--line);
	border-bottom-width: 2px;
	border-radius: 7px;
	background: #fff;
	color: var(--navy);
	font: 600 .72rem var(--body);
}
.ald-s-all[hidden] { display: none; }

@media (max-width: 640px) {
	.ald-s { padding: 0; }
	.ald-s-panel { border-radius: 0 0 24px 24px; }
	.ald-s-top { padding: 26px 20px 22px; }
	.ald-s-body { padding: 18px 14px 6px; max-height: calc(100vh - 340px); }
	.ald-s-item { grid-template-columns: 40px 1fr; gap: 12px; padding: 10px; }
	.ald-s-ic { width: 40px; height: 40px; border-radius: 12px; }
	.ald-s-go2 { display: none; }
	.ald-s-keys { display: none; }
	.ald-s-foot { justify-content: flex-end; padding: 12px 16px; }
	.ald-s-input { font-size: 1.05rem; height: 48px; }
	.ald-s-go { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
	.ald-s, .ald-s-panel, .ald-s-item, .ald-s-chip, .ald-s-close, .ald-s-go { transition: none; }
	.ald-s-skel i, .ald-s-skel b, .ald-s-skel u { animation: none; }
}
