/* The search input replaces the header controls while the search is open. */
.reread-header {
	position: relative;
}

.reread-header:has(.reread-search.is-open) {
	border-bottom-width: 0;
	height: clamp(60px, 4.2vw, 80px);
}

.reread-header:has(.reread-search.is-open) .reread-header__inner {
	height: 0;
	min-height: 0;
	overflow: hidden;
	padding-block: 0;
	visibility: hidden;
}

.reread-search {
	background: #fff;
	border-bottom: 4px solid var(--reread-black, #000);
	box-sizing: border-box;
	display: none;
	bottom: 0;
	left: 0;
	min-height: 0;
	padding-inline: max(2.2vw, calc((100vw - 1440px) / 2 + 2.2vw));
	position: absolute;
	right: 0;
	top: 0;
	z-index: 20;
}

.reread-search.is-open {
	display: block;
}

.reread-search__form {
	align-items: center;
	display: grid;
	gap: clamp(16px, 1.25vw, 24px);
	grid-template-columns: 32px minmax(0, 1fr);
	height: 100%;
	margin: 0 auto;
	max-width: 1440px;
	min-height: 0;
}

.reread-search__icon {
	display: block;
	height: 30px;
	object-fit: contain;
	width: 30px;
}

.reread-search-toggle__icon {
	display: block;
	height: 30px;
	object-fit: contain;
	width: 30px;
}

.reread-search__form input {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: #000;
	font: inherit;
	font-size: clamp(16px, 1.1vw, 21px);
	min-width: 0;
	outline-offset: 3px;
	padding: 12px 0;
	width: 100%;
}

.reread-search__form input:focus,
.reread-search__form input:focus-visible {
	border: 0;
	box-shadow: none;
	outline: none;
}

.reread-search__form input::-webkit-search-cancel-button {
	appearance: none;
}

/* The Search template follows the XD's simple title-and-excerpt result list. */
.reread-search-results {
	margin-inline: auto;
	max-width: 1440px;
	padding: 0 clamp(24px, 9.5vw, 184px) 64px;
}

.reread-search-results > .wp-block-query-title {
	font-family: var(--wp--preset--font-family--body, Arial, sans-serif);
	font-size: 21px;
	font-weight: 500;
	line-height: 1.35;
	margin: 44px 0 32px;
}

.reread-search-results .wp-block-post-template {
	list-style: none;
	margin: 0;
	padding: 0;
}

.reread-search-results .wp-block-post {
	margin: 0 0 32px;
}

.reread-search-results .wp-block-post-title {
	font-family: var(--wp--preset--font-family--body, Arial, sans-serif);
	font-size: clamp(21px, 1.75vw, 28px);
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 12px;
}

.reread-search-results .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}

.reread-search-results .wp-block-post-title a:hover,
.reread-search-results .wp-block-post-title a:focus-visible {
	text-decoration: underline;
	text-underline-offset: .15em;
}

.reread-search-results .wp-block-post-excerpt {
	font-size: 16px;
	line-height: 1.45;
	margin: 0;
}

.reread-search-results .wp-block-post-excerpt__excerpt {
	margin: 0;
}

@media (max-width: 600px) {
	.reread-search {
		padding-inline: 24px;
	}

	.reread-search__form {
		gap: 16px;
		grid-template-columns: 24px minmax(0, 1fr);
	}

	.reread-search__form input {
		font-size: 18px;
	}

	.reread-search-results {
		padding-inline: 24px;
	}

	.reread-search-results > .wp-block-query-title {
		margin-block: 32px 24px;
	}
}
