/** AJAX filtering for the Projects archive. */
.polymer-project-filters {
	border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	display: grid;
	gap: 1.25rem;
	margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
	padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.polymer-project-filters__search {
	display: flex;
	gap: 0.75rem;
}

.polymer-project-filters__search-input {
	background: transparent;
	border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
	border-radius: 0;
	color: inherit;
	min-height: 3.5rem;
	padding: 0.75rem 1rem;
	width: 100%;
}

.polymer-project-filters__search-input::placeholder {
	color: color-mix(in srgb, currentColor 58%, transparent);
}

.polymer-project-filters__search-input:focus {
	border-color: var(--bs-link-color, #3858e9);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--bs-link-color, #3858e9) 25%, transparent);
	outline: 0;
}

.polymer-project-filters__submit {
	background: var(--bs-link-color, #3858e9);
	border: 1px solid var(--bs-link-color, #3858e9);
	color: #fff;
	font-weight: 600;
	min-width: 7rem;
	padding: 0.75rem 1.25rem;
}

.polymer-project-filters__reset {
	color: inherit;
	font-weight: 600;
	justify-self: start;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
}

.polymer-project-filters__reset[hidden] {
	display: none;
}

.polymer-project-filters__types {
	border: 0;
	margin: 0;
	padding: 0;
}

.polymer-project-filters__types-toggle {
	display: none;
}

.polymer-project-filters__type-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.polymer-project-filters__type {
	cursor: pointer;
	margin: 0;
	position: relative;
}

.polymer-project-filters__type input {
	height: 1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.polymer-project-filters__type-button {
	align-items: center;
	background: transparent;
	border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
	display: inline-flex;
	font-weight: 600;
	gap: 0.6rem;
	min-height: 2.875rem;
	padding: 0.65rem 1rem;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.polymer-project-filters__type-count {
	color: var(--bs-link-color, #3858e9);
	font-size: 0.875em;
}

.polymer-project-filters__type input:checked + .polymer-project-filters__type-button {
	background: var(--bs-link-color, #3858e9);
	border-color: var(--bs-link-color, #3858e9);
	color: #fff;
}

.polymer-project-filters__type input:checked + .polymer-project-filters__type-button .polymer-project-filters__type-count {
	color: inherit;
}

.polymer-project-filters__type input:focus-visible + .polymer-project-filters__type-button {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.polymer-project-results {
	transition: opacity 160ms ease;
}

.polymer-projects-archive__grid.is-loading .polymer-project-results,
.polymer-blog-archive__grid.is-loading .polymer-blog-results {
	opacity: 0.42;
	pointer-events: none;
}

@media (max-width: 767.98px) {
	.polymer-project-filters__search {
		align-items: stretch;
		flex-direction: column;
	}

	.polymer-project-filters__submit {
		width: 100%;
	}

	.polymer-project-filters.has-collapsible-types .polymer-project-filters__types-toggle {
		align-items: center;
		background: transparent;
		border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
		color: inherit;
		display: flex;
		font: inherit;
		font-weight: 600;
		gap: 0.75rem;
		justify-content: space-between;
		min-height: 3.25rem;
		padding: 0.75rem 1rem;
		text-align: left;
		width: 100%;
	}

	.polymer-project-filters.has-collapsible-types .polymer-project-filters__types-toggle::after {
		border-bottom: 2px solid currentColor;
		border-right: 2px solid currentColor;
		content: '';
		height: 0.55rem;
		margin-left: auto;
		transform: rotate(45deg) translateY(-0.15rem);
		transition: transform 160ms ease;
		width: 0.55rem;
	}

	.polymer-project-filters.has-collapsible-types.types-are-open .polymer-project-filters__types-toggle::after {
		transform: rotate(225deg) translate(-0.15rem, -0.15rem);
	}

	.polymer-project-filters__types-toggle-count {
		align-items: center;
		background: var(--bs-link-color, #3858e9);
		border-radius: 999px;
		color: #fff;
		display: inline-flex;
		font-size: 0.75rem;
		height: 1.5rem;
		justify-content: center;
		line-height: 1;
		min-width: 1.5rem;
		padding: 0 0.35rem;
	}

	.polymer-project-filters__types-toggle-count[hidden] {
		display: none;
	}

	.polymer-project-filters.has-collapsible-types .polymer-project-filters__types {
		display: none;
	}

	.polymer-project-filters.has-collapsible-types.types-are-open .polymer-project-filters__types {
		display: block;
	}

	.polymer-project-filters__type,
	.polymer-project-filters__type-button {
		width: 100%;
	}

	.polymer-project-filters__type-button {
		justify-content: space-between;
	}
}

@media (prefers-reduced-motion: reduce) {
	.polymer-project-filters__types-toggle::after,
	.polymer-project-filters__type-button,
	.polymer-project-results {
		transition: none;
	}
}
