/*
 * Avenue Gallery plugin: the sort menu and item type filter, at every width.
 * Markup from includes/sorting.php and includes/search.php; loaded only where the controls show:
 * /gallery/, the collection pages, artist pages and the product search results.
 */

.avenue-listing-controls {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: flex-start;
	gap: 12px 16px;
	margin: 0 0 32px;
	color: #3f3f3f;
	font-size: 14px;
	line-height: 1.3;
}

/* Each control is one bordered box: a small grey label, then the current choice. */
.avenue-listing-control {
	position: relative;
	min-width: 220px;
	border: 1px solid #c9c7c6;
	background: #fff;
}
.avenue-listing-sort label,
.avenue-listing-label {
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #777;
}
.avenue-listing-sort label {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}
.avenue-listing-sort select,
.avenue-listing-types summary {
	box-sizing: border-box;
	width: 100%;
	height: 42px;
	padding: 0 34px 0 12px;
	border: 0;
	border-radius: 0;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233f3f3f' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
	color: #3f3f3f;
	font: inherit;
	cursor: pointer;
}
.avenue-listing-sort select {
	-webkit-appearance: none;
	appearance: none;
	padding-left: 78px;
}
.avenue-listing-types summary {
	display: flex;
	align-items: center;
	gap: 10px;
	list-style: none;
}
.avenue-listing-types summary::-webkit-details-marker {
	display: none;
}
.avenue-listing-sort select:focus-visible,
.avenue-listing-types summary:focus-visible {
	outline: 2px solid #3f3f3f;
	outline-offset: 2px;
}

/* The type list opens under its box, over the grid. */
.avenue-listing-types fieldset {
	position: absolute;
	z-index: 20;
	top: 100%;
	right: -1px;
	box-sizing: border-box;
	min-width: calc(100% + 2px);
	margin: 0;
	padding: 12px 16px 16px;
	border: 1px solid #c9c7c6;
	background: #fff;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.avenue-listing-types legend {
	float: left;
	width: 100%;
	margin-bottom: 4px;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #777;
}
.avenue-listing-types fieldset label {
	clear: both;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	font-size: 15px;
	cursor: pointer;
}
/* On the search results, the number of available pieces of each type found. */
.avenue-listing-count {
	color: #777;
	white-space: nowrap;
}
.avenue-listing-types input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: #3f3f3f;
}

.avenue-listing-apply {
	box-sizing: border-box;
	width: 100%;
	height: 42px;
	margin-top: 10px;
	border: 0;
	background: #3f3f3f;
	color: #fff;
	font: inherit;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}
/* Without JavaScript the sort needs its own Apply; with it, choosing a sort applies it. */
.avenue-listing-apply-sort {
	width: auto;
	margin-top: 0;
	padding: 0 20px;
}
.avenue-listing-controls.is-enhanced .avenue-listing-apply-sort {
	display: none;
}

/* Under a search that found nothing: the words searched, ready to correct, and where to browse. */
.avenue-search-again {
	max-width: 560px;
	margin: 0 0 48px;
	color: #3f3f3f;
	font-size: 16px;
}
.avenue-search-again p {
	margin: 0 0 16px;
	padding: 0;
}
.avenue-search-again .aws-container,
.avenue-search-again .woocommerce-product-search {
	margin: 0 0 16px;
}
/* New Work and our artists in bold (Ian, 13 October 2026). */
.avenue-search-again a {
	font-weight: 700;
	text-decoration: underline;
}

.avenue-listing-empty {
	padding: 40px 0;
	text-align: center;
}

/* Phones: the two boxes share the row. */
@media (max-width: 767px) {
	.avenue-listing-controls {
		flex-wrap: nowrap;
		gap: 10px;
		margin-bottom: 24px;
	}
	.avenue-listing-control {
		flex: 1 1 0;
		min-width: 0;
	}
	.avenue-listing-sort select {
		padding-left: 12px;
		padding-top: 14px;
		font-size: 14px;
	}
	.avenue-listing-sort label {
		top: 5px;
		transform: none;
		font-size: 10px;
	}
	.avenue-listing-types summary {
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
		gap: 0;
	}
	.avenue-listing-types .avenue-listing-label {
		font-size: 10px;
	}
	.avenue-listing-types fieldset {
		right: auto;
		left: -1px;
	}
}
