/* UX-05 — Full results and header suggestions. Colors come from the Customizer. */
body.search {
	background: var(--hm-background);
}

.hm-header-tools:has(.hm-search-fallback) #search-trigger {
	display: none;
}

#header .hm-search-fallback {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid currentColor;
	border-radius: 22px;
	color: inherit;
	font: 14px/1.3 "BrownStd-Bold", Arial, sans-serif;
}

#section.hm-search-page {
	box-sizing: border-box;
	margin: 0;
	padding: 58px 32px 80px;
	background: var(--hm-background);
	color: var(--hm-primary);
	font-family: "BrownStd-Regular", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
}

.hm-search-page *,
.hm-header-search-form *,
.hm-search-suggestions * {
	box-sizing: border-box;
}

.hm-search-page__inner {
	max-width: 1060px;
	margin: 0 auto;
}

.hm-search-page__heading {
	max-width: 900px;
	margin-bottom: 32px;
}

.hm-search-page__eyebrow {
	margin: 0 0 18px;
	font-family: "BrownStd-Bold", Arial, sans-serif;
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.hm-search-page__heading h1 {
	margin: 0;
	color: var(--hm-primary);
	font: 400 clamp(32px, 4.2vw, 54px)/1.12 "BrownStd-Bold", Arial, sans-serif;
	overflow-wrap: anywhere;
}

.hm-search-page__heading h1 span {
	font-family: "Cooper", Georgia, serif;
	font-weight: 400;
}

.hm-search-page__intro {
	margin: 20px 0 0;
	font-size: 18px;
}

.hm-search-page__form {
	padding: 24px;
	background: var(--hm-secondary);
}

.hm-search-page__form > label {
	display: block;
	margin: 0 0 9px;
	font: 14px/1.4 "BrownStd-Bold", Arial, sans-serif;
}

.hm-search-page__input-row {
	display: flex;
	gap: 12px;
}

.hm-search-page__input-row input {
	flex: 1 1 0;
	min-width: 0;
	width: 100%;
	min-height: 56px;
	margin: 0;
	padding: 13px 16px;
	border: 1px solid var(--hm-primary);
	border-radius: 0;
	background: var(--hm-background);
	color: var(--hm-primary);
	font: 18px/1.4 "BrownStd-Regular", Arial, sans-serif;
}

.hm-search-page__input-row input::placeholder {
	color: var(--hm-primary);
	opacity: .7;
}

.hm-search-page__input-row button,
.hm-search-page__sort button {
	flex: 0 0 auto;
	min-height: 48px;
	padding: 12px 20px;
	border: 1px solid var(--hm-primary);
	border-radius: 0;
	background: var(--hm-primary);
	color: var(--hm-background);
	font: 14px/1.4 "BrownStd-Bold", Arial, sans-serif;
	cursor: pointer;
}

.hm-search-page__input-row button:hover,
.hm-search-page__sort button:hover {
	background: var(--hm-accent2);
	color: var(--hm-primary);
}

.hm-search-page__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 24px 0 32px;
}

.hm-search-page__filters a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 9px 16px;
	border: 1px solid var(--hm-primary);
	border-radius: 24px;
	background: var(--hm-background);
	color: var(--hm-primary);
	font-size: 14px;
	text-decoration: none;
}

.hm-search-page__filters a:hover,
.hm-search-page__filters a[aria-current] {
	background: var(--hm-primary);
	color: var(--hm-background);
}

.hm-search-page__filters a[aria-current] {
	font-family: "BrownStd-Bold", Arial, sans-serif;
}

.hm-search-page__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px 24px;
	padding-bottom: 20px;
}

.hm-search-page__count {
	margin: 0;
	font-size: 16px;
}

.hm-search-page__count strong {
	font-family: "BrownStd-Bold", Arial, sans-serif;
	font-weight: 400;
}

.hm-search-page__sort {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 14px;
}

.hm-search-page__sort label {
	margin: 0;
}

.hm-search-page__sort select {
	width: auto;
	max-width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 32px 10px 12px;
	border: 1px solid var(--hm-primary);
	border-radius: 0;
	background-color: var(--hm-background);
	color: var(--hm-primary);
	font: inherit;
}

.hm-search-page__sort button {
	min-height: 44px;
	padding: 10px 14px;
}

