/**
 * BBK Recepten Zoeken
 * Pas de kleuren aan via de variabelen hieronder (of overschrijf ze in je thema).
 */

.bbk-rz {
	--bbk-rz-accent: #d61a1f;          /* Broil King rood */
	--bbk-rz-accent-hover: #b31418;
	--bbk-rz-text: #1c1c1c;
	--bbk-rz-muted: #6b6b6b;
	--bbk-rz-border: #dcdcdc;
	--bbk-rz-bg: #ffffff;
	--bbk-rz-radius: 8px;

	/* Volle breedte: de rij/sectie van je thema bepaalt hoe breed het wordt. */
	max-width: var(--bbk-rz-max-width, 100%);
	margin: 0 auto 2rem;
	color: var(--bbk-rz-text);
}

.bbk-rz *,
.bbk-rz *::before,
.bbk-rz *::after {
	box-sizing: border-box;
}

/* --- Zoekveld ------------------------------------------------------- */

.bbk-rz__field {
	display: flex;
	align-items: stretch;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.bbk-rz__control {
	position: relative;
	display: flex;
	flex: 1 1 260px;
	min-width: 0;
}

.bbk-rz__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	fill: var(--bbk-rz-muted);
	pointer-events: none;
	z-index: 1;
}

.bbk-rz__input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	margin: 0;
	padding: 0.85rem 2.6rem 0.85rem 2.75rem;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--bbk-rz-text);
	background: var(--bbk-rz-bg);
	border: 1px solid var(--bbk-rz-border);
	border-radius: var(--bbk-rz-radius);
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.bbk-rz__input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.bbk-rz__input:focus {
	outline: none;
	border-color: var(--bbk-rz-accent);
	box-shadow: 0 0 0 3px rgba(214, 26, 31, 0.15);
}

.bbk-rz__clear {
	position: absolute;
	right: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	padding: 0;
	font-size: 20px;
	line-height: 1;
	color: var(--bbk-rz-muted);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	z-index: 2;
}

.bbk-rz__clear:hover {
	color: var(--bbk-rz-text);
	background: rgba(0, 0, 0, 0.06);
}

.bbk-rz__submit {
	flex: 0 0 auto;
	padding: 0.85rem 1.6rem;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
	background: var(--bbk-rz-accent);
	border: 0;
	border-radius: var(--bbk-rz-radius);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.bbk-rz__submit:hover,
.bbk-rz__submit:focus {
	background: var(--bbk-rz-accent-hover);
	color: #fff;
}

/* --- Status --------------------------------------------------------- */

.bbk-rz__status {
	margin: 0.85rem 0 0;
	font-size: 0.9rem;
	color: var(--bbk-rz-muted);
}

.bbk-rz__status[hidden] {
	display: none;
}

.bbk-rz.is-loading .bbk-rz__status::after {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-left: 8px;
	vertical-align: -1px;
	border: 2px solid var(--bbk-rz-border);
	border-top-color: var(--bbk-rz-accent);
	border-radius: 50%;
	animation: bbk-rz-spin 0.7s linear infinite;
}

@keyframes bbk-rz-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.bbk-rz.is-loading .bbk-rz__status::after {
		animation-duration: 2s;
	}
}

/* --- Filtermodus: resultaten in het bestaande overzicht -------------- */

/* Het eigen resultatenblok is dan niet nodig. */
.bbk-rz--mode-filter .bbk-rz__results {
	display: none;
}

/* Het overzicht dimt licht terwijl er gezocht wordt. */
.bbk-rz-loading {
	opacity: 0.45;
	transition: opacity 0.15s ease;
}

.bbk-rz__empty {
	margin: 0;
	padding: 2rem 0;
	font-size: 1rem;
	color: var(--bbk-rz-muted, #6b6b6b);
}

/* --- Resultaten ----------------------------------------------------- */

.bbk-rz__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}

.bbk-rz--cols-1 .bbk-rz__list { grid-template-columns: minmax(0, 1fr); }
.bbk-rz--cols-2 .bbk-rz__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bbk-rz--cols-4 .bbk-rz__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.bbk-rz__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bbk-rz__item::before {
	content: none;
}

.bbk-rz__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	background: var(--bbk-rz-bg);
	border: 1px solid var(--bbk-rz-border);
	border-radius: var(--bbk-rz-radius);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bbk-rz__link:hover,
.bbk-rz__link:focus {
	color: inherit;
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.bbk-rz__media {
	display: block;
	position: relative;
	padding-top: 62%;
	overflow: hidden;
	background: #f2f2f2;
}

.bbk-rz__media .bbk-rz__thumb,
.bbk-rz__placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bbk-rz__placeholder {
	background: repeating-linear-gradient(45deg, #f4f4f4, #f4f4f4 10px, #ededed 10px, #ededed 20px);
}

.bbk-rz__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 1rem 1.15rem 1.15rem;
}

.bbk-rz__cat {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bbk-rz-accent);
}

.bbk-rz__title {
	display: block;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
}

.bbk-rz__excerpt {
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--bbk-rz-muted);
}

.bbk-rz__more {
	display: inline-block;
	margin-top: auto;
	padding-top: 0.85rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--bbk-rz-accent);
}

.bbk-rz__more::after {
	content: " \2192";
}

/* Lijstweergave (columns="1") */
.bbk-rz--cols-1 .bbk-rz__link {
	flex-direction: row;
	align-items: stretch;
}

.bbk-rz--cols-1 .bbk-rz__media {
	flex: 0 0 190px;
	padding-top: 0;
	min-height: 130px;
}

.bbk-rz--cols-1 .bbk-rz__body {
	flex: 1 1 auto;
}

/* --- Alle resultaten ------------------------------------------------ */

.bbk-rz__all {
	margin: 1.75rem 0 0;
	text-align: center;
}

.bbk-rz__all[hidden] {
	display: none;
}

.bbk-rz__loadmore.is-loading,
.bbk-rz__all-link.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.bbk-rz__all-link {
	display: inline-block;
	padding: 0.7rem 1.5rem;
	font-weight: 700;
	color: var(--bbk-rz-accent);
	text-decoration: none;
	border: 2px solid var(--bbk-rz-accent);
	border-radius: var(--bbk-rz-radius);
}

.bbk-rz__all-link:hover,
.bbk-rz__all-link:focus {
	color: #fff;
	background: var(--bbk-rz-accent);
}

/* --- Toegankelijkheid ----------------------------------------------- */

.bbk-rz .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
	border: 0;
}

/* --- Responsive ------------------------------------------------------ */

@media (max-width: 900px) {
	.bbk-rz__list,
	.bbk-rz--cols-3 .bbk-rz__list,
	.bbk-rz--cols-4 .bbk-rz__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.bbk-rz__list,
	.bbk-rz--cols-2 .bbk-rz__list,
	.bbk-rz--cols-3 .bbk-rz__list,
	.bbk-rz--cols-4 .bbk-rz__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.bbk-rz__submit {
		flex: 1 1 100%;
	}

	.bbk-rz--cols-1 .bbk-rz__link {
		flex-direction: column;
	}

	.bbk-rz--cols-1 .bbk-rz__media {
		flex: 0 0 auto;
		padding-top: 62%;
		min-height: 0;
	}
}
