/**
 * Atom: Checkbox
 * Custom checkbox with animated fill
 */

.radio-group:not(:last-child) {
	margin-bottom: var(--space-3);
}

.real-radio {
	width: 0;
	height: 0;
	position: absolute;
	opacity: 0;
	z-index: -1;
}

.custom-radio-label {
	display: flex;
	align-items: flex-start;
	margin-bottom: var(--space-2-5);
}

.custom-radio {
	position: relative;
	width: 18px;
	height: 18px;
	min-width: 18px;
	background: var(--white);
	border: 2px solid var(--gray-300);
	border-radius: var(--radius-sm);
	margin-right: var(--space-2-5);
	margin-top: 2px;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: all var(--transition-fast);
}

.custom-radio::before {
	content: '';
	width: 10px;
	height: 10px;
	background: var(--accent);
	border-radius: var(--radius-xs);
	position: absolute;
	transform: scale(0);
	transition: 0.15s ease-in;
}

.real-radio:checked + .custom-radio::before {
	transform: scale(1);
}

.real-radio:checked + .custom-radio {
	border-color: var(--accent);
}

.custom-radio-title {
	font-size: var(--text-sm);
	font-weight: var(--font-normal);
	line-height: var(--leading-normal);
	color: var(--gray-600);
}

.custom-radio-title a {
	color: var(--accent);
	text-decoration: underline;
}

/* Checkbox validation styles */
.form-attempted .custom-radio-label input[type="checkbox"]:not(:checked) + .custom-radio {
	border-color: var(--red);
	box-shadow: 0 0 0 2px rgba(190, 11, 11, 0.2);
}

.form-attempted .custom-radio-label input[type="checkbox"]:checked + .custom-radio {
	border-color: var(--green);
}

/* Responsive */
@media (max-width: 768px) {
	.custom-radio-title {
		font-size: var(--text-xs);
	}
}
