@import '~shared/styles/colors';

.switch {
	label {
		align-items: center;
		cursor: pointer;
		display: flex;
		margin-bottom: 10px;
	}

	input[type='checkbox'] {
        -moz-appearance: none;
        -ms-appearance: none;
        -webkit-appearance: none;
		appearance: none;
		cursor: pointer;
		height: 12px;
		margin-right: 30px;
		outline: none;
		position: relative;
		width: 12px;
	}

	input[type='checkbox']::before,
	input[type='checkbox']::after {
		content: '';
		position: absolute;
	}

	input[type='checkbox']::before {
		background-color: lighten(@gray, 15%);
		border-radius: 30px;
		height: 100%;
		transform: translate(-25%, 0);
		transition: all 0.25s ease-in-out;
		width: 250%;
	}

	input[type='checkbox']::after {
		background-color: @gray;
		border-radius: 30px;
		height: 150%;
		margin-left: 10%;
		margin-top: -25%;
		transform: translate(-60%, 0);
		transition: all 0.2s;
		width: 150%;
	}

	//
	// Checked
	//

	input[type='checkbox']:checked::after {
		background-color: @green;
		transform: translate(25%, 0);
	}

	input[type='checkbox']:checked::before {
		background-color: lighten(@green, 15%);
	}
}
