.tags {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;

	li {
		display: inline-flex;
		transition: var(--transition);
		margin: 0;
		padding: 0;

		&:active {
			transform: var(--active);
		}
	}

	a {
		transition: var(--transition);
		box-shadow: var(--edge-highlight);
		border-radius: 999px;
		background-color: var(--fg-muted-1);
		padding: 0.2031rem 0.75rem;
		color: var(--fg-muted-5);
		font-size: small;
		text-decoration: none;
		white-space: nowrap;

		&:hover {
			background-color: var(--accent-color-alpha);
			color: var(--accent-color);
			text-decoration: none;

			.count {
				background-color: var(--accent-color-alpha);
				color: var(--accent-color);
			}
		}

		&:has(.tag) {
			padding: 0;
		}

		.tag {
			display: inline-block;
			padding: 0.375rem 0.5rem 0.375rem 0.75rem;

			:root[dir*="rtl"] & {
				padding: 0.25rem 0.75rem 0.25rem 0.5rem;
			}
		}

		.count {
			display: inline-block;
			transition: var(--transition);
			border-radius: 0 999px 999px 0;
			background-color: var(--fg-muted-1);
			padding: 0.375rem 0.625rem 0.375rem 0.5rem;
			font-variant-numeric: tabular-nums;

			:root[dir*="rtl"] & {
				border-radius: 999px 0 0 999px;
				padding: 0.25rem 0.5rem 0.25rem 0.625rem;
			}
		}
	}
}