.hm-search-page__results {
	border-top: 2px solid var(--hm-primary);
}

.hm-search-result {
	position: relative;
	padding: 30px 0;
	border-bottom: 1px solid var(--hm-primary);
}

.hm-search-result__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin-bottom: 12px;
	font-size: 13px;
}

.hm-search-result__type,
.hm-search-result__category,
#header .hm-search-suggestions__type,
#header .hm-search-suggestions__category {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 4px 10px;
	border-radius: 20px;
	background: var(--hm-secondary);
	color: var(--hm-primary);
	font: 13px/1.5 "BrownStd-Bold", Arial, sans-serif;
	overflow-wrap: anywhere;
}

/* Same editorial category palette as the homepage, in French and English. */
.hm-search-result__category,
#header .hm-search-suggestions__category {
	color: var(--hm-grey3, var(--hm-primary));
}

:is(.hm-search-result__category, #header .hm-search-suggestions__category)[data-accent="accent"] {
	background: var(--hm-accent);
}

:is(.hm-search-result__category, #header .hm-search-suggestions__category)[data-accent="accent2"] {
	background: var(--hm-accent2);
}

:is(.hm-search-result__category, #header .hm-search-suggestions__category)[data-accent="accent3"] {
	background: var(--hm-accent3);
}

:is(.hm-search-result__category, #header .hm-search-suggestions__category)[data-accent="accent4"] {
	background: var(--hm-accent4);
}

:is(.hm-search-result__category, #header .hm-search-suggestions__category)[data-accent="accent5"] {
	background: var(--hm-accent5);
}

.hm-search-result__status {
	padding: 4px 10px;
	border-radius: 16px;
	background: var(--hm-accent2);
	color: var(--hm-primary);
	font-size: 12px;
}

.hm-search-result__title {
	max-width: 880px;
	margin: 0 0 12px;
	font: 400 clamp(23px, 2.3vw, 30px)/1.2 "BrownStd-Bold", Arial, sans-serif;
	overflow-wrap: anywhere;
}

.hm-search-result__title a {
	color: var(--hm-primary);
	text-decoration: none;
}

.hm-search-result__title a:hover .hm-search-result__title-label {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: .13em;
}

.hm-search-result__excerpt,
.hm-search-result__dates {
	max-width: 820px;
	margin: 0 0 15px;
	color: var(--hm-primary);
	font-size: 16px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.hm-search-result__dates {
	font-size: 14px;
}

.hm-search-result__action,
.hm-search-page__empty a {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	min-height: 44px;
	color: var(--hm-primary);
	font: 14px/1.4 "BrownStd-Bold", Arial, sans-serif;
	text-decoration: none;
	text-underline-offset: .2em;
}

.hm-search-result__action-label {
	text-decoration: underline;
	text-underline-offset: .2em;
}

.hm-search-result__action > span[aria-hidden] {
	font-size: 20px;
}

.hm-search-result__external {
	font: 12px/1.4 "BrownStd-Regular", Arial, sans-serif;
}

.hm-search-page__empty {
	padding: 44px 0;
}

.hm-search-page__empty h2 {
	max-width: 760px;
	margin: 0 0 16px;
	color: var(--hm-primary);
	font: 400 26px/1.25 "BrownStd-Bold", Arial, sans-serif;
}

.hm-search-page__empty p {
	max-width: 760px;
	margin: 0 0 16px;
	font-size: 16px;
}

.hm-search-page__examples {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.hm-search-page__pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 36px;
}

.hm-search-page__pagination a,
.hm-search-page__page-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--hm-primary);
	color: var(--hm-primary);
	font-size: 14px;
	text-decoration: none;
}

.hm-search-page__pagination a:hover,
.hm-search-page__pagination [aria-current] {
	background: var(--hm-primary);
	color: var(--hm-background);
}

.hm-search-page__page-direction {
	gap: 8px;
}

.hm-search-page__ellipsis {
	padding: 0 2px;
}

.hm-search-page__page-position {
	margin: 14px 0 0;
	font-size: 12px;
	text-align: center;
}

.hm-search-page__results {
	scroll-margin-top: calc(var(--hm-header-height) + 24px);
}

