.group {
	display: flex;
	gap: var(--s-1);
	width: max-content;

	&[data-orientation="vertical"] {
		flex-direction: column;
		align-items: stretch;
	}

	&[data-wrap="true"] {
		flex-wrap: wrap;
		width: auto;
	}
}

.label {
	font-size: var(--font-xs);
	font-weight: var(--weight-semi);
	padding: 0 var(--s-2);
	height: var(--selector-size);
	border-radius: var(--radius-selector);
	background-color: var(--color-bg-higher);
	color: var(--color-text);
	cursor: pointer;
	transition: background-color 0.15s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.radio {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;

	&:focus-visible + .label {
		outline: var(--focus-ring);
		outline-offset: 2px;
	}

	&:checked + .label {
		background-color: var(--color-text-accent);
		color: var(--color-text-inverse);
	}
}
