@use '../utilities/colors' as *;
/* Custom checkbox */
.custom-check {
	/* The container */
	text-transform: uppercase;
	font-size: 12px;
	display: block;
	position: relative;
	padding-left: 25px;
	cursor: pointer;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;

	/* Hide the browser's default checkbox */
	input {
		position: absolute;
		opacity: 0;
		cursor: pointer;
		height: 0;
		width: 0;
	}

	/* Create a custom checkbox */
	.checkmark {
		position: absolute;
		//top: calc(100% / 2 - 8px);
		top: 0;
		left: 0;
		height: 18px;
		width: 18px;
		border-radius: 3px;
		border: 1px solid rgba($black, .2);
	}

	/* On mouse-over, add a grey background color */
	&:hover {
		input~.checkmark {
			background-color: #ccc;
		}
	}

	/* When the checkbox is checked, add a primary-color background */
	input:checked~.checkmark {
		background-color: var(--primary-color);
	}

	/* Create the checkmark/indicator (hidden when not checked) */
	.checkmark:after {
		content: "";
		position: absolute;
		display: none;
	}

	/* Show the checkmark when checked */
	input:checked~.checkmark:after {
		display: block;
	}

	/* Style the checkmark/indicator */
	.checkmark:after {
		left: 6px;
		top: 2px;
		width: 2px;
		height: 9px;
		border: solid white;
		border-width: 0 2px 2px 0;
		transform: rotate(45deg);
	}
}
