.rst-post-filter {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 28px;
	padding: 18px 20px;
	background: #f7f8fc;
	border: 1px solid #e5e7f2;
	border-radius: 12px;
	transition: opacity .15s ease;
}

.rst-post-filter.is-loading {
	opacity: .55;
	pointer-events: none;
}

/* Tag pills: real checkboxes styled like the theme's custom-tag-primary
   pills; :checked drives the active state, no JS class juggling. */
.rst-post-filter__tags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.rst-post-filter__tag input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.rst-post-filter__tag span {
	display: inline-block;
	background: #fff;
	box-shadow: 0 6px 6px rgba(71, 95, 107, 0.1);
	border-radius: 10px;
	color: #235fe8;
	padding: 7px 13px;
	cursor: pointer;
	font-size: 14px;
	transition: background-color .15s ease, color .15s ease;
}

.rst-post-filter__tag:hover span,
.rst-post-filter__tag input:checked + span {
	color: #fff;
	background: #235fe8;
}

.rst-post-filter__tag input:focus-visible + span {
	outline: 2px solid #235fe8;
	outline-offset: 2px;
}

.rst-post-filter__controls {
	display: flex;
	justify-content: flex-end;
	border-top: 1px solid #e5e7f2;
	padding-top: 14px;
}

.rst-post-filter__reset {
	font-size: 13px;
	color: #5f6682;
	text-decoration: underline;
}

/* The old shortcode pill row (show_news_tags) is superseded by the pills
   inside the filter bar — hide it wherever the filter is present. */
body:has(.rst-post-filter) .news-filter-tags-wrap {
	display: none;
}

.archive-module-wrapper.is-loading {
	opacity: .55;
	transition: opacity .15s ease;
}

/* Prev/next pagination buttons contain only an icon, no text node, so the
   theme's line-height-based centering (correct for the numbered digits)
   has no baseline to center against and the icon drifts. Flexbox removes
   the baseline dependency entirely instead of relying on stray text. */
.fl-builder-pagination ul.page-numbers li .page-numbers.prev,
.fl-builder-pagination ul.page-numbers li .page-numbers.next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: normal;
	vertical-align: middle;
}

.fl-builder-pagination ul.page-numbers li .page-numbers.prev .custom-pagination-arrow,
.fl-builder-pagination ul.page-numbers li .page-numbers.next .custom-pagination-arrow {
	display: inline-flex;
	align-items: center;
}

@media (max-width: 767px) {
	.rst-post-filter {
		padding: 12px 14px;
	}
}
