/* Listings — results: tab switch, active-filter bullets, scroll loader, pagination.
   Cascade order is fixed in ListingsModule::STYLES. */

/* shared taxonomy archive (tabs) */
/* Both panels stay in the DOM for SEO; the inactive one is display:none. */

/* The wrapper owns the break-out; the nested panels must NOT break out again. */
/* Break out against the VIEWPORT (margin-inline:auto), not calc(50% - 45vw):
   that form depends on the parent width and flips positive on /ontdek/ pages. */
.mf-taxarchive {
	width: 90vw;
	max-width: 90vw;
	margin-inline: auto;
	padding-top: 8px;
	padding-bottom: 60px;
}
.mf-taxarchive .mf-archive {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
	padding-top: 0;
	padding-bottom: 0;
}

/* Segmented control: a pill track with a sliding thumb behind the active tab. */
.mf-taxarchive__switch {
	position: relative;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	gap: 0;
	width: max-content;
	max-width: 100%;
	margin: 0 0 26px;
	padding: 5px;
	border: 1px solid var(--mf-line);
	border-radius: 999px;
	background: var(--mf-card-bg);
	box-shadow: inset 0 1px 2px rgba(2, 7, 13, 0.04);
}

/* JS mirrors the active tab onto the switch via .is-coaches. */
.mf-taxarchive__thumb {
	position: absolute;
	top: 5px;
	bottom: 5px;
	left: 5px;
	width: calc(50% - 5px);
	border-radius: 999px;
	background: var(--mf-selected);
	box-shadow: 0 4px 14px rgba(40, 136, 255, 0.28);
	transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}
.mf-taxarchive__switch.is-coaches .mf-taxarchive__thumb {
	transform: translateX(100%);
}

.mf-taxarchive__tab {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 150px;
	padding: 11px 26px;
	border-radius: 999px;
	background: transparent;
	color: var(--mf-navy);
	font: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}
.mf-taxarchive__tab:hover { color: var(--mf-blue); }
.mf-taxarchive__tab.is-active,
.mf-taxarchive__tab.is-active:hover { color: var(--mf-selected-on) !important; }
.mf-taxarchive__tab:focus-visible {
	outline: 2px solid var(--mf-blue);
	outline-offset: 3px;
}

/* Count badge. Inherits contrast from the tab's active state. */
.mf-taxarchive__tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	border-radius: 999px;
	background: var(--mf-light-blue);
	color: var(--mf-blue);
	font-size: 0.76rem;
	font-weight: 700;
	line-height: 1;
	transition: background 0.2s ease, color 0.2s ease;
}
.mf-taxarchive__tab.is-active .mf-taxarchive__tab-count {
	background: rgba(255, 255, 255, 0.22);
	color: var(--mf-white);
}

.mf-taxarchive__panel[hidden] { display: none; }

.mf-taxarchive__panel .mf-archive__header { display: none; }

@media (max-width: 600px) {
	.mf-taxarchive__switch {
		width: 100%;
	}
	.mf-taxarchive__tab {
		min-width: 0;
		padding: 12px 14px;
		font-size: 0.92rem;
	}
}

/* results */

/* Removable "active filter" pill for a term archive's own term. */
.mf-active-filter {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	flex-wrap: wrap;
}
.mf-active-filter__label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--mf-muted);
}
.mf-active-filter__pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	border: 1px solid var(--mf-blue);
	border-radius: 999px;
	background: var(--mf-light-blue);
	color: var(--mf-navy);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.16s ease, color 0.16s ease;
}
.mf-active-filter__pill:hover {
	background: var(--mf-blue);
	color: var(--mf-white);
}
.mf-active-filter__x { font-size: 1.15rem; line-height: 1; }

/* Active-filter bullets — built and kept in sync by JS from the live control state. */
.mf-active-filters {
	margin: 12px 0 22px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

/* `hidden` alone isn't enough: display:flex above beats it and the margins still
   count. Zero the box so the quickfilters sit tight under the bar. */
.mf-active-filters[hidden] {
	display: none !important;
	margin: 0;
}

.mf-active-filters__label {
	flex: 0 0 auto;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--mf-muted);
}

.mf-active-filters__list {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 10px;
}

.mf-active-filters__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px 6px 14px;
	border: 1px solid var(--mf-line);
	border-radius: 999px;
	background: var(--mf-card-bg);
	box-shadow: var(--mf-shadow);
}

.mf-active-filters__text {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--mf-navy);
	line-height: 1.2;
}

/* The clear red × — a solid red circle so removing a single filter is obvious. */
.mf-active-filters__x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--mf-fav-red, #e0526b);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.mf-active-filters__x:hover {
	background: var(--mf-fav-red-deep, #c73f57);
	transform: scale(1.08);
}

.mf-active-filters__x:focus-visible {
	outline: 2px solid var(--mf-fav-red, #e0526b);
	outline-offset: 2px;
}

.mf-archive__results {
	position: relative;
	transition: opacity 0.15s ease;
}

.mf-archive__results.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* scroll loader */

.mf-scroll-sentinel {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 0 8px;
	min-height: 40px;
}

.mf-scroll-sentinel[hidden] {
	display: none;
}

.mf-scroll-spinner {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 3px solid var(--mf-mid-blue);
	border-top-color: var(--mf-blue);
	animation: mf-spin 0.7s linear infinite;
}

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

/* Crawlable next-page links: off-screen, not display:none, so Googlebot follows them. */
.mf-crawl-links {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* pagination */

.mf-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 36px;
}

.mf-pagination__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid var(--mf-line);
	border-radius: 10px;
	background: var(--mf-card-bg);
	color: var(--mf-navy);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.mf-pagination__page:hover {
	border-color: var(--mf-blue);
}

.mf-pagination__page.is-active {
	background: var(--mf-navy);
	color: var(--mf-white);
	border-color: var(--mf-navy);
}

/* Widen notice — the only thing explaining why a "Brugge" filter shows Kortrijk cards. */
.mf-widen-notice {
	margin: 0 0 18px;
	padding: 12px 16px;
	border: 1px solid var(--mf-line);
	border-left: 4px solid var(--mf-blue, #4a7dbd);
	border-radius: 10px;
	background: var(--mf-card-bg);
	color: var(--mf-navy);
	font-size: 0.92rem;
	line-height: 1.45;
}

.mf-widen-notice strong {
	font-weight: 700;
}

/* Empty-state recovery: the visitor's filters as removable chips (filled by archive.js). */
.mf-empty-recovery {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 12px;
	margin: 0 0 32px;
}

.mf-empty-recovery[hidden] {
	display: none !important;
}

.mf-empty-recovery__label {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--mf-muted);
}

.mf-empty-recovery__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 10px;
}

.mf-empty-recovery__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px 6px 14px;
	border: 1px solid var(--mf-line);
	border-radius: 999px;
	background: var(--mf-card-bg);
	box-shadow: var(--mf-shadow);
}

.mf-empty-recovery__text {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--mf-navy);
	line-height: 1.2;
}

.mf-empty-recovery__x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--mf-fav-red, #e0526b);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.mf-empty-recovery__x:hover {
	background: var(--mf-fav-red-deep, #c73f57);
	transform: scale(1.08);
}

.mf-empty-recovery__x:focus-visible {
	outline: 2px solid var(--mf-fav-red, #e0526b);
	outline-offset: 2px;
}
