/* Shared by the visual builder and the participant form. */
.tds-nps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, max(var(--tds-score-width, 2.75rem), calc((100% - 2.5rem) / 6))), 1fr));
	gap: .5rem;
}

.tds-nps[data-long-values] {
	--tds-score-width: calc(9ch + 1rem);
}

.tds-nps > label {
	position: relative;
	display: grid;
	margin: 0;
	min-width: 0;
	cursor: pointer;
}

/* Keep the native radio over its entire tile for touch, keyboard and assistive technology. */
.tds-nps > label > input[type="radio"] {
	position: absolute;
	inset: 0;
	z-index: 1;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.tds-nps > label > span {
	box-sizing: border-box;
	display: grid;
	place-items: center;
	min-height: 2.75rem;
	padding: .35rem;
	border: 1px solid var(--tds-survey-border, #c5cbd3);
	border-radius: .5rem;
	background: var(--tds-survey-surface, #fff);
	color: var(--tds-survey-text, #1f2937);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.tds-nps > label:hover > span {
	border-color: var(--tds-survey-primary, #8f4a93);
}

.tds-nps > label > input:checked + span {
	border-color: var(--tds-survey-primary, #8f4a93);
	background: var(--tds-survey-primary, #8f4a93);
	color: #fff;
	box-shadow: inset 0 0 0 1px currentColor;
}

.tds-nps > label > input:focus-visible + span {
	outline: 2px solid var(--tds-survey-primary, #8f4a93);
	outline-offset: 2px;
}

.tds-nps-anchors {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: .5rem;
	color: var(--tds-survey-muted, #50575e);
	font-size: .875rem;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.tds-nps-anchors > span:last-child {
	text-align: end;
}

.tds-survey-radio-list {
	display: grid;
	gap: .125rem;
}

.tds-survey-radio-list > label {
	display: flex;
	align-items: center;
	gap: .625rem;
	width: fit-content;
	max-width: 100%;
	min-height: 2.75rem;
	margin: 0;
	cursor: pointer;
}

.tds-survey-radio-list > label > input[type="radio"] {
	margin: 0;
	flex: none;
	accent-color: var(--tds-survey-primary, #8f4a93);
}

.tds-survey-radio-list > label > span {
	overflow-wrap: anywhere;
}

@media (forced-colors: active) {
	.tds-nps > label > input:checked + span {
		border: 3px solid Highlight;
	}
	.tds-nps > label > input:focus-visible + span {
		outline-color: Highlight;
	}
}
