/* The prompt chips above a new chat's composer (components/chip-scroller.js). */
.cs {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-width: 0;
}
.cs[hidden] {
	display: none;
}
.cs-side,
.cs-arrows {
	display: flex;
	flex: none;
	align-items: center;
	gap: 4px;
}
.cs-arrows[hidden] {
	display: none;
}
.cs-round {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: 50%;
	background: var(--surface);
	color: var(--muted);
	box-shadow: var(--shadow);
	cursor: pointer;
}
.cs-round:hover:not(:disabled) {
	color: var(--text-strong);
}
.cs-round:disabled {
	opacity: 0.4;
	cursor: default;
}
/* the row's well slides out from under this */
.cs-side {
	position: relative;
	z-index: 1;
}
.cs-row {
	display: flex;
	flex: 1;
	min-width: 0;
	gap: 8px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	touch-action: pan-x;
	white-space: nowrap;
	scrollbar-width: none;
	/* a well sunk into the page, like the composer: the chips scroll inside it and
	   go under its rim, so no fading edges */
	padding: 3px;
	border: 1px solid var(--border);
	border-top-color: var(--well-top, var(--border));
	border-bottom-color: var(--well-bottom, var(--border));
	border-radius: 999px;
	background: var(--well-bg, var(--surface-2));
	box-shadow: var(--well-shadow, none);
}
.cs.is-collapsed .cs-row {
	flex: 0 0 0;
	width: 0;
	padding-inline: 0;
	border-inline-width: 0;
	margin-left: -8px; /* no gap after the pill either */
	overflow: hidden;
	visibility: hidden;
}
.cs-row::-webkit-scrollbar {
	display: none;
}
/* out of sight until the button is home (then it slides out) */
.cs-flying .cs-row,
.cs-flying .cs-arrows {
	visibility: hidden;
}
.cs-scrollbar .cs-row {
	padding-bottom: 6px;
	scrollbar-width: thin;
}
.cs-scrollbar .cs-row::-webkit-scrollbar {
	display: block;
	height: 4px;
}
.cs-scrollbar .cs-row::-webkit-scrollbar-thumb {
	border-radius: 2px;
	background: var(--border-strong);
}
.cs-chip {
	flex: none;
	max-width: 280px;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 6px 12px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface);
	color: var(--muted);
	font: inherit;
	font-size: calc(13px * var(--ui-scale));
	cursor: pointer;
	transition: color 150ms, border-color 150ms, background 150ms;
}
.cs-chip:hover {
	color: var(--text-strong);
	border-color: var(--border-strong);
}
.cs-chip:active {
	background: var(--surface-2);
}
/* folded: the round button stretched into a pill, so it looks like the same button */
.cs-show {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: flex-start;
	gap: 4px;
	height: 24px;
	padding: 0 10px 0 8px;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface);
	color: var(--muted);
	box-shadow: var(--shadow);
	font: inherit;
	font-size: calc(12px * var(--ui-scale));
	white-space: nowrap;
	cursor: pointer;
}
.cs-show svg {
	flex: none;
}
.cs-show:hover {
	color: var(--text-strong);
}
/* while changing shape the words would be squeezed: they wait (the bubble stays) */
.cs-morphing .cs-show > span {
	opacity: 0;
}
.cs-show > * {
	transition: opacity 160ms;
}
@media (prefers-reduced-motion: reduce) {
	.cs-show > * {
		transition: none;
	}
}
/* the icon changing over leaves and enters past the button's rim */
.cs-round.cs-swapping {
	overflow: hidden;
}
