/* AFSCME site-wide search results (templates/search.html).
 * Mirrors the Resolutions & Amendments search look (afscme-resolutions-search):
 * a green refine bar, a muted result summary, and borderless stretched-link
 * cards separated by spacing that light up light-gray on hover. */

:root {
	--afscme-search-green: #00954c;
	--afscme-search-green-dark: #006637;
	--afscme-search-blue: #005daa;
}

.afscme-search {
	max-width: 820px;
	margin-left: auto;
	margin-right: auto;
}

/* ── Refine bar (core Search block) ──────────────────────────────────────── */
.afscme-search-refine {
	margin: 1rem 0 1.5rem;
}

.afscme-search-refine .wp-block-search__inside-wrapper {
	background: var(--afscme-search-green);
	border: 1px solid var(--afscme-search-green);
	border-radius: 4px;
	overflow: hidden;
	padding: 0;
	transition: background 0.3s ease, border-color 0.3s ease;
}

.afscme-search-refine .wp-block-search__inside-wrapper:hover,
.afscme-search-refine .wp-block-search__inside-wrapper:focus-within {
	background: var(--afscme-search-green-dark);
	border-color: var(--afscme-search-green-dark);
}

.afscme-search-refine .wp-block-search__input {
	flex: 1 1 auto;
	min-width: 0;
	background: transparent;
	border: 0;
	margin: 0;
	padding: 1rem 1.25rem;
	font-family: "Open Sans", sans-serif;
	font-size: 1.2rem;
	color: #fff;
}

.afscme-search-refine .wp-block-search__input:focus {
	outline: none;
}

.afscme-search-refine .wp-block-search__input::placeholder {
	color: rgba(255, 255, 255, 0.85);
	opacity: 1;
}

.afscme-search-refine .wp-block-search__button {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	margin: 0;
	padding: 0 1.25rem;
	transition: opacity 0.3s ease;
}

.afscme-search-refine .wp-block-search__button:hover,
.afscme-search-refine .wp-block-search__button:focus {
	opacity: 0.85;
	background: transparent;
}

.afscme-search-refine .wp-block-search__button svg {
	fill: #fff;
}

/* ── Result summary ("Search results for: chicago") ──────────────────────── */
.afscme-search-summary {
	font-family: "Open Sans", sans-serif;
	font-weight: 400;
	color: #555;
	margin: 0 0 1.25rem;
	font-size: var(--wp--preset--font-size--small);
}

/* ── Results list ────────────────────────────────────────────────────────── */
.afscme-search-list {
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0;
}

.afscme-search-list > li {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

/* Card — whole thing is a stretched link (Unbox Group Link auto-wires the
 * overlay <a> to the post permalink inside the query loop). Borderless,
 * separated by spacing, hover-fills light-gray. */
.afscme-search-card {
	position: relative;
	padding: 1rem 1.25rem;
	transition: background-color 0.15s ease;
}

.afscme-search-card:hover,
.afscme-search-card:focus-within {
	background-color: var(--wp--preset--color--light-gray);
}

.afscme-search-card .unbox-group-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	cursor: pointer;
}

.afscme-search-card-content {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

/* Keep the real title link clickable/focusable above the overlay. */
.afscme-search-card-content a {
	position: relative;
	z-index: 2;
}

.afscme-search-card-title {
	margin: 0;
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--subheading);
	line-height: 1.2;
}

.afscme-search-card-title a {
	color: var(--afscme-search-green);
	text-decoration: none;
	transition: color 0.15s ease;
}

.afscme-search-card-title a:hover,
.afscme-search-card-title a:focus,
.afscme-search-card:hover .afscme-search-card-title a,
.afscme-search-card:focus-within .afscme-search-card-title a {
	color: var(--afscme-search-blue);
	text-decoration: none;
}

.afscme-search-card-excerpt {
	margin: 0;
	font-family: "Open Sans", sans-serif;
	color: #444;
	font-size: 1rem;
	line-height: 1.35;
}

.afscme-search-card-excerpt .wp-block-post-excerpt__more-text {
	display: none;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.afscme-search-empty {
	font-family: "Open Sans", sans-serif;
	font-size: 1.1rem;
	color: #444;
	padding: 1rem 0;
}

/* Pagination is intentionally left unstyled here so it inherits the site's
 * existing query-pagination styling (same block the blog archives use). */
