/* Grundläggande, neutral stil. Färger och typsnitt ärvs från temat. */
.lofty-filter__field { margin: 0 0 1.25em; }
.lofty-filter__title { display: block; padding: 0; margin: 0 0 .5em; font-weight: 600; }
.lofty-filter__title--hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect( 0, 0, 0, 0 ); white-space: nowrap; border: 0; }
.lofty-filter__group { border: 0; margin: 0; padding: 0; min-width: 0; }
.lofty-filter__options { list-style: none; margin: 0; padding: 0; }
.lofty-filter__option { margin: 0 0 .35em; padding-left: calc( var( --lf-depth, 0 ) * 1.25em ); }
.lofty-filter__field--layout-inline .lofty-filter__options { display: flex; flex-wrap: wrap; gap: .4em 1.5em; }
.lofty-filter__field--layout-inline .lofty-filter__option { margin: 0; padding-left: 0; }
.lofty-filter__field--icon input[type="search"] {
	padding-left: 2.75em;
	background: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E" ) no-repeat 1em 50%;
}
.lofty-filter input[type="search"],
.lofty-filter select { width: 100%; box-sizing: border-box; }
.lofty-filter__reset { cursor: pointer; }
.lofty-filter__field--reset[hidden],
.lofty-filter__more[hidden] { display: none; }

/* Hopfällbara fält. Gäller bara på små skärmar, och bara när JS har fällt ihop fältet. Valda alternativ visas alltid. */
.lofty-filter__more { display: none; }
@media ( max-width: 40em ) {
	@supports selector( :has( * ) ) {
		.lofty-filter__field--collapsible.is-collapsed .lofty-filter__option--extra:not( :has( input:checked ) ) { display: none; }
		.lofty-filter__field--collapsible .lofty-filter__more:not( [hidden] ) { display: inline-block; margin-top: .75em; cursor: pointer; }
	}
}

.lofty-filter-results { transition: opacity .15s ease; }
/* Fokus flyttas hit när en sidlänk byts ut. Containern är ingen kontroll, så ingen ram. */
.lofty-filter-results[tabindex="-1"]:focus { outline: none; }
/* Visas när en AJAX-uppdatering misslyckas. */
.lofty-filter__error { margin: 0 0 1em; padding: .75em 1em; border: 1px solid currentColor; }
.lofty-filter__error[hidden] { display: none; }
.lofty-filter__error p { margin: 0 0 .5em; }
.lofty-filter__retry { cursor: pointer; }
.lofty-filter__status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect( 0, 0, 0, 0 ); white-space: nowrap; border: 0; }
.lofty-filter-results.is-loading { opacity: .5; pointer-events: none; }

.lofty-filter__list { list-style: none; margin: 0; padding: 0; }
.lofty-filter__pagination ul { display: flex; flex-wrap: wrap; gap: .5em; list-style: none; margin: 1em 0 0; padding: 0; }

@media ( prefers-reduced-motion: reduce ) {
	.lofty-filter-results { transition: none; }
}
