/* Whole-site search: the suggestion dropdown under every header search box,
 * and the full results page (/?s=…&smc_all=1).
 */

/* ---------------- suggestions ---------------- */

.smc-ss {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 10000;
	max-height: min(70vh, 560px);
	overflow-y: auto;
	padding: 6px 0;
	background: #fff;
	border: 1px solid #e1e6eb;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
	text-align: left;
	font-size: 14px;
	line-height: 1.3;
}

.smc-ss[hidden] {
	display: none !important;
}

.smc-ss__group + .smc-ss__group {
	border-top: 1px solid #f0f2f4;
	margin-top: 4px;
	padding-top: 4px;
}

.smc-ss__label {
	padding: 6px 14px 4px;
	color: #6b7680;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.smc-ss__label span {
	font-weight: 500;
	letter-spacing: 0;
}

.smc-ss a.smc-ss__item {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 6px 14px;
	color: #333e48 !important;
	text-decoration: none !important;
}

.smc-ss a.smc-ss__item:hover,
.smc-ss a.smc-ss__item.is-active {
	background: #f2f8fe;
}

.smc-ss__thumb {
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 8px;
	background: #f3f5f7;
	color: #0787ea;
	font-weight: 700;
}

.smc-ss__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.smc-ss__text {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.smc-ss__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.smc-ss__meta {
	color: #6b7680;
	font-size: 12px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.smc-ss a.smc-ss__all {
	display: block;
	margin-top: 4px;
	padding: 12px 14px 8px;
	border-top: 1px solid #f0f2f4;
	color: #0787ea !important;
	font-weight: 600;
	text-decoration: none !important;
}

.smc-ss a.smc-ss__all.is-active,
.smc-ss a.smc-ss__all:hover {
	background: #f2f8fe;
}

.smc-ss__none {
	margin: 0;
	padding: 12px 14px;
	color: #6b7680;
}

/* ---------------- results page ---------------- */

.smc-sr {
	max-width: 960px;
	margin: 0 auto;
	padding: 8px 0 40px;
}

.smc-sr__head {
	margin-bottom: 18px;
}

.smc-sr__title {
	margin: 0 0 14px;
	font-size: 24px;
	line-height: 1.25;
}

.smc-sr__form {
	display: flex;
	gap: 8px;
	margin: 0 0 14px;
}

.smc-sr__form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 46px;
	padding: 0 16px;
	border: 2px solid #0787ea;
	border-radius: 23px;
	font-size: 16px;
}

.smc-sr .smc-sr__form button {
	flex: 0 0 auto;
	height: 46px;
	padding: 0 20px !important;
	border: 0 !important;
	border-radius: 23px !important;
	background: #0787ea !important;
	color: #fff !important;
	font-weight: 600;
}

.smc-sr__jump {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.smc-sr__jump a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid #dfe5ea;
	border-radius: 18px;
	color: #333e48 !important;
	font-size: 13px;
	text-decoration: none !important;
}

.smc-sr__jump a span,
.smc-sr__count {
	color: #6b7680;
	font-weight: 500;
}

.smc-sr__group {
	margin-top: 22px;
	scroll-margin-top: 90px;
}

.smc-sr__gtitle {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 0 0 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e6ebf0;
	font-size: 18px;
}

.smc-sr__count {
	font-size: 14px;
}

.smc-sr__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 4px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.smc-sr a.smc-sr__item {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 64px;
	padding: 6px 8px;
	border-radius: 10px;
	color: #333e48 !important;
	text-decoration: none !important;
}

.smc-sr a.smc-sr__item:hover {
	background: #f2f8fe;
}

.smc-sr__thumb {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 10px;
	background: #f3f5f7;
	color: #0787ea;
	font-size: 20px;
	font-weight: 700;
}

.smc-sr__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.smc-sr__text {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.smc-sr__name {
	font-weight: 600;
}

.smc-sr__meta {
	color: #6b7680;
	font-size: 13px;
}

.smc-sr__more {
	display: inline-block;
	margin-top: 10px;
	color: #0787ea !important;
	font-weight: 600;
}

.smc-sr__empty {
	padding: 24px 0;
	color: #555;
}

.smc-sr__browse {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.smc-sr__browse a {
	padding: 8px 14px;
	border: 1px solid #0787ea;
	border-radius: 18px;
	color: #0787ea !important;
	text-decoration: none !important;
}

/* Phones already have the search box in the header, showing the query. */
@media (max-width: 1199.98px) {
	.smc-sr {
		padding-left: 16px;
		padding-right: 16px;
	}

	.smc-sr__form {
		display: none;
	}
}

@media (max-width: 575.98px) {

	.smc-sr__title {
		font-size: 20px;
	}

	.smc-sr__list {
		grid-template-columns: 1fr;
	}

	.smc-sr .smc-sr__form button {
		padding: 0 16px !important;
	}
}
