/*
 * CTWPDA Content Filters
 * v1.2.0
 * Sidebar styling aligned with the site's "Latest News" block.
 */

.ctwpda-filter {
	--ctwpda-green: #438b22;
	--ctwpda-text: #1f2b26;
	--ctwpda-muted: #66736d;
	--ctwpda-line: #e2e7e4;
	--ctwpda-hover: #f4f7f3;
	--ctwpda-active: #eef5ea;
	width: 100%;
	color: var(--ctwpda-text);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.45;
}

.ctwpda-filter__heading {
	margin: 0 0 22px;
}

/*
 * Match the visual hierarchy of the existing "Latest News" heading:
 * larger, regular-weight, inherited site font.
 */
.ctwpda-filter__title {
	margin: 0 !important;
	padding: 0 !important;
	font-family: inherit !important;
	font-size: 28px !important;
	font-weight: 400 !important;
	line-height: 1.2 !important;
	letter-spacing: -0.015em;
	white-space: nowrap;
	color: var(--ctwpda-text);
}

.ctwpda-filter__accent {
	display: block;
	width: 60px;
	height: 3px;
	margin-top: 26px;
	border-radius: 999px;
	background: var(--ctwpda-green);
}

.ctwpda-filter__list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border-top: 1px solid var(--ctwpda-line);
}

.ctwpda-filter__item {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border-bottom: 1px solid var(--ctwpda-line);
}

.ctwpda-filter__link {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
	padding: 12px 14px 12px 18px;
	font-family: inherit !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 1.45 !important;
	color: var(--ctwpda-text) !important;
	text-decoration: none !important;
	background: transparent;
	transition: background-color .18s ease, color .18s ease, padding-left .18s ease;
}

.ctwpda-filter__link::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 3px;
	height: 0;
	border-radius: 999px;
	background: var(--ctwpda-green);
	transform: translateY(-50%);
	transition: height .18s ease;
}

.ctwpda-filter__link:hover,
.ctwpda-filter__link:focus-visible {
	color: var(--ctwpda-green) !important;
	background: var(--ctwpda-hover);
	padding-left: 22px;
	outline: none;
}

.ctwpda-filter__link:hover::before,
.ctwpda-filter__link:focus-visible::before {
	height: 22px;
}

.ctwpda-filter__item.is-active .ctwpda-filter__link {
	color: var(--ctwpda-green) !important;
	font-weight: 600 !important;
	background: var(--ctwpda-active);
}

.ctwpda-filter__item.is-active .ctwpda-filter__link::before {
	height: 28px;
}

.ctwpda-filter__label {
	min-width: 0;
}

.ctwpda-filter__count {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 24px;
	padding: 0 7px;
	border-radius: 999px;
	background: #fff;
	color: var(--ctwpda-muted);
	font-size: 12px;
	font-weight: 600;
}

.ctwpda-filter-error {
	padding: 12px 14px;
	border-left: 3px solid var(--ctwpda-green);
	background: #f7f8f7;
	font-size: 14px;
}

@media (max-width: 767px) {
	.ctwpda-filter__title {
		font-size: 26px !important;
	}

	.ctwpda-filter__accent {
		margin-top: 20px;
	}

	.ctwpda-filter__link {
		min-height: 46px;
	}
}

@media (max-width: 340px) {
	.ctwpda-filter__title {
		font-size: 24px !important;
		white-space: normal;
	}
}