.hm-search-page__notices {
	margin: 0 0 22px;
	padding: 14px 18px;
	border-left: 3px solid var(--hm-primary);
	background: var(--hm-secondary);
	color: var(--hm-primary);
}

.hm-search-page__notices p {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
}

.hm-search-page__notices p + p {
	margin-top: 10px;
}

.hm-search-result__type--press,
#header .hm-search-suggestions__type--press {
	background: var(--hm-primary);
	color: var(--hm-secondary);
}

.hm-search-brand,
#header .hm-search-brand {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	max-width: 100%;
	color: var(--hm-primary);
	font: 13px/1.5 "BrownStd-Bold", Arial, sans-serif;
}

.hm-search-brand--memento,
#header .hm-search-brand--memento {
	width: 112px;
	height: 20px;
	background: var(--hm-primary);
	-webkit-mask: url("../img/content/memento-logo.svg") center / contain no-repeat;
	mask: url("../img/content/memento-logo.svg") center / contain no-repeat;
}

.hm-search-brand__image,
#header .hm-search-brand__image {
	display: block;
	width: auto;
	height: 28px;
	max-width: 104px;
	object-fit: contain;
	object-position: left center;
}

.hm-search-result__place-type,
#header .hm-search-suggestions__place-type {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 3px 9px;
	border: 1px solid var(--hm-primary);
	border-radius: 20px;
	background: var(--hm-secondary);
	color: var(--hm-primary);
	font: 13px/1.5 "BrownStd-Regular", Arial, sans-serif;
	overflow-wrap: anywhere;
}

.hm-search-result__address {
	margin: 0 0 14px;
	color: var(--hm-primary);
	font-size: 14px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.hm-search-page :is(a, button, input, select):focus-visible,
#header .hm-header-search-form :is(a, button, input):focus-visible,
#header .hm-search-suggestions a:focus-visible,
#header .hm-search-suggestions__all:focus-visible {
	outline: 3px solid var(--hm-primary);
	outline-offset: 4px;
}

.hm-search-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* These overrides replace the legacy field and grouped dropdown. */
#header #search-zone.hm-search-zone {
	background: var(--hm-background);
	color: var(--hm-primary);
}

#header #search-zone[aria-hidden="true"] {
	visibility: hidden;
}

#header #search-zone[aria-hidden="false"] {
	visibility: visible;
}

#header .hm-header-search-form {
	margin: 0;
}

#header #search-zone .hm-header-search-form #search-field {
	display: flex;
	align-items: stretch;
	gap: 12px;
	padding: 22px 24px 0;
	border: 0;
}

#header #search-zone .hm-header-search-form #search-field > input {
	flex: 1 1 0;
	min-width: 0;
	width: 100%;
	height: 52px;
	min-height: 52px;
	padding: 12px;
	border: 1px solid var(--hm-primary);
	border-radius: 0;
	background: var(--hm-background);
	color: var(--hm-primary);
	font: 16px/1.4 "BrownStd-Regular", Arial, sans-serif;
}

#header #search-zone .hm-header-search-form #search-field > input::placeholder {
	color: var(--hm-primary);
	opacity: .7;
}

#header #search-zone .hm-header-search-form #search-field > input:focus {
	box-shadow: none;
}

#header .hm-header-search-form button[type="submit"] {
	flex: 0 0 auto;
	min-height: 52px;
	padding: 12px 16px;
	border: 1px solid var(--hm-primary);
	border-radius: 0;
	background: var(--hm-primary);
	color: var(--hm-background);
	font: 14px/1.3 "BrownStd-Bold", Arial, sans-serif;
	cursor: pointer;
}

#header .hm-header-search-form button[type="submit"]:hover {
	background: var(--hm-accent2);
	color: var(--hm-primary);
}

#header #hm-search-status {
	min-height: 20px;
	margin: 10px 24px 14px;
	color: var(--hm-primary);
	font: 13px/1.4 "BrownStd-Regular", Arial, sans-serif;
}

#header #mask-search-ajax-drop {
	max-height: none;
	overflow: visible;
}

#header #search-ajax-drop {
	padding: 16px 24px 20px;
}

#header #search-ajax-drop[hidden] {
	display: none;
}

#header .hm-search-suggestions {
	margin: 0;
	padding: 0;
	list-style: none;
}

