/**
 * On/Off switch checboxes.
 * Based on "iOS 6 style switch checkboxes" by Lea Verou http://lea.verou.me
 */

.ForFlesse .switch {
	position: absolute;
	opacity: 0;
}

/* @noflip */
.ForFlesse .switch + div {
	direction: ltr;

	display: inline-block;
	vertical-align: middle;
	margin: 0 .5em;
	width: 3em;
	height: 1em;
	overflow: hidden;
	background: #fff;
	background-image: linear-gradient(rgba(0, 0, 0, .1), transparent),
	                  linear-gradient(90deg, #357ebd 50%, transparent 50%);
	background-size: 200% 100%;
	background-position: 100% 0;
	background-origin: border-box;
	background-clip: border-box;
	border: 1px solid rgba(0, 0, 0, .3);
	border-radius: 999px;
	box-shadow: 0 .1em .1em rgba(0, 0, 0, .2) inset,
		        0 .45em 0 .1em rgba(0, 0, 0, .05) inset;
	font-size: 150%;
	text-align: left;
	transition-duration: .4s;
	transition-property: padding, width, background-position, text-indent;
}

/* @noflip */
.ForFlesse .switch:checked + div {
	padding-left: 2em;
	width: 1em;
	background-position: 0 0;
}

/* @noflip */
.ForFlesse .switch + div:before {
	content: 'On';
	float: left;
	margin: -.1em;
	width: 1.65em;
	height: 1.65em;
	background: #fff;
	background-image: linear-gradient(rgba(0, 0, 0, .2), transparent);
	border: 1px solid rgba(0,0,0,.35);
	border-radius: inherit;
	box-shadow: 0 .1em .1em .1em hsla(0, 0%, 100%, .8) inset,
	            0 0 .5em rgba(0, 0, 0, .3);
	color: white;
	text-shadow: 0 -1px 1px rgba(0, 0, 0, .3);
	text-indent: -2.5em;
}

.ForFlesse .switch:active + div:before {
	background-color: #eee;
}

.ForFlesse .switch:focus + div {
	box-shadow: 0 .1em .1em rgba(0, 0, 0, .2) inset,
	            0 .45em 0 .1em rgba(0, 0, 0, .05) inset,
	            0 0 .4em 1px rgba(255, 0, 0, .5);
}

.ForFlesse .switch + div:before,
.ForFlesse .switch + div:after {
	font: bold 60%/1.9 sans-serif;
	text-transform: uppercase;
}

/* @noflip */
.ForFlesse .switch + div:after {
	content: 'Off';
	text-align: left;
	float: left;
	text-indent: .5em;
	color: rgba(0, 0, 0, .45);
	text-shadow: none;
}