/* HAI Spotlight Zoek
   Vergrootglas in de header, met een spotlight-venster dat over de pagina komt. */

.hai-sz {
	display: flex;
	align-items: center;
}

.hai-sz__knop {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	line-height: 0;
	color: inherit;
	background: transparent;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: color 0.25s ease, background 0.25s ease, border-radius 0.25s ease;
}

.hai-sz__knop svg {
	width: 22px;
	height: 22px;
	display: block;
}

/* --- het venster --- */

.hai-sz__sluier {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 12vh 16px 16px;
	background: rgba(15, 15, 12, 0.55);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.hai-sz__sluier[hidden] { display: none; }
.hai-sz__sluier.is-open { opacity: 1; }

.hai-sz__paneel {
	width: 640px;
	max-width: 100%;
	max-height: 76vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	transform: translateY(-10px) scale(0.99);
	transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.hai-sz__sluier.is-open .hai-sz__paneel { transform: none; }

.hai-sz__balk {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	flex: 0 0 auto;
}

.hai-sz__balkicoon {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	opacity: 0.5;
}

/* De selectors zijn bewust specifiek: themas en de Elementor-kit stijlen elk
   input- en button-element, en dat lekt anders in het paneel. */
.hai-sz .hai-sz__paneel input.hai-sz__veld,
.hai-sz .hai-sz__paneel input.hai-sz__veld:focus {
	flex: 1 1 auto;
	border: none;
	outline: none;
	box-shadow: none;
	background: transparent;
	font-size: 18px;
	line-height: 1.3;
	padding: 0;
	margin: 0;
	min-width: 0;
	height: auto;
	border-radius: 0;
}

.hai-sz__veld::-webkit-search-cancel-button { display: none; }

.hai-sz .hai-sz__paneel button.hai-sz__sluit,
.hai-sz .hai-sz__paneel button.hai-sz__sluit:hover,
.hai-sz .hai-sz__paneel button.hai-sz__sluit:focus {
	flex: 0 0 auto;
	border: 1px solid rgba(0, 0, 0, 0.15);
	background: transparent;
	background-image: none;
	box-shadow: none;
	color: inherit;
	border-radius: 6px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 4px 8px;
	min-height: 0;
	cursor: pointer;
	opacity: 0.55;
	line-height: 1;
}

.hai-sz .hai-sz__paneel button.hai-sz__sluit:hover { opacity: 1; }

/* Laadstatus. Het zoeken kan een paar seconden duren en zonder teken van leven
   lijkt het stuk. De spinner vervangt het vergrootglas in de balk, zodat er niets
   verspringt. */
.hai-sz__spinner {
	display: none;
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	opacity: 0.55;
	animation: hai-sz-draai 0.7s linear infinite;
}

.hai-sz.is-bezig .hai-sz__spinner { display: block; }
.hai-sz.is-bezig .hai-sz__balkicoon { display: none; }

@keyframes hai-sz-draai { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.hai-sz__spinner { animation-duration: 2s; }
}

.hai-sz__hint {
	padding: 10px 18px;
	font-size: 13px;
	opacity: 0.6;
	flex: 0 0 auto;
}

.hai-sz__uitslag {
	overflow-y: auto;
	padding: 6px 0 10px;
	flex: 1 1 auto;
}

/* Geen opacity hier: die vecht met de kleurcontrol en maakt een donkere
   merkkleur alsnog bleek. Wil je hem zachter, kies dan een lichtere kleur. */
.hai-sz__groep {
	padding: 12px 18px 6px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #4F5052;
}

.hai-sz__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 18px;
	text-decoration: none;
	color: inherit;
}

.hai-sz__item:hover,
.hai-sz__item.is-actief { background: rgba(0, 0, 0, 0.05); }

.hai-sz__beeld {
	width: 44px;
	height: 44px;
	flex: 0 0 auto;
	object-fit: cover;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.06);
}

.hai-sz__titel {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hai-sz__leeg {
	padding: 22px 18px 26px;
	text-align: center;
	opacity: 0.6;
}

body.hai-sz-open { overflow: hidden; }

@media (max-width: 600px) {
	.hai-sz__sluier { padding: 6vh 10px 10px; }
	.hai-sz__paneel { max-height: 84vh; }
	.hai-sz__veld { font-size: 16px; }   /* voorkomt inzoomen op iOS */
	.hai-sz__sluit { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.hai-sz__sluier,
	.hai-sz__paneel { transition: none; }
}
