/**
 * State filter dropdown ([sla_state_filter] on Elementor pages, automatic on
 * portfolio-template pages).
 *
 * Sits in the theme's .portfolio-archive-taxonomies wrapper so it lines up with
 * the category filter.
 */

.sla-state-filter {
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 0 10px;
	/* Keep the bar clear of the sticky header (~106px) when jumping to #sla-state-filter. */
	scroll-margin-top: 130px;
}

/* Logged-in users also have the 32px admin bar. */
.admin-bar .sla-state-filter {
	scroll-margin-top: 162px;
}

/*
 * Alignment of the label, links and status.
 * Three classes to win over the theme's .site-layout_* .portfolio-archive-taxonomies.
 */
.portfolio-archive-taxonomies.sla-state-filter.sla-state-filter--left {
	text-align: left;
}

.portfolio-archive-taxonomies.sla-state-filter.sla-state-filter--center {
	text-align: center;
}

.portfolio-archive-taxonomies.sla-state-filter.sla-state-filter--right {
	text-align: right;
}

.sla-state-filter__label {
	display: block;
	margin: 0 0 8px;
	font-family: var(--font__headings);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.sla-state-filter__controls {
	display: inline-flex;
	gap: 10px;
	margin-bottom: 20px;
}

.sla-state-filter__select {
	min-width: 240px;
	max-width: 100%;
	height: 46px;
	padding: 0 40px 0 14px;
	border: 1px solid #ccc;
	border-radius: 0;
	background: #fff 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='%23333' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
	color: #222;
	font-size: 16px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.sla-state-filter__select:hover {
	border-color: #999;
}

.sla-state-filter__select:focus-visible,
.sla-state-filter__submit:focus-visible,
.sla-state-filter a:focus-visible {
	outline: 2px solid var(--color__primary);
	outline-offset: 2px;
}

.sla-state-filter__submit {
	height: 46px;
	padding: 0 20px;
}

.sla-state-filter__status {
	margin: 0 0 30px;
	font-size: 16px;
}

.sla-state-filter__status a {
	color: var(--color__primary);
	text-decoration: underline;
}

/* No videos yet on a state page (shown in place of the video grid). */
.sla-state-landing__empty {
	margin: 10px 0 0;
	font-size: 18px;
}

.sla-state-landing__empty a {
	color: var(--color__primary);
	text-decoration: underline;
}

/* Portfolio templates: the bar sits above the theme's category filter. */
.sla-state-filter-wrap .sla-state-filter {
	padding-top: 45px;
}

.sla-state-filter-wrap + .inner-wrap .portfolio-archive-taxonomies {
	padding-top: 0;
}

/*
 * The theme's gap above the footer comes from the pagination bar, which is hidden
 * when empty, so a filtered result that fits on one page sits on the footer.
 */
.portfolio-archive-fresh .paging-navigation:empty {
	display: block;
	padding: 50px 0 0;
}

/* No videos for the selected state: the bar's message replaces the theme's search block. */
.sla-state-filter-empty .portfolio-archive .no-results {
	display: none;
}

@media screen and (max-width: 768px) {
	/* Theme left-aligns filter lists here, so align the label and status too. */
	.portfolio-archive-taxonomies.sla-state-filter.sla-state-filter--left,
	.portfolio-archive-taxonomies.sla-state-filter.sla-state-filter--center,
	.portfolio-archive-taxonomies.sla-state-filter.sla-state-filter--right {
		text-align: left;
	}

	.sla-state-filter-wrap .sla-state-filter {
		padding-top: 20px;
	}

	.sla-state-filter__controls {
		display: flex;
	}

	.sla-state-filter__select {
		flex: 1;
		min-width: 0;
	}
}
