/*
 * The section strip above a post list (eu_filter_bar() in inc/blocks.php, used by the
 * blocks Beitragsfilter and Pressespiegel): sections on the left, topic and outlet as
 * dropdowns that read as text on the right, between two thin rules like a newspaper's
 * section bar. The page title above it is styled in main.css ("List pages").
 */
.eu-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0 2rem;
	box-sizing: border-box;
	margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
	border-top: 1px solid var(--eu-black);
	border-bottom: 1px solid var(--eu-black);
	color: var(--eu-black);
	scroll-margin-top: calc(var(--eu-header-h) + 1rem);
}

.eu-filters__nav {
	display: flex;
	gap: 1.75rem;
	min-width: 0;
	max-width: 100%;
	/* One row that scrolls sideways when the sections don't fit. */
	overflow-x: auto;
	scrollbar-width: none;
}
.eu-filters__nav::-webkit-scrollbar { display: none; }
.eu-filters__link {
	position: relative;
	display: flex;
	flex: none;
	align-items: center;
	min-height: 3.25rem;
	color: var(--eu-grey);
	font-size: .9375rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: color .2s;
}
.eu-filters__link:hover,
.eu-filters__link.is-active { color: var(--eu-black); }
/* A bar in the section's colour hangs from the top rule above the current section. */
.eu-filters__link::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 5px;
	background: var(--eu-accent);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform .2s var(--eu-ease);
}
.eu-filters__link:hover::before { transform: scaleY(.4); }
.eu-filters__link.is-active::before { transform: none; }
/* The scrolling row would clip a focus outline, so keyboard focus underlines the label. */
.eu-filters__link:focus-visible {
	outline: 0;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: .3em;
}

.eu-filters__form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem 1.75rem;
	min-height: 3.25rem;
	margin: 0;
}
.eu-filters__field { display: inline-flex; align-items: baseline; gap: .6rem; cursor: pointer; }
.eu-filters__label {
	color: var(--eu-grey);
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}
/* A dropdown that reads as text: bold value, thin underline, small chevron. */
.eu-filters__select {
	field-sizing: content;
	min-width: 0;
	max-width: 15rem;
	padding: .2rem 1.35rem .2rem 0;
	border: 0;
	border-bottom: 1px solid var(--eu-black);
	border-radius: 0;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23212121' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right center / .85rem;
	color: var(--eu-black);
	font: inherit;
	font-size: .9375rem;
	font-weight: 700;
	line-height: 1.4;
	text-overflow: ellipsis;
	appearance: none;
	cursor: pointer;
}
.eu-filters__select:hover { color: var(--eu-red-text); }
.eu-filters__select:has(option:checked:not([value=""])) { border-bottom-color: var(--eu-red); color: var(--eu-red-text); }
.eu-filters__select option { color: var(--eu-black); }
.eu-filters__submit {
	padding: .35rem .9rem;
	border: 0;
	background: var(--eu-black);
	color: #fff;
	font: inherit;
	font-size: .8125rem;
	font-weight: 700;
	cursor: pointer;
}
/* With JavaScript the dropdowns submit on change. */
.js [data-eu-autosubmit] .eu-filters__submit { display: none; }
.eu-filters__reset {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	color: var(--eu-red-text);
	font-size: .8125rem;
	font-weight: 700;
	text-decoration: none;
}
.eu-filters__reset:hover { text-decoration: underline; text-underline-offset: .2em; }
.eu-filters__reset .eu-icon { width: .9rem; height: .9rem; }

@media (max-width: 899px) {
	/* The dropdowns get their own line under the sections. */
	.eu-filters__nav,
	.eu-filters__form { flex: 1 0 100%; }
	.eu-filters__nav + .eu-filters__form { min-height: 0; padding: .7rem 0; border-top: 1px solid var(--eu-line); }
}
