/**
 * The cascading category filter, inside GeoDirectory's search bar.
 *
 * One select per level, side by side, wrapping when the bar runs out of room —
 * so a deep taxonomy does not push the keyword and Near fields off the line.
 */

.gcn-catfilter {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gcn-space-2);
	align-items: center;
	min-width: 0;
}

.gcn-catfilter__select {
	flex: 1 1 11rem;
	min-width: 0;
	max-width: 100%;
}

/*
 * A sub-category select arrives after its parent is chosen; the tint says it is
 * a narrowing of the choice before it rather than a filter of its own.
 */
.gcn-catfilter__select[data-level="1"],
.gcn-catfilter__select[data-level="2"],
.gcn-catfilter__select[data-level="3"],
.gcn-catfilter__select[data-level="4"] {
	background-color: var(--gcn-brand-soft);
	border-color: var(--gcn-brand-border);
	animation: gcn-catfilter-in var(--gcn-duration) var(--gcn-ease);
}

@keyframes gcn-catfilter-in {
	from { opacity: 0; transform: translateY(-2px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {

	.gcn-catfilter__select {
		animation: none !important;
	}
}

@media (max-width: 640px) {

	.gcn-catfilter__select {
		flex: 1 1 100%;
	}
}
