/**
 * Search / filter page layout (pretty /search route).
 * Reuses the global card components from style.css; this only lays out the
 * filter bar, the responsive results grid, and the loading skeletons.
 */

._searchPage_kisskh {
	max-width: 1500px;
	margin: 0 auto;
	padding: 1.25rem clamp(0.75rem, 3vw, 2rem) 3rem;
}

/* The skeleton grid uses _styledCardGrid (display:grid), which would override
   the [hidden] attribute and keep the skeletons permanently visible. Force it
   hidden until search.js reveals it during a "load more" fetch. */
.styledCardGrid[data-kisskh-search-skeletons][hidden] {
	display: none !important;
}

/* Collapsed filter bar: show the first five filters + the action group (last
   child); hide everything in between. Toggled by the Collapse button. */
.filterContainer.mi-filters-collapsed .filterGroup:nth-child(n+6):not(:last-child) {
	display: none;
}

._searchHeading_kisskh {
	margin: 0 0 1rem;
	font-size: clamp(1.4rem, 3vw, 2rem);
	font-weight: 700;
	color: var(--global-text);
}

/* The filter bar already styles .filterContainer in style.css; the
   form is just a transparent wrapper around it. */
._searchForm_kisskh {
	display: block;
}

/* Average Score: two compact number inputs (Min – Max). */
._searchScoreRange_kisskh {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

._searchScoreRange_kisskh ._searchInput_kisskh {
	min-width: 0;
}

._searchScoreRange_kisskh span {
	color: var(--global-text-muted);
}

/* ---- Filter bar ---- */
._searchFilters_kisskh {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: flex-end;
	padding: 0.9rem;
	margin-bottom: 1.25rem;
	background-color: var(--global-div-tr);
	border: 1px solid var(--global-border-color);
	border-radius: var(--global-border-radius);
}

._searchField_kisskh {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	flex: 1 1 140px;
	min-width: 120px;
}

._searchFieldWide_kisskh {
	flex: 2 1 220px;
}

._searchFieldLabel_kisskh {
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--global-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

._searchSelect_kisskh,
._searchInput_kisskh {
	width: 100%;
	box-sizing: border-box;
	height: 2.3rem;
	padding: 0 0.6rem;
	font-size: 0.9rem;
	color: var(--global-text);
	background-color: var(--global-div);
	border: 1px solid var(--global-border-color);
	border-radius: var(--global-border-radius);
	outline: none;
}

._searchSelect_kisskh:focus,
._searchInput_kisskh:focus {
	border-color: var(--primary-accent);
}

._searchActions_kisskh {
	display: flex;
	gap: 0.5rem;
	align-items: flex-end;
	flex: 1 1 auto;
}

._searchApply_kisskh {
	height: 2.3rem;
	padding: 0 1.1rem;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	background-color: var(--primary-accent);
	border: none;
	border-radius: var(--global-border-radius);
}

._searchApply_kisskh:hover {
	filter: brightness(1.08);
}

._searchReset_kisskh {
	display: inline-flex;
	align-items: center;
	height: 2.3rem;
	padding: 0 0.9rem;
	color: var(--global-text-muted);
	text-decoration: none;
	background-color: var(--global-div);
	border: 1px solid var(--global-border-color);
	border-radius: var(--global-border-radius);
}

._searchReset_kisskh:hover {
	color: var(--global-text);
}

/* ---- Results head ---- */
._searchResultsHead_kisskh {
	margin-bottom: 0.75rem;
}

._searchCount_kisskh {
	font-size: 0.85rem;
	color: var(--global-text-muted);
}

/* ---- Results grid ---- */
._searchGrid_kisskh,
._searchSkeletons_kisskh {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1rem 0.9rem;
}

._searchSkeletons_kisskh {
	margin-top: 1rem;
}

._searchGridItem_kisskh {
	min-width: 0;
}

._searchSentinel_kisskh {
	width: 100%;
	height: 1px;
}

._searchEmpty_kisskh {
	padding: 4rem 1rem;
	text-align: center;
	color: var(--global-text-muted);
}

@media (max-width: 600px) {
	._searchGrid_kisskh,
	._searchSkeletons_kisskh {
		grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	}
}
