/* KVS search-query rails used on search pages and the home discovery hub. */
.search-suggestions {
	position: relative;
	width: 100%;
	margin: -7px 0 18px;
}

.search-suggestions__rail {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 1px 1px 6px;
	-webkit-overflow-scrolling: touch;
	-ms-overflow-style: none;
	scrollbar-width: none;
	-ms-scroll-snap-type: x proximity;
	scroll-snap-type: x proximity;
	overscroll-behavior-inline: contain;
}

.search-suggestions__rail::-webkit-scrollbar {
	display: none;
}

.search-suggestions a {
	display: -webkit-inline-box;
	display: -ms-inline-flexbox;
	display: inline-flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
	-webkit-box-flex: 0;
	-ms-flex: 0 0 auto;
	flex: 0 0 auto;
	min-height: 40px;
	padding: 9px 16px;
	border: 1px solid #2d2d31;
	border-radius: 999px;
	background: #1a1a1d;
	color: #f0f0f2;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	white-space: nowrap;
	text-decoration: none;
	scroll-snap-align: start;
	-webkit-transition: background-color .18s ease, border-color .18s ease, color .18s ease;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.no-touch .search-suggestions a:hover,
.search-suggestions a:focus-visible {
	border-color: #e80000;
	background: #252529;
	color: #fff;
}

.popular-searches {
	width: 100%;
	margin: 12px 0 24px;
}

.popular-searches--top {
	margin: 4px 0 22px;
	padding-top: 2px;
}

.popular-searches__headline {
	margin: 0 0 11px;
	padding: 0;
	min-height: 0;
}

.popular-searches__headline h2 {
	position: relative;
	margin: 0;
	padding-inline-start: 13px;
	padding-inline-end: 0;
	text-align: start;
	font-size: 16px;
	font-weight: 600;
	line-height: 22px;
}

.popular-searches__headline h2::before {
	position: absolute;
	top: 3px;
	bottom: 3px;
	inset-inline-start: 0;
	width: 4px;
	border-radius: 3px;
	background: #e80000;
	content: "";
}

.search-suggestions--home {
	margin: 0;
}

.search-suggestions--home .search-suggestions__rail {
	padding-inline-end: 44px;
	scroll-padding-inline: 44px;
}

/* Retire the decorative arrow in any older cached fragment. */
.search-suggestions__edge {
	display: none;
}

.search-suggestions--home .search-suggestions__control {
	position: absolute;
	top: 1px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	appearance: none;
	color: #fff;
	cursor: pointer;
	touch-action: manipulation;
}

.search-suggestions__control--prev {
	inset-inline-start: 0;
	background: linear-gradient(90deg, #000 62%, rgba(0, 0, 0, 0));
}

.search-suggestions__control--next {
	inset-inline-end: 0;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0), #000 62%);
}

.search-suggestions__control svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.search-suggestions__control--prev svg,
html[dir="rtl"] .search-suggestions__control--next svg {
	transform: rotate(180deg);
}

html[dir="rtl"] .search-suggestions__control--prev svg {
	transform: none;
}

html[dir="rtl"] .search-suggestions__control--prev {
	background: linear-gradient(90deg, rgba(0, 0, 0, 0), #000 62%);
}

html[dir="rtl"] .search-suggestions__control--next {
	background: linear-gradient(90deg, #000 62%, rgba(0, 0, 0, 0));
}

.search-suggestions--home .search-suggestions__control[hidden] {
	display: none;
}

.search-suggestions__control[aria-disabled="true"] {
	opacity: .35;
	cursor: default;
}

.search-suggestions__control:focus-visible {
	outline: 2px solid #e80000;
	outline-offset: -2px;
}

@media screen and (max-width: 767px) {
	.search-suggestions {
		margin: -4px 0 14px;
	}

	.search-suggestions__rail {
		gap: 7px;
		padding-bottom: 4px;
	}

	.search-suggestions a {
		min-height: 34px;
		padding: 7px 12px;
		font-size: 12px;
		line-height: 18px;
	}

	/* Larger home discovery links; other search rails keep their existing sizing. */
	.search-suggestions--home a {
		min-height: 40px;
		padding: 9px 16px;
		font-size: 14px;
		line-height: 20px;
	}

	.popular-searches {
		margin: 5px 0 18px;
	}

	.popular-searches__headline {
		margin-bottom: 9px;
	}

	.popular-searches__headline h2 {
		font-size: 14px;
		line-height: 20px;
	}

}
