/* HTT header search: expanding pill on the menu bar + live suggestions. */
.htt-search {
	--hs-accent: var(--tp-theme-secondary, #05dac3);
	--hs-ink: var(--tp-heading-primary, #020626);
	--hs-muted: var(--tp-text-body, #5a627d);
	position: relative;
	display: flex;
	align-items: center;
	z-index: 20;
}
.htt-search__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 1px solid rgba(2, 6, 38, 0.1);
	border-radius: 50%;
	background: #fff;
	color: var(--hs-ink);
	font-size: 18px;
	cursor: pointer;
	transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.htt-search__toggle:hover,
.htt-search__toggle:focus-visible,
.htt-search.is-open .htt-search__toggle {
	background: var(--hs-ink);
	border-color: var(--hs-ink);
	color: #fff;
	outline: none;
}

/* Pill input: always full size (so it can take focus at once), revealed leftwards from the toggle */
.htt-search__form {
	position: absolute;
	top: 50%;
	right: 0;
	display: flex;
	align-items: center;
	width: 360px;
	height: 52px;
	margin: 0;
	padding: 0 6px 0 20px;
	border: 1.5px solid rgba(2, 6, 38, 0.12);
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(2, 6, 38, 0.08);
	opacity: 0;
	pointer-events: none;
	transform: translateY(-50%);
	clip-path: inset(-30px -30px -30px calc(100% - 46px) round 999px);
	transition: clip-path 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s, border-color 0.25s;
}
.htt-search.is-open .htt-search__form {
	opacity: 1;
	pointer-events: auto;
	clip-path: inset(-30px -30px -30px -30px round 999px);
}
.htt-search__form:focus-within {
	border-color: var(--hs-accent);
	box-shadow: 0 0 0 4px rgba(5, 218, 195, 0.15), 0 10px 30px rgba(2, 6, 38, 0.08);
}
.htt-search__icon {
	flex: none;
	color: var(--hs-muted);
	font-size: 16px;
}
.htt-search__form input.htt-search__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0 10px 0 12px;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--hs-ink);
	font-size: 15px;
	line-height: 1;
	outline: none;
}
.htt-search__input::placeholder {
	color: #9aa0b4;
	opacity: 1;
}
.htt-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}
.htt-search__close {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: var(--tp-grey-2, #f5f6f8);
	color: var(--hs-ink);
	font-size: 16px;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}
.htt-search__close:hover,
.htt-search__close:focus-visible {
	background: var(--hs-ink);
	color: #fff;
	outline: none;
}

/* Suggestions panel */
.htt-search__panel {
	position: absolute;
	top: calc(50% + 38px);
	right: 0;
	width: 420px;
	max-height: min(70vh, 520px);
	overflow-y: auto;
	padding: 10px;
	border: 1px solid rgba(2, 6, 38, 0.06);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(2, 6, 38, 0.16);
	animation: htt-search-in 0.2s ease-out;
}
.htt-search__panel[hidden] {
	display: none !important;
}
@keyframes htt-search-in {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: none; }
}
.htt-search__group {
	padding: 10px 12px 6px;
	color: var(--hs-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.htt-search__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 12px;
	border-radius: 12px;
	color: var(--hs-ink);
	text-decoration: none;
	transition: background-color 0.15s;
}
.htt-search__item[aria-selected="true"] {
	background: rgba(5, 218, 195, 0.12);
	color: var(--hs-ink);
}
.htt-search__item-icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--tp-grey-2, #f5f6f8);
	color: var(--hs-ink);
	font-size: 15px;
	transition: background-color 0.15s, color 0.15s;
}
.htt-search__item[aria-selected="true"] .htt-search__item-icon {
	background: var(--hs-accent);
	color: var(--hs-ink);
}
.htt-search__item-title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.htt-search__item-title mark {
	padding: 0;
	background: none;
	color: inherit;
	font-weight: 700;
	box-shadow: inset 0 -0.35em 0 rgba(5, 218, 195, 0.35);
}
.htt-search__item-label {
	flex: none;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--tp-grey-2, #f5f6f8);
	color: var(--hs-muted);
	font-size: 11px;
	font-weight: 500;
}
.htt-search__empty {
	padding: 14px 12px;
	color: var(--hs-muted);
	font-size: 14px;
}
.htt-search__all {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	padding: 11px 12px;
	border-top: 1px solid rgba(2, 6, 38, 0.06);
	color: var(--hs-ink);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}
.htt-search__all:hover {
	color: var(--hs-ink);
	text-decoration: underline;
	text-decoration-color: var(--hs-accent);
	text-underline-offset: 3px;
}
.htt-search__hint {
	padding: 8px 12px 4px;
	color: #9aa0b4;
	font-size: 12px;
}

/* Tablet / phone: toggle beside the hamburger, full-width bar below the header */
@media (max-width: 1199px) {
	.htt-search {
		position: static;
	}
	.htt-search__toggle {
		position: absolute;
		top: 50%;
		right: 168px;
		transform: translateY(-50%);
		z-index: 3;
	}
	.htt-search__form,
	.htt-search.is-open .htt-search__form {
		top: 100%;
		left: 12px;
		right: 12px;
		width: auto;
		margin-top: 10px;
		clip-path: none;
	}
	.htt-search__form {
		transform: translateY(-8px);
		transition: transform 0.25s ease-out, opacity 0.2s, border-color 0.25s;
	}
	.htt-search.is-open .htt-search__form {
		transform: none;
	}
	.htt-search__panel {
		top: calc(100% + 72px);
		left: 12px;
		right: 12px;
		width: auto;
		max-height: calc(100vh - 220px);
	}
	.htt-search__hint {
		display: none;
	}
}
@media (max-width: 767px) {
	.htt-search__toggle {
		right: 124px;
		width: 42px;
		height: 42px;
		font-size: 17px;
	}
	.htt-search__item-label {
		display: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	.htt-search__form,
	.htt-search__panel {
		transition: none !important;
		animation: none !important;
	}
}

/* Room for the round toggle next to the header button (VI label is longer) */
@media (min-width: 1200px) {
	.tp-header-main-right .tp-header-btn.pl-40 {
		padding-left: 18px;
	}
	.tp-header-main-right .tp-header-btn .tp-btn {
		white-space: nowrap;
	}
}
