﻿/**
 * iOS 6 style switch checkboxes
 * Adapted by Mohamed Tougorti
 * Original by Lea Verou can be found at http://lea.verou.me/2013/03/ios-6-switch-style-checkboxes-with-pure-css/
 */

:root input[type="checkbox"].checkbox-slide { /* :root here acting as a filter for older browsers */
	position: absolute;
	opacity: 0;
}

	:root input[type="checkbox"].checkbox-slide + div {
		display: inline-block;
		vertical-align: middle;
		width: 2.5em;
		height: 1em;
		border: 1px solid rgba(0,0,0,.3);
		border-radius: 999px;
		margin: 0 .5em;
		background: white;
		background-size: 200% 100%;
		background-position: 100% 0;
		background-origin: border-box;
		background-clip: border-box;
		overflow: hidden;
		transition-duration: .4s;
		transition-property: padding, width, background-position, text-indent;
		font-size: 180%; /* change this and see how they adjust! */

		text-align: left;
	}

	:root input[type="checkbox"].checkbox-slide:checked + div {
		padding-left: 1.5em;
		background-position: 0 0;
	}

	:root input[type="checkbox"].checkbox-slide:checked + div {
		border: 2px solid #14A372;
	}

	:root input[type="checkbox"].checkbox-slide + div {
		border: 2px solid #DE0F46;
	}

		:root input[type="checkbox"].checkbox-slide + div:before {
			content: 'ON';
			float: left;
			width: 1.30em;
			height: 1.30em;
			margin: 0.2em;
			border: 1px solid rgba(0,0,0,.35);
			border-radius: inherit;
			background: #DE0F46;
			color: #14A372;
			text-indent: -2.5em;
		}

	:root input[type="checkbox"].checkbox-slide:checked + div:before {
		background: #14A372;
	}

	:root input[type="checkbox"].checkbox-slide:active + div:before {
		background-color: #eee;
	}

	:root input[type="checkbox"].checkbox-slide + div:before,
	:root input[type="checkbox"].checkbox-slide + div:after {
		font: bold 50%/1.2 SegoeUI;
		text-transform: uppercase;
	}

	:root input[type="checkbox"].checkbox-slide + div:after {
		content: 'OFF';
		float: left;
		text-indent: .5em;
		color: #DE0F46;
		text-shadow: none;
		margin-top: 0.3em;
	}

.checkbox-slide-spinner {
	width: 15%;
	display: none;
}

