/**
 * Radio control — design system (vertical stack, custom circle).
 */

.kernel-radio-group {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.kernel-radio {
	align-items: flex-start;
	cursor: pointer;
	display: flex;
	gap: 10px;
	line-height: 1.55;
	margin: 0;
	position: relative;
}

.kernel-radio__input {
	cursor: pointer;
	height: 100%;
	inset: 0;
	margin: 0;
	opacity: 0;
	position: absolute;
	width: 100%;
	z-index: 1;
}

.kernel-radio__control {
	background: var(--ds-surface, #fff);
	border: 1px solid var(--ds-border, #e0e4ee);
	border-radius: 50%;
	box-sizing: border-box;
	flex-shrink: 0;
	height: 16px;
	margin-top: 3px;
	pointer-events: none;
	position: relative;
	transition: border-color 0.15s ease, background 0.15s ease;
	width: 16px;
	z-index: 0;
}

.kernel-radio__control::after {
	background: var(--ds-accent, #041046);
	border-radius: 50%;
	content: '';
	height: 8px;
	left: 50%;
	opacity: 0;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%) scale(0.5);
	transition: opacity 0.15s ease, transform 0.15s ease;
	width: 8px;
}

.kernel-radio__input:focus-visible + .kernel-radio__control {
	box-shadow: 0 0 0 3px var(--ds-accent-soft, rgba(4, 16, 70, 0.12));
	outline: none;
}

.kernel-radio__input:checked + .kernel-radio__control {
	border-color: var(--ds-accent, #041046);
}

.kernel-radio__input:checked + .kernel-radio__control::after {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.kernel-radio__input:disabled + .kernel-radio__control {
	background: var(--ds-bg, #f2f4fa);
	box-shadow: none;
	opacity: 0.55;
}

.kernel-radio__input:disabled ~ .kernel-radio__label {
	opacity: 0.55;
}

.kernel-radio__label {
	color: var(--ds-text, #1a1d26);
	flex: 1;
	font-family: var(--ds-font, inherit);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.55;
	pointer-events: none;
}

.kernel-radio__label a {
	color: var(--ds-accent, #041046);
}

/* Сброс нативной рамки fieldset (legend display:table из style.css). */
fieldset.kernel-entity-field.kernel-entity-field--radios,
fieldset.kernel-research-field.kernel-research-field--radios,
fieldset.public-survey-step__group {
	border: 0;
	margin: 0 0 1.5rem;
	min-inline-size: 0;
	min-width: 0;
	outline: none;
	padding: 0;
}

fieldset.kernel-entity-field.kernel-entity-field--radios > legend,
fieldset.kernel-research-field.kernel-research-field--radios > legend,
fieldset.public-survey-step__group > legend {
	display: block;
	float: none;
	font-weight: 600;
	margin-bottom: 10px;
	max-width: none;
	padding: 0;
	width: auto;
}

fieldset.public-survey-step__group {
	margin-bottom: 20px;
}
