/* Search box (pill with icon, input and button): home hero, search page, 404. */

.sbox {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 520px;
	padding: 6px 6px 6px 22px;
	border-radius: var(--rbnl-radius-pill);
	background: var(--rbnl-white);
	box-shadow:
		0 1px 0 var(--rbnl-line),
		0 12px 32px rgba(33, 30, 100, 0.07);
	transition: box-shadow 0.35s var(--rbnl-ease);
}

.sbox:hover {
	box-shadow:
		0 1px 0 var(--rbnl-line),
		0 18px 40px rgba(33, 30, 100, 0.12);
}

.sbox:focus-within {
	box-shadow:
		0 0 0 3px rgba(33, 30, 100, 0.18),
		0 18px 40px rgba(33, 30, 100, 0.12);
}

.sbox__icon {
	display: flex;
	flex: 0 0 auto;
	color: var(--rbnl-mute);
}

.sbox__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 48px;
	padding: 0 2px;
	border: 0;
	background: transparent;
	color: var(--rbnl-ink);
	font-family: var(--rbnl-font-body);
	font-size: 17px;
	outline: none;
}

.sbox__input::placeholder {
	color: var(--rbnl-mute);
}

.sbox .btn {
	flex: 0 0 auto;
}

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

.sbox {
	position: relative;
}

.sbox__panel {
	position: absolute;
	z-index: 20;
	top: calc(100% + 8px);
	right: 0;
	left: 0;
	padding: 8px;
	border-radius: 24px;
	background: var(--rbnl-white);
	box-shadow: var(--rbnl-shadow-menu);
}

.sbox__panel[hidden] {
	display: none;
}

.sbox__list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sbox__list[hidden] {
	display: none;
}

.sbox__opt {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 2px 12px;
	min-height: 44px;
	padding: 10px 16px;
	border-radius: 16px;
	cursor: pointer;
	transition: background-color 0.2s var(--rbnl-ease);
}

.sbox__opt[aria-selected='true'] {
	background: var(--rbnl-sand);
}

.sbox__opt-title {
	color: var(--rbnl-ink);
	font-weight: 500;
}

.sbox__opt-meta {
	color: var(--rbnl-mute);
	font-size: 14px;
}

.sbox__none {
	margin: 0;
	padding: 12px 16px;
	color: var(--rbnl-text);
}

@media (prefers-reduced-motion: reduce) {
	.sbox__opt {
		transition: none;
	}
}
