// https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_switch

.vui-checkbox {
	$root: &;

	&__label {
		display: flex;
    	align-items: center;
	}

	&__input {
		opacity: 0;

		&:checked + #{$root}__slider {
			background-color: #2196F3;

			&::before {
				-webkit-transform: translateX(26px);
				-ms-transform: translateX(26px);
				transform: translateX(26px);
			}
		}

		&:focus + #{$root}__slider {
			outline: 2px solid lightblue;
		}
	}

	&__slider {
		position: absolute;
		cursor: pointer;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: #ccc;
		-webkit-transition: .4s;
		transition: .4s;
		border-radius: 34px;

		&::before {
			position: absolute;
			content: "";
			height: 26px;
			width: 26px;
			left: 4px;
			bottom: 4px;
			background-color: white;
			-webkit-transition: .4s;
			transition: .4s;
			border-radius: 50%;
		}

		&-container {
			position: relative;
			display: inline-block;
			width: 60px;
			height: 34px;
			margin: 0 0.5em;
		}
	}
	
	&__text {
		transition: color 0.2s ease-in-out;

		&--active {
			color: #2196F3;
			pointer-events: none;
		}
	}
}