/*
 * Filter controls shared by the map and the card grid. Loaded by whichever
 * shortcode is on the page, so a grid without a map still gets styled pickers.
 *
 * The elements also carry the older .gfc-map-filters* class names, so any
 * custom CSS written against the map-only version keeps working.
 */

.gfc-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: .75rem 1rem;
	margin: 0 0 .85rem;
}

.gfc-filters__field {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #5d6660;
}

.gfc-filters__select {
	font: inherit;
	font-size: .9375rem;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	color: #2f3a33;
	padding: .4rem 2rem .4rem .6rem;
	border: 1px solid #d5d9d3;
	border-radius: 3px;
	background-color: #fff;
	min-width: 11rem;
	max-width: 100%;
}

.gfc-filters__select:focus-visible {
	outline: 2px solid #4a7c2f;
	outline-offset: 1px;
}

.gfc-filters__reset {
	font: inherit;
	font-size: .875rem;
	padding: .45rem .9rem;
	border: 1px solid #d5d9d3;
	border-radius: 3px;
	background: #fff;
	color: #4a7c2f;
	cursor: pointer;
}

.gfc-filters__reset:hover {
	border-color: #4a7c2f;
}

.gfc-filters__count {
	font-size: .875rem;
	color: #5d6660;
	margin-left: auto;
	padding-bottom: .5rem;
}

@media (max-width: 600px) {
	.gfc-filters__field,
	.gfc-filters__select {
		width: 100%;
	}
	.gfc-filters__count {
		margin-left: 0;
	}
}

/* Load more */
.gfc-more {
	display: flex;
	justify-content: center;
	margin: 0 0 2rem;
}

.gfc-more[hidden] {
	display: none;
}

.gfc-more__button {
	font: inherit;
	font-size: .9375rem;
	font-weight: 600;
	padding: .7rem 1.6rem;
	border: 1px solid #d5d9d3;
	border-radius: 3px;
	background: #fff;
	color: #4a7c2f;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}

.gfc-more__button:hover:not(:disabled) {
	border-color: #4a7c2f;
	background: #f7faf5;
}

.gfc-more__button:disabled {
	opacity: .6;
	cursor: default;
}

.gfc-more__button:focus-visible {
	outline: 2px solid #4a7c2f;
	outline-offset: 2px;
}

/* While a page of cards is in flight, dim the grid rather than emptying it,
   so the layout doesn't collapse and jump back. */
.gfc-grid-wrap--busy .gfc-grid {
	opacity: .55;
	transition: opacity .15s ease;
}

@media (prefers-reduced-motion: reduce) {
	.gfc-more__button,
	.gfc-grid-wrap--busy .gfc-grid {
		transition: none;
	}
}
