/*
  Search on every project page (website2 issue 100): the field in the top bar and what the box adds to Go to file's
  .ab-pop.ab-jump (src/ui/SearchBox.tsx). Tokens only; no hex values. Load after working.css, which has the scrim.
*/

/* ---------- the field in the top bar: after the tabs, before who is signed in ---------- */
.ab-search {
	display: flex;
	align-items: center;
	align-self: center;
	gap: var(--space-2);
	flex: 0 1 220px;
	min-width: 160px;
	height: 30px;
	margin-left: auto;
	padding: 0 8px 0 10px;
	box-sizing: border-box;
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	background: var(--paper);
	color: var(--muted);
	font: var(--type-ui);
	cursor: text;
}
.ab-search:hover {
	border-color: var(--rule-strong);
	color: var(--ink);
}
.ab-search:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}
.ab-search-icon {
	flex: none;
}
.ab-search-text {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: left;
	white-space: nowrap;
}
.ab-search-key {
	flex: none;
	display: inline-flex;
}
/* The one after it keeps a step away from the field, whatever its own margin says. */
.ab-top > .ab-search ~ .ab-top-user,
.ab-top > .ab-search ~ .ab-top-signin {
	margin-left: 12px;
}
/* The person's name never wraps, and never gives up room to the field. */
.ab-top > .ab-top-user {
	flex: none;
	white-space: nowrap;
}
/* The field gives way first: it shrinks from 220px to 160px, and below 1100px it is an icon, as on a phone. */
@media (max-width: 1100px) {
	.ab-search {
		width: 36px;
		min-width: 0;
		height: 36px;
		padding: 0;
		justify-content: center;
		border-color: transparent;
		background: transparent;
	}
	.ab-search-text,
	.ab-search-key {
		display: none;
	}
	.ab-top > .ab-search ~ .ab-top-user,
	.ab-top > .ab-search ~ .ab-top-signin {
		margin-left: 4px;
	}
}
@media (max-width: 720px) {
	.ab-top {
		align-items: center;
	}
	.ab-top-tabs {
		align-self: stretch;
	}
}

/* ---------- the box ---------- */
.ab-search-box .input {
	color: var(--muted);
}
.ab-search-box .input input {
	font: 500 15px / 20px var(--font-sans);
}
/* The sections scroll together, not each by itself. */
.ab-search-box .lists {
	min-height: 0;
	overflow-y: auto;
	padding: 4px;
}
.ab-jump-scrim .ab-search-box ul {
	overflow: visible;
	padding: 0;
}
.ab-search-head {
	margin: 8px 12px 2px;
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
	color: var(--muted);
	letter-spacing: 0.01em;
}
.ab-search-box .lists > .ab-search-head:first-child {
	margin-top: 4px;
}
.ab-search-box li {
	padding: 0;
}
.ab-search-box li > a {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0 12px;
}
.ab-search-box li .n {
	flex: none;
	min-width: 4ch;
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--muted);
}
.ab-search-box li .t {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--font-sans);
	font-size: 14px;
	color: var(--ink);
}
.ab-search-box li .p {
	font-family: var(--font-mono);
	font-size: 13px;
}
.ab-search-box li .ab-status-mark,
.ab-search-nostatus {
	flex: none;
}
.ab-search-nostatus {
	width: 14px;
	height: 14px;
}
.ab-search-none,
.ab-search-help,
.ab-search-status {
	margin: 8px 16px;
	color: var(--muted);
	font-size: 14px;
	line-height: 20px;
}
.ab-search-none {
	margin: 4px 12px 8px;
	font-weight: 600;
	color: var(--ink);
}
.ab-search-help code {
	font-family: var(--font-mono);
}
@media (max-width: 640px) {
	.ab-search-box .foot {
		display: none;
	}
}
