/* ==========================================================================
   Search results template — astro EfSyn-style layout, dimocracy brand.
   Builds on the shared chrome in main.css (.archive-wrap, .section-header,
   .post-list/.post, .meta, .pagination-nav, .aside). This file adds only the
   template-specific polish: the enhanced search form, the sort control, and
   the no-results state. Everything is scoped under .search-page.
   ========================================================================== */

/* Highlight the queried term inside the serif H1 (red, like the accent rule). */
.search-page .search-page__term {
	color: var(--color-accent-red);
	font-style: normal;
}

/* --------------------------------------------------------------------------
   Enhanced search form (search-form--lg) + shared .search-form (no-results).
   A bordered pill: leading lens icon, flush input, solid submit. The submit
   turns red on hover/focus (the single news-red accent). The big variant adds
   a sort row beneath.
   -------------------------------------------------------------------------- */
.search-page .search-form {
	margin: 0 0 30px;
}

.search-page .search-form__row {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--color-line-strong);
	background: var(--color-white);
	transition: border-color var(--transition), box-shadow var(--transition);
}

.search-page .search-form__row:focus-within {
	border-color: var(--color-ink);
	box-shadow: 0 0 0 1px var(--color-ink);
}

.search-page .search-form__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 46px;
	color: var(--color-faint);
}

.search-page .search-form__row:focus-within .search-form__icon {
	color: var(--color-ink);
}

.search-page .search-form__field {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	padding: 13px 14px 13px 0;
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.2;
	color: var(--color-ink);
	background: transparent;
	outline: none;
}

.search-page .search-form__field::placeholder {
	color: var(--color-faint);
	opacity: 1;
}

.search-page .search-form__submit {
	flex: 0 0 auto;
	border: 0;
	padding: 0 26px;
	font-family: var(--font-sans);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-white);
	background: var(--color-ink);
	cursor: pointer;
	transition: background var(--transition);
}

.search-page .search-form__submit:hover,
.search-page .search-form__submit:focus-visible {
	background: var(--color-accent-red);
}

/* big hero variant sits a touch larger */
.search-page .search-form--lg .search-form__field {
	font-size: 17px;
	padding-top: 15px;
	padding-bottom: 15px;
}

/* --- sort / filter row ---------------------------------------------------- */
.search-page .search-form__filters {
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	gap: 14px;
	margin-top: 12px;
}

.search-page .search-form__sort {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.search-page .search-form__sort-label {
	font-family: var(--font-sans);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-muted);
}

.search-page .search-form__select {
	font-family: var(--font-sans);
	font-size: 13px;
	font-weight: 600;
	color: var(--color-ink);
	background: var(--color-white);
	border: 1px solid var(--color-line-strong);
	border-radius: var(--radius);
	padding: 7px 30px 7px 12px;
	cursor: pointer;
	transition: border-color var(--transition);
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 11px center;
	background-size: 11px;
}

.search-page .search-form__select:hover,
.search-page .search-form__select:focus-visible {
	border-color: var(--color-ink);
	outline: none;
}

/* --------------------------------------------------------------------------
   Results list polish on top of the shared .post-list / .post row.
   -------------------------------------------------------------------------- */
.search-page .post-list--search .post:first-child {
	padding-top: 0;
}

/* --------------------------------------------------------------------------
   No-results state — strong, centered-left block with the search form.
   -------------------------------------------------------------------------- */
.search-page .search-empty {
	padding: 30px 0 8px;
	border-top: 1px solid var(--color-line);
}

.search-page .search-empty__title {
	margin: 0 0 12px;
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: 26px;
	line-height: 1.15;
	letter-spacing: -0.3px;
	color: var(--color-ink);
}

.search-page .search-empty__text {
	margin: 0;
	max-width: 60ch;
	font-family: var(--font-sans);
	font-size: 15px;
	line-height: var(--lh-base);
	color: var(--color-muted);
}

.search-page .search-empty__form {
	margin-top: 24px;
	max-width: 560px;
}

.search-page .search-empty__form .search-form {
	margin: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
	.search-page .search-form__row {
		flex-wrap: wrap;
	}
	.search-page .search-form__field {
		flex-basis: calc(100% - 46px);
	}
	.search-page .search-form__submit {
		flex: 1 0 100%;
		padding: 13px 0;
		border-top: 1px solid var(--color-line-strong);
	}
	.search-page .search-empty__title {
		font-size: 22px;
	}
}
