div:has(> .list) {
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow-y: hidden;

	> :where(button),
	> .Popover > :where(button) {
		align-self: flex-start;
	}
}

.list {
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: scroll;
	margin: 0.5em 0;
}

div.list-header {
	font-weight: bold;
	border-bottom: 1.5px solid var(--fg-accent);
	position: sticky;
	background-color: var(--bg-normal);
	top: 0em;
	z-index: 1;

	@media (width < 700px) {
		display: none !important;
	}
}

.list-item-container {
	text-decoration: none;
	color: inherit;
}

.list-item {
	display: grid;
	align-items: center;
	gap: 1em;
	padding: 0.5em;
	overflow: hidden;
	text-wrap: nowrap;
	flex: 0 0 auto;
}

.list-item:not(.list-header, :first-child) {
	border-top: 1px solid var(--fg-accent);
}

.list-item:not(.list-header):hover {
	background-color: var(--bg-alt);
}

p.list-empty {
	text-align: center;
	color: #888;
	margin-top: 1em;
	font-style: italic;
}

.list-item .action {
	visibility: hidden;
}

.list-item:hover .action {
	visibility: visible;
	cursor: pointer;
}