#header .hm-search-suggestions li {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--hm-primary);
	list-style: none;
}

#header .hm-search-suggestions a {
	display: grid;
	gap: 5px;
	min-height: 64px;
	padding: 12px;
	background: var(--hm-background);
	color: var(--hm-primary);
	font: 16px/1.35 "BrownStd-Bold", Arial, sans-serif;
	text-decoration: none;
	overflow-wrap: anywhere;
}

#header .hm-search-suggestions__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 8px;
}

#header .hm-search-suggestions__detail {
	font: 12px/1.4 "BrownStd-Regular", Arial, sans-serif;
}

#header .hm-search-suggestions a:hover,
#header .hm-search-suggestions a[aria-selected="true"] {
	background: var(--hm-accent2);
	color: var(--hm-primary);
}

#header .hm-search-suggestions__all {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
	margin-top: 8px;
	padding: 12px;
	background: var(--hm-primary);
	color: var(--hm-background);
	font: 14px/1.4 "BrownStd-Bold", Arial, sans-serif;
	text-decoration: none;
}

#header .hm-search-suggestions__all:hover {
	background: var(--hm-accent2);
	color: var(--hm-primary);
}

#header .hm-search-suggestions__notices {
	margin: 0 0 14px;
	padding: 10px 12px;
	border-left: 3px solid var(--hm-primary);
	background: var(--hm-secondary);
	color: var(--hm-primary);
}

#header .hm-search-suggestions__notices p {
	margin: 0;
	font: 13px/1.5 "BrownStd-Regular", Arial, sans-serif;
}

#header .hm-search-suggestions__notices p + p {
	margin-top: 8px;
}

@media (max-width: 700px) {
	#section.hm-search-page {
		padding: 28px 20px 48px;
	}

	.hm-search-page__heading {
		margin-bottom: 24px;
	}

	.hm-search-page__eyebrow {
		margin-bottom: 14px;
		font-size: 11px;
	}

	.hm-search-page__intro {
		font-size: 16px;
	}

	.hm-search-page__form {
		padding: 18px;
	}

	.hm-search-page__input-row {
		flex-wrap: wrap;
		gap: 10px;
	}

	.hm-search-page__input-row input {
		flex-basis: 100%;
		min-height: 52px;
		font-size: 16px;
	}

	.hm-search-page__input-row button {
		width: 100%;
	}

	.hm-search-page__filters {
		margin: 20px 0 24px;
		gap: 8px;
	}

	.hm-search-page__filters a {
		padding: 9px 13px;
		font-size: 13px;
	}

	.hm-search-page__toolbar {
		align-items: flex-start;
		gap: 14px;
	}

	.hm-search-page__count,
	.hm-search-page__sort {
		width: 100%;
	}

	.hm-search-page__sort {
		gap: 8px;
	}

	.hm-search-page__sort select {
		flex: 1 1 auto;
		min-width: 0;
		font-size: 16px;
	}

	.hm-search-result {
		padding: 24px 0;
	}

	.hm-search-result__meta {
		gap: 8px 12px;
	}

	.hm-search-page__empty {
		padding: 30px 0;
	}

	.hm-search-page__empty h2 {
		font-size: 23px;
	}

	.hm-search-page__pagination {
		gap: 6px;
		margin-top: 26px;
	}

	.hm-search-page__pagination .hm-search-page__page-direction {
		flex-basis: 100%;
	}

	#header #search-zone .hm-header-search-form #search-field {
		gap: 8px;
		padding: 18px 16px 0;
	}

	#header .hm-header-search-form button[type="submit"] {
		padding: 10px 12px;
		font-size: 13px;
	}

	#header #hm-search-status {
		margin-right: 16px;
		margin-left: 16px;
	}

	#header #search-ajax-drop {
		padding-right: 16px;
		padding-left: 16px;
	}
}

/* Progressive page updates retain the standard GET links and forms. */
.hm-search-page__async-status {
	max-width: 1060px;
	margin: 0 auto 20px;
	padding: 12px 16px;
	background: var(--hm-secondary);
	color: var(--hm-primary);
	font-size: 14px;
}

.hm-search-page__async-status a {
	color: inherit;
	text-decoration: underline;
}

.hm-search-page[aria-busy="true"] .hm-search-page__results {
	opacity: .6;
}
