/// @access private
/// @output Shared base styles for checkboxes, toggles, round- and box-style radio buttons.
@mixin _oFormsControlsBase($disabled: null) {
	// Hide visually while remaining accessible to voice control like Dragon
	// Dragon requires the input it is trying to click to be actually clickable
	z-index: 1;
	opacity: 0;
	cursor: pointer;

	position: absolute;
	padding: 0;
	width: $_o-forms-checkbox-radio-width;
	height: $_o-forms-checkbox-radio-width;

	&:checked ~ .o-forms-input__label:after {
		opacity: 1;
	}

	@if $disabled {
		&:disabled {
			opacity: 0;

			~ .o-forms-input__label {
				opacity: 0.4;
			}
		}
	}
}

/// @access private
/// @output Shared pseudo element styles for checkboxes, toggle, round- and box-style radio buttons.
@mixin _oFormsControlsPseudoElements {
	content: '';
	cursor: pointer;
	position: absolute;
	top: 0;
	left: 0;
	width: $_o-forms-checkbox-radio-width;
	height: $_o-forms-checkbox-radio-width;
	box-sizing: border-box;
}

/// @access private
/// @output Shared styles for box-style radio buttons and anchor controls
@mixin _oFormsControlsBoxBase {
	display: inline-flex;
	flex-grow: 1;
	cursor: pointer;
	margin: 0;
	min-height: $_o-forms-spacing-seven;
	min-width: 8ch;
}

/// @access private
/// @output Shared styles for box-style containers
@mixin _oFormsControlsBoxContainer {
	// As with buttons, does not align to a standard type usecase.
	@include oPrivateTypographySans($scale: -1, $weight: 'semibold');
	line-height: unset;
	box-sizing: border-box;
	border: $_o-forms-border;
	border-radius: oPrivateFoundationGet('o3-border-radius-2');
	display: inline-flex;
	flex-wrap: wrap;
	text-align: center;
	padding: $_o-forms-spacing-half;
}
