/**
 * TCC Group search presentation.
 */

.tcc-header-search {
	position: relative;
	flex: 0 0 auto;
}

.tcc-header-search__toggle {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	min-width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: 2px;
	color: var(--wp--preset--color--paper);
	cursor: pointer;
	list-style: none;
}

.tcc-header-search__toggle::-webkit-details-marker {
	display: none;
}

.tcc-header-search__toggle::before {
	content: "";
	box-sizing: border-box;
	display: block;
	width: 1rem;
	height: 1rem;
	border: 2px solid currentcolor;
	border-radius: 50%;
	box-shadow: 0.42rem 0.42rem 0 -0.28rem currentcolor;
	transform: translate(-0.08rem, -0.08rem) rotate(-15deg);
}

.tcc-header-search__toggle:hover,
.tcc-header-search[open] .tcc-header-search__toggle {
	color: var(--wp--preset--color--cyan);
}

.tcc-header-search__panel {
	position: absolute;
	inset-block-start: calc(100% + var(--wp--preset--spacing--2));
	inset-inline-end: 0;
	z-index: 220;
	box-sizing: border-box;
	width: min(24rem, calc(100vw - 2rem));
	padding: var(--wp--preset--spacing--4);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0.5rem;
	background: var(--wp--preset--color--paper);
	box-shadow: var(--wp--preset--shadow--nav-panel);
	color: var(--wp--preset--color--ink);
}

.tcc-header-search:not([open]) .tcc-header-search__panel {
	display: none;
}

.tcc-header-search__form__label,
.tcc-search-form__label {
	display: block;
	margin-block-end: var(--wp--preset--spacing--2);
	color: var(--wp--preset--color--navy);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
}

.tcc-header-search__form__row,
.tcc-search-form__row {
	display: flex;
	gap: var(--wp--preset--spacing--2);
	min-width: 0;
}

.tcc-header-search__form__input,
.tcc-search-form__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 2.75rem;
	padding-inline: var(--wp--preset--spacing--3);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0.25rem;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	font: inherit;
}

.tcc-header-search__form__submit,
.tcc-search-form__submit {
	flex: 0 0 auto;
	min-height: 2.75rem;
	padding-inline: var(--wp--preset--spacing--4);
	border: 0;
	border-radius: 0.25rem;
	background: var(--wp--preset--color--cyan);
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.tcc-header-search__form__submit:hover,
.tcc-search-form__submit:hover {
	background: var(--wp--preset--color--teal-dk);
	color: var(--wp--preset--color--paper);
}

.tcc-header-search__form__input:focus-visible,
.tcc-search-form__input:focus-visible,
.tcc-header-search__form__submit:focus-visible,
.tcc-search-form__submit:focus-visible,
.tcc-search-result__title a:focus-visible,
.tcc-search-result__read:focus-visible,
.tcc-search-pagination a:focus-visible {
	outline: 3px solid var(--wp--preset--color--teal);
	outline-offset: 3px;
}

.tcc-header-search__toggle:focus-visible {
	outline: 3px solid var(--wp--preset--color--cyan);
	outline-offset: 3px;
}

.tcc-search-main {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

/* The search page shares every template's column and rhythm: the hero paints
   edge to edge on the hero rhythm and centres one inner wrapper on the shared
   column, and the results band keeps its content on that same column. */
.tcc-search-hero {
	box-sizing: border-box;
	padding-block: var(--tcc-hero-gap-top) var(--tcc-hero-gap-bottom);
	padding-inline: var(--tcc-gutter);
	background: var(--wp--preset--color--sky);
}

.tcc-search-hero__inner {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--tcc-shell);
	margin-inline: auto;
}

.tcc-search-body {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--tcc-shell) + (2 * var(--tcc-gutter)));
	margin-inline: auto;
	padding-block: var(--tcc-band-gap);
	padding-inline: var(--tcc-gutter);
}

.tcc-search-hero__inner > *,
.tcc-search-body > *,
.tcc-search-result > *,
.tcc-search-state > * {
	margin-block: 0;
}

.tcc-search-hero__inner > * + *,
.tcc-search-state > * + * {
	margin-block-start: var(--wp--preset--spacing--3);
}

.tcc-search-hero__eyebrow {
	color: var(--wp--preset--color--teal);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tcc-search-hero h1 {
	max-width: 12ch;
	color: var(--wp--preset--color--navy);
	font-size: var(--wp--preset--font-size--display);
	line-height: 1.05;
}

.tcc-search-hero__summary {
	max-width: 42rem;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--md);
}

.tcc-search-form {
	max-width: 44rem;
	margin-block-start: var(--wp--preset--spacing--6);
}

.tcc-search-count {
	color: var(--wp--preset--color--muted);
	font-weight: 700;
}

.tcc-search-notice {
	margin-block-start: var(--wp--preset--spacing--3);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--sm);
}

.tcc-search-results {
	display: grid;
	gap: var(--wp--preset--spacing--5);
	margin-block-start: var(--wp--preset--spacing--6);
}

.tcc-search-result {
	display: grid;
	gap: var(--wp--preset--spacing--3);
	min-width: 0;
	padding: var(--wp--preset--spacing--6);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0.5rem;
	background: var(--wp--preset--color--paper);
}

.tcc-search-result__meta {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
}

.tcc-search-result__title {
	color: var(--wp--preset--color--navy);
	font-size: var(--wp--preset--font-size--lg);
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.tcc-search-result__title a,
.tcc-search-result__title a:visited {
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}

.tcc-search-result__title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

.tcc-search-result__excerpt,
.tcc-search-state {
	color: var(--wp--preset--color--muted);
}

.tcc-search-result__read,
.tcc-search-result__read:visited {
	justify-self: start;
	color: var(--wp--preset--color--teal);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.tcc-search-result__read::after {
	content: " →";
}

.tcc-search-result__read:hover {
	color: var(--wp--preset--color--teal-dk);
}

.tcc-search-state {
	padding: var(--wp--preset--spacing--6);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0.5rem;
	background: var(--wp--preset--color--mist);
}

.tcc-search-state h2 {
	color: var(--wp--preset--color--navy);
	font-size: var(--wp--preset--font-size--xl);
}

.tcc-search-pagination {
	margin-block-start: var(--wp--preset--spacing--8);
}

.tcc-search-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tcc-search-pagination a,
.tcc-search-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding-inline: var(--wp--preset--spacing--3);
	border-radius: 0.25rem;
}

.tcc-search-pagination a {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--teal);
	font-weight: 700;
}

.tcc-search-pagination .current {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--paper);
	font-weight: 700;
}

@media (max-width: 1024px) {

	.tcc-header-search {
		margin-left: auto;
	}

	.tcc-burger {
		margin-left: 0;
	}
}

@media (max-width: 32rem) {

	.tcc-header-search__panel {
		position: fixed;
		inset-block-start: calc(60px + var(--wp-admin--admin-bar--height, 0px) + var(--wp--preset--spacing--2));
		inset-inline: var(--wp--preset--spacing--4);
		width: auto;
	}

	.tcc-header-search__form__row,
	.tcc-search-form__row {
		flex-direction: column;
	}

	.tcc-header-search__form__submit,
	.tcc-search-form__submit {
		width: 100%;
	}

	.tcc-search-hero h1 {
		max-width: none;
		font-size: var(--wp--preset--font-size--xxxl);
	}
}

@media (min-width: 64rem) {

	.tcc-search-hero h1 {
		font-size: var(--wp--preset--font-size--display-lg);
	}
}
