/* Svaru meklētājs (templates/page-svaru-mekletajs.php) - filter sidebar on
   the left, the shared product card grid (product-cards.css) on the right. */

.lsv-finder {
	font-family: 'Roboto', Arial, sans-serif;
	padding: 24px 0 56px;
}

.lsv-finder-layout {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 28px;
	align-items: start;
}

/* ---- Sidebar ---- */
.lsv-finder-filters {
	position: sticky;
	/* Clears the sticky site header. */
	top: 140px;
	max-height: calc(100vh - 160px);
	overflow-y: auto;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 16px;
}
/* Each filter is a select-like field; clicking it opens its options
   inline below it (not as an overlay, so the scrolling sidebar can't clip
   it). The field shows what's ticked once closed. */
.lsv-finder-group {
	margin: 0 0 10px;
}
.lsv-finder-group summary {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 1px;
	position: relative;
	padding: 7px 32px 7px 12px;
	border: 1px solid #d6dede;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	user-select: none;
}
.lsv-finder-group summary::-webkit-details-marker {
	display: none;
}
.lsv-finder-group summary::after {
	content: '';
	position: absolute;
	right: 13px;
	top: 50%;
	width: 7px;
	height: 7px;
	border-right: 2px solid #1A5E63;
	border-bottom: 2px solid #1A5E63;
	transform: translateY(-70%) rotate(45deg);
	transition: transform .15s;
}
.lsv-finder-group[open] summary::after {
	transform: translateY(-30%) rotate(-135deg);
}
.lsv-finder-group summary:hover,
.lsv-finder-group[open] summary {
	border-color: #1A5E63;
}
.lsv-finder-group.is-active summary {
	border-color: #1A5E63;
	background: #f2f7f7;
}
.lsv-finder-label {
	font-size: 12px;
	font-weight: 600;
	color: #1A5E63;
}
.lsv-finder-value {
	font-size: 14px;
	color: #222;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.lsv-finder-group:not(.is-active) .lsv-finder-value {
	color: #888;
}
.lsv-finder-options {
	margin-top: 4px;
	padding: 8px 12px;
	border: 1px solid #e3e9e9;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 4px 12px rgba(0,0,0,.06);
	max-height: 300px;
	overflow-y: auto;
}
.lsv-finder-hint {
	font-size: 12px;
	color: #888;
	margin: 0 0 4px;
}
.lsv-finder-option {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #222;
	padding: 3px 0;
	cursor: pointer;
}
.lsv-finder-option input {
	margin: 0;
	accent-color: #1A5E63;
	flex-shrink: 0;
}
.lsv-finder-option-child {
	padding-left: 22px;
	font-size: 13px;
}
.lsv-finder-count {
	font-style: normal;
	color: #999;
	font-size: 12px;
	margin-left: auto;
}
.lsv-finder-option.is-empty {
	opacity: .45;
}
.lsv-finder-reset {
	width: 100%;
	margin-top: 6px;
}

/* ---- Results ---- */
.lsv-finder-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin-bottom: 12px;
}
.lsv-finder-summary {
	font-weight: 600;
	color: #222;
	margin: 0;
}
.lsv-finder-ordering {
	margin: 0;
}
/* WooCommerce's borderless look for the archives' sort select is scoped to
   body.woocommerce-page, which this page doesn't get - repeated here. The
   extra right padding keeps the longer labels clear of the arrow. */
.lsv-finder .lsv-finder-ordering select.orderby {
	background-color: transparent;
	border: transparent;
	border-radius: 0;
	padding: .5em 2.2em .5em .5em;
}
.lsv-finder .lsv-finder-grid {
	grid-template-columns: repeat(5, 1fr);
}
/* The card's own display: flex would otherwise override [hidden]. */
.lsv-finder-grid > [hidden],
.lsv-finder-empty[hidden] {
	display: none;
}
.lsv-finder-empty {
	text-align: center;
	padding: 48px 16px;
	color: #555;
}

@media (max-width: 1200px) {
	.lsv-finder .lsv-finder-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}
@media (max-width: 900px) {
	.lsv-finder-layout {
		grid-template-columns: 1fr;
	}
	.lsv-finder-filters {
		position: static;
		max-height: none;
	}
	.lsv-finder .lsv-finder-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (max-width: 560px) {
	.lsv-finder .lsv-finder-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
