/* Dreamkit Federated Search — front-end widget.
   Leans on Dreamkit-theme CSS custom properties where present, with safe
   fallbacks so the widget also stands on a bare theme. */

.wings-search {
	--ws-gap: 1rem;
	--ws-radius: 8px;
	/* Fixed light border + grey muted so the widget reads cleanly on any theme.
	   Accent defaults to the theme's near-black "neutral" (BIJ1: #282625) so the
	   white-text button + badge stay legible — never the brand's bright primary
	   (BIJ1 primary is yellow, which would be unreadable with white text). */
	--ws-border: #e2e2e2;
	--ws-muted: #6b6b6b;
	--ws-accent: var(--wp--preset--color--neutral, #1a1a1a);
	/* The afdelingen ("andere sites") block gets its own colour so it reads as
	   clearly distinct from this site's own results. Deeper cyan stays legible
	   as heading text on white; the panel is a light cyan tint. */
	--ws-other-accent: #0b7da3;
	--ws-other-bg: #eaf7fc;
	margin-block: var(--ws-gap);
}

.wings-search__form {
	display: flex;
	gap: 0.5rem;
}

.wings-search__input {
	flex: 1 1 auto;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	font-size: 1rem;
}

.wings-search__submit {
	flex: 0 0 auto;
	padding: 0.6rem 1.1rem;
	border: 0;
	border-radius: var(--ws-radius);
	background: var(--ws-accent);
	color: #fff;
	cursor: pointer;
}

.wings-search__results {
	margin-top: var(--ws-gap);
}

.wings-search__status,
.wings-search__empty {
	color: var(--ws-muted);
	font-style: italic;
}

.wings-search__group + .wings-search__group {
	margin-top: 1.5rem;
}

/* The "andere afdelingen" block on a national site: a tinted, colour-accented
   panel so it's unmistakably a different section from this site's own results. */
.wings-search__group--others {
	margin-top: 2rem;
	padding: 1.1rem 1.15rem 1.3rem;
	background: var(--ws-other-bg);
	border-left: 5px solid var(--ws-other-accent);
	border-radius: 10px;
}

.wings-search__group-title {
	margin: 0 0 0.7rem;
	padding-left: 0.55rem;
	border-left: 4px solid var(--ws-accent);
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ws-accent);
}

/* Own block on a national site reads as "this website"; the afdelingen block
   carries the cyan accent on its heading + marker. */
.wings-search__group--others .wings-search__group-title {
	color: var(--ws-other-accent);
	border-left-color: var(--ws-other-accent);
}

.wings-search__list {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.wings-search__hit {
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
	padding: 0.7rem;
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease;
}

.wings-search__hit:hover,
.wings-search__hit:focus-visible {
	border-color: var(--ws-accent);
}

.wings-search__hit-thumb {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 6px;
	background-size: cover;
	background-position: center;
}

.wings-search__hit-body {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.wings-search__hit-title {
	font-weight: 600;
	line-height: 1.3;
}

.wings-search__hit-excerpt {
	font-size: 0.9rem;
	color: var(--ws-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Badge marking a hit from another site (e.g. landelijk on a local site). */
.wings-search__badge {
	align-self: flex-start;
	margin-top: 0.15rem;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	background: var(--ws-accent);
	color: #fff;
}
