/* Lists area (W4a): list rows, the list header and its editor, members. */

@scope ([data-c="list-row"]) to ([data-c]) {
	:scope {
		display: flex;
		align-items: center;
		gap: var(--s3);
		padding: var(--s4);
		min-height: 44px;
		color: var(--ink);
		text-decoration: none;
	}

	:scope:hover {
		background: var(--surface);
	}

	.art {
		position: relative;
		flex: none;
		width: 48px;
		height: 48px;
		overflow: hidden;
		background: var(--surface);
		border: 1px solid var(--line);
		border-radius: var(--r-ctl);
	}

	.text {
		flex: 1;
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: var(--s1);
	}

	.name {
		display: flex;
		align-items: center;
		gap: var(--s2);
		min-width: 0;
	}

	.name b {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.dim {
		color: var(--ink-dim);
		font-size: var(--t-sm);
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.count {
		flex: none;
	}
}

@scope ([data-c="list-header"]) to ([data-c]) {
	:scope {
		display: flex;
		flex-direction: column;
		gap: var(--s3);
		padding: var(--s4);
		border-bottom: 1px solid var(--line);
	}

	p {
		margin: 0;
		overflow-wrap: anywhere;
	}

	.line {
		display: flex;
		align-items: center;
		gap: var(--s2);
	}

	.dim {
		color: var(--ink-dim);
		font-size: var(--t-sm);
	}

	.actions {
		display: flex;
		gap: var(--s2);
	}
}

@scope ([data-c="list-editor-form"]) to ([data-c]) {
	:scope {
		display: flex;
		flex-direction: column;
		gap: var(--s4);
	}

	.failure {
		margin: 0;
		color: var(--danger);
	}
}

@scope ([data-c="member-row"]) to ([data-c]) {
	:scope {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		gap: var(--s3);
		padding-right: var(--s4);
	}

	.remove {
		flex: none;
		padding-top: var(--s4);
	}
}

[data-c="member-row"] > [data-c="user-row"] {
	flex: 1;
	min-width: 0;
}
