@import (reference) '../input/input';

.jodit-ui-checkbox {
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	justify-content: flex-end;
	margin-bottom: var(--padding-default);

	&__input {
		margin-right: var(--padding-default);
	}

	&_switch_true &__wrapper {
		position: relative;
		display: inline-block;
		width: 60px;
		height: 34px;
		margin-right: var(--padding-default);

		input {
			width: 0;
			height: 0;
			opacity: 0;
		}
	}

	&_switch_true &__switch-slider {
		position: absolute;
		border-radius: 34px;
		background-color: #ccc;
		cursor: pointer;
		inset: 0;
		transition: 0.4s;

		&::before {
			position: absolute;
			bottom: 4px;
			left: 4px;
			width: 26px;
			height: 26px;
			border-radius: 50%;
			background-color: white;
			content: '';
			transition: 0.4s;
		}
	}

	&_switch_true&_checked_true &__switch-slider {
		background-color: #2196f3;

		&::before {
			transform: translateX(26px);
		}
	}

	&_switch_true&_focused_true &__switch-slider {
		box-shadow: 0 0 1px #2196f3;
	}
}

.jodit-ui-block .jodit-ui-checkbox {
	margin-bottom: 0;
}
