/**
 * plugins/themes/jbmhTheme/styles/jbmhSearch.css
 * Search (/search, /search/search?query=…) — theme-dev/jbmh-search-mockup.html.
 * Loaded only with jbmhInner.css on the Search template. Results are the
 * shared article-row component from jbmhInner.css.
 */

/* ---------- Query row ---------- */
body.jbmh_v2_search .jbmh_search_form {
	margin: 0;
	padding: 0;
}

body.jbmh_v2_search .jbmh_search_form .search_input {
	display: flex;
	gap: 10px;
	margin: 18px 0 0;
	padding: 0;
}

body.jbmh_v2_search .jbmh_search_form .search_input input.query {
	flex: 1;
	width: auto;
	height: auto;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--rule);
	border-radius: 0;
	font-family: var(--jbmh-sans);
	font-size: 14px;
	line-height: normal;
	color: var(--ink);
	background: var(--paper);
	box-shadow: none;
}

body.jbmh_v2_search .jbmh_search_form .jbmh_search_submit {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 9px 18px;
	border: 1px solid var(--accent-deep);
	border-radius: 0;
	background: var(--accent-deep);
	color: #fff;
	font-family: var(--jbmh-sans);
	font-size: 13px;
	font-weight: 600;
	line-height: normal;
	cursor: pointer;
}

body.jbmh_v2_search .jbmh_search_form .jbmh_search_submit:hover {
	background: var(--accent);
	border-color: var(--accent);
}

/* ---------- Advanced filters ---------- */
body.jbmh_v2_search .jbmh_search_form fieldset.search_advanced {
	margin: 16px 0 0;
	padding: 10px 16px 14px;
	border: 1px solid var(--rule);
	border-radius: 0;
	min-width: 0;
	font-size: 14px;
	color: var(--ink);
	/* the parent lays this fieldset out side-by-side (dates | author) */
	display: block;
	width: auto;
	float: none;
}

body.jbmh_v2_search .jbmh_search_form fieldset.search_advanced > legend {
	margin: 0;
	padding: 0 6px;
	font-size: 11px;
	font-weight: 400;
	line-height: normal;
	letter-spacing: .4px;
	text-transform: uppercase;
	color: var(--muted);
}

body.jbmh_v2_search .jbmh_search_form .date_range {
	width: auto;
	float: none;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 20px;
	margin: 0;
}

body.jbmh_v2_search .jbmh_search_form .date_range::before,
body.jbmh_v2_search .jbmh_search_form .date_range::after {
	content: none;
	display: none;
}

body.jbmh_v2_search .jbmh_search_form .date_range > div {
	margin: 0;
	padding: 0;
	width: auto;
	float: none;
	min-width: 0;
}

/* Published After / Before: Year · Month · Day, each label above its select.
   The markup is a flat run label,select,label,select,… so a 3-column grid
   with column flow and 2 rows places them without extra wrappers. */
body.jbmh_v2_search .jbmh_search_form .date_range fieldset {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: auto auto;
	grid-auto-flow: column;
	column-gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

body.jbmh_v2_search .jbmh_search_form .date_range fieldset > legend {
	margin: 0 0 6px;
	padding: 0;
	font-size: 12px;
	font-weight: 600;
	line-height: normal;
	letter-spacing: 0;
	text-transform: none;
	color: var(--ink);
	float: none;
}

/* the parent adds a 20px vertical margin around every result in a search */
body.jbmh_v2_search .page_search ul.search_results .obj_article_summary.jbmh_article {
	margin: 0;
}

/* The parent theme hides these labels the screen-reader way
   (position:absolute; left:-2000px) — the mockup shows Year / Month / Day
   above each select, so bring them back into the flow. */
body.jbmh_v2_search .jbmh_search_form fieldset.search_advanced label {
	/* "!important": the parent's screen-reader mixin sets position with it */
	position: static !important;
	left: auto;
	width: auto;
	height: auto;
	overflow: visible;
	clip: auto;
	display: block;
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 400;
	line-height: normal;
	color: var(--muted);
}

body.jbmh_v2_search .jbmh_search_form fieldset.search_advanced select,
body.jbmh_v2_search .jbmh_search_form fieldset.search_advanced input[type="text"] {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 7px 8px;
	border: 1px solid var(--rule);
	border-radius: 0;
	box-sizing: border-box;
	font-family: var(--jbmh-sans);
	font-size: 13px;
	line-height: normal;
	color: var(--ink);
	background: var(--paper);
	box-shadow: none;
}

body.jbmh_v2_search .jbmh_search_form .author {
	width: auto;
	float: none;
	margin: 14px 0 0;
	padding: 0;
}

/* ---------- Results ---------- */
body.jbmh_v2_search .page_search ul.search_results {
	list-style: none;
	margin: 0;
	padding: 0;
}

body.jbmh_v2_search .page_search ul.search_results > li {
	margin: 0;
	padding: 0;
	border: 0;
}

body.jbmh_v2_search .page_search ul.search_results > li:last-child .obj_article_summary.jbmh_article {
	border-bottom: 0;
}

body.jbmh_v2_search .page_search .cmp_notification {
	margin: 0;
	padding: 12px 16px;
	border: 1px solid var(--rule);
	border-radius: 0;
	background: none;
	font-size: 13px;
	line-height: normal;
	color: var(--muted);
}

/* ---------- Pagination ("1 - 25 of 129 items 1 2 3 … > >>") ----------
   Plain inline flow: the &nbsp; separators in the markup would become
   empty anonymous flex items (and gaps) under display:flex. */
body.jbmh_v2_search .page_search .cmp_pagination {
	margin: 20px 0 0;
	padding: 0;
	font-size: 13px;
	line-height: normal;
	color: var(--ink);
}

body.jbmh_v2_search .page_search .cmp_pagination a {
	margin-right: 10.7px;
	color: var(--accent);
	text-decoration: none;
}

body.jbmh_v2_search .page_search .cmp_pagination strong {
	margin: 0 10.7px 0 10.7px;
	font-weight: 600;
	color: var(--ink);
}

/* ---------- Phones ---------- */
@media (max-width: 600px) {
	body.jbmh_v2_search .jbmh_search_form .date_range {
		grid-template-columns: 1fr;
	}
}
