/**
 * SchoolWiki Search - opmaak van het blok op de zoekresultatenpagina.
 *
 * Het blok staat bewust buiten Salient's #search-results: die container wordt
 * met isotope/packery uitgelegd en houdt zijn articles op opacity 0 tot dat
 * script klaar is. Daarom staat hier een complete, zelfstandige opmaak in
 * plaats van meeliften op de themastyling.
 *
 * Alles is laag in specificiteit gehouden zodat je het eenvoudig kunt
 * overschrijven vanuit je child theme.
 */

/* Alleen-voor-schermlezers. De meeste thema's leveren .screen-reader-text zelf,
   maar daar willen we niet van afhangen: zonder deze regel staat "(opent in een
   nieuw tabblad)" gewoon zichtbaar in de titel. */
.sws-results .screen-reader-text,
.sws-form .screen-reader-text,
.sws-pagination .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

body.search-results .container-wrap .main-content {
	padding-top: 10em !important;
}

/* Zoekformulier van de shortcode [zoekresultaten]. */
.sws-form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 30px;
}

.sws-form__input {
	flex: 1 1 240px;
	min-width: 0;
	padding: 10px 14px;
	border: 1px solid rgba(128, 128, 128, 0.4);
	border-radius: 3px;
	font-size: 16px;
}

.sws-form__button {
	flex: 0 0 auto;
	padding: 10px 22px;
	border: 0;
	border-radius: 3px;
	cursor: pointer;
	font-size: 15px;
	color: #000 !important;
}

/* Kop van de zoekresultatenpagina, voor wie er een eigen template omheen zet. */
.sws-page__header {
	margin: 40px 0 10px;
}

.sws-page__title {
	margin: 0 0 6px;
}

.sws-page__title span {
	opacity: 0.65;
}

.sws-page__count {
	margin: 0;
	font-size: 14px;
	opacity: 0.7;
}

.sws-results {
	margin: 40px 0;
	clear: both;
}

.sws-results__heading {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(128, 128, 128, 0.3);

}

.sws-results__count {
	font-size: 14px;
	font-weight: normal;
	opacity: 0.6;
}

.sws-results__count-line {
	margin: 0 0 20px;
	font-size: 16px;
	opacity: 0.8;
	padding: 0;
}

/* Regel boven het raster: tekst links, sorteerkeuze rechts. */
.sws-results__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	margin-bottom: 20px;
}

.sws-results__bar .sws-results__count-line {
	margin: 0;
}

.sws-sort {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.sws-sort__label {
	font-size: 14px;
	opacity: 0.8;
	white-space: nowrap;
}

.sws-sort__select {
	max-width: 100%;
	padding: 6px 10px;
	border: 1px solid rgba(128, 128, 128, 0.4);
	border-radius: 30px;
	background-color: transparent;
	color: inherit;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;

	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 34px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 10px 6px;
}


.sws-results__error,
.sws-results__empty {
	opacity: 0.7;
}

/* Grid: maximaal 3 kaarten naast elkaar, net als de masonry van het thema. */
.sws-results__grid {
	display: grid;
	grid-template-columns: repeat(var(--sws-columns, 3), minmax(0, 1fr));
	gap: 20px;
}

/* Eén resultaat, als kaart. */
.sws-result {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 0;
	border-radius: 10px;
	/* Achtergrond en tekstkleur horen bij elkaar: een witte kaart heeft donkere
	   tekst nodig, ook wanneer het thema zelf een donkere huid draagt. */
	background-color: #fff;
	color: #333;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sws-result:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.sws-result__thumb {
	display: block;
	overflow: hidden;
	line-height: 0;
	background-color: rgba(128, 128, 128, 0.12);
}

.sws-result__thumb img {
	display: block;
	width: 100%;
	height: 160px;
	object-fit: cover;
	object-position: top center;
}

.sws-result__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	padding: 14px 16px 18px;
}

.sws-result__meta {
	margin: 0;
	line-height: 1;
}

.sws-result__title {
	margin: 0 0 8px;
/*	font-size: 18px !important;
	line-height: 1.35 !important;*/
	color: inherit;
}

.sws-result__title a {
	text-decoration: none;
	color: inherit;
}

/* Maakt de hele kaart klikbaar, zonder een tweede link in de DOM. */
.sws-result__title a::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

.sws-result:hover .sws-result__title a {
	text-decoration: underline;
}

.sws-result__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
/*	font-size: var(--nectar-body-font-size);
	line-height: var(--nectar-body-line-height);*/
}

.sws-result mark {
	padding: 0 2px;
	background-color: rgba(255, 226, 0, 0.35);
	color: inherit;
}

/* Labels op een kaart: bron ("Schoolgids" / "Website") en type ("Document").
   Ze zien er bewust identiek uit. Neutraal grijs met alfa, zodat ze op een
   lichte en donkere ondergrond leesbaar blijven. */
.sws-source {
		display: inline-block;
		margin: 0 6px 0 0;
		padding: 2px 8px;
		border-radius: 30px;
		color: #99AA81;
		font-size: 12px;
		font-weight: 600;
		font-family: DTLProkyonTBold;
		line-height: 1.7;
		text-transform: none;
		letter-spacing: 0;
		vertical-align: middle;
		white-space: nowrap;
		border: 2px solid #C5DBA6;
	}

	.sws-source--website {
		border: 2px solid #C9BFD4;
		color: #AAA2B3;
	}


/* Bronlabel bij de WordPress-resultaten in Salient's eigen lijst. Daar staat
   het span-je achter de titel absoluut gepositioneerd; dat draaien we terug. */
#search-results .result .title span.sws-source {
	position: static;
	display: inline-block;
	float: none;
	margin: 3px 6px 0 0;
	color: inherit;
	opacity: 1;
}

@media only screen and (max-width: 1200px) {
	.sws-results__grid {
		grid-template-columns: repeat(min(var(--sws-columns, 3), 3), minmax(0, 1fr));
	}
}

@media only screen and (max-width: 999px) {
	.sws-results__grid {
		grid-template-columns: repeat(min(var(--sws-columns, 3), 2), minmax(0, 1fr));
	}
}

@media only screen and (max-width: 690px) {
	.sws-results__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.sws-result__thumb img {
		height: 140px;
	}
}


/* Paginering onder de resultaten van de site zelf. */
.sws-pagination {
	margin-top: 30px;
}

.sws-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.sws-pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid rgba(128, 128, 128, 0.3);
	border-radius: 3px;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
}

.sws-pagination .page-numbers.current {
	background-color: rgba(128, 128, 128, 0.15);
	font-weight: 600;
}

.sws-pagination .page-numbers.dots {
	border-color: transparent;
}

#q {
	border-radius: 30px;
	font-weight: 600;
	background-color: #fff;
	padding-left: 20px;
}

