/**
 * jQuery switchbutton
 * 
 * Based on work by tdreyno on iphone-style-checkboxes for events management
 * (https://github.com/tdreyno/iphone-style-checkboxes)
 * 
 * Copyright 2011, L.STEVENIN
 * Released under the MIT license.
 */

.ui-switchbutton {
	display: inline-block;
	padding: 0;
	position: relative;
	overflow: hidden;
	cursor: pointer;
	user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
}

.ui-switchbutton input {
	display: none;
}

.ui-switchbutton label {
	white-space: nowrap;
    cursor: pointer;
    display: block;
    position: absolute;
	top: 0;
    width: auto;
    overflow: hidden;
    user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
}

.ui-switchbutton label.ui-switchbutton-disabled {
	right: 0;
	text-align: right;
	text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.6);
}

.ui-switchbutton label.ui-switchbutton-disabled span {
	display: inline-block;
	text-align: center;
	padding-left: 2px;
	padding-right: 3px;
}

.ui-switchbutton.ui-switchbutton-no-labels label span {
	width: 1em;
}

.ui-switchbutton label.ui-switchbutton-enabled {
	left: 0;
	text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6);
}

.ui-switchbutton label.ui-switchbutton-enabled span {
	display: inline-block;
	text-align: center;
	padding-left: 3px;
	padding-right: 2px;
}

.ui-switchbutton .ui-switchbutton-handle {
	display: block;
	width: 0;
	position: absolute;
	top: 0;
	left: 0;
	cursor: pointer;
}

.ui-switchbutton.ui-switchbutton-disabled {
	opacity: 0.4;
	-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
	filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
	filter: Alpha(Opacity=40);
	cursor: default;
}

.ui-switchbutton.ui-switchbutton-disabled label,
.ui-switchbutton.ui-switchbutton-disabled .ui-switchbutton-handle {
	cursor: default;
}



/**
 * STYLES
 * 
 * Styles are composed by a default style which can be overrided by specific classed passed in argument
 */

/* Default style */

.ui-switchbutton-default {
	height: 24px;
}

.ui-switchbutton-default label {
	font-size: 14px;
	line-height: 18px;
	font-weight: bold;
	font-family: Quicksand;
	height: 20px;
	padding-top: 4px;
}

.ui-switchbutton-default label.ui-switchbutton-disabled {
	color: white;
	background: #DC1015; /* Old browsers */
    background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmMzAxOSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjZjA0MDQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
	background: -moz-linear-gradient(top,  #DC1015 0%, #cf0404 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#DC1015), color-stop(100%,#cf0404)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  #DC1015 0%,#cf0404 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  #DC1015 0%,#cf0404 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  #DC1015 0%,#cf0404 100%); /* IE10+ */
	background: linear-gradient(to bottom,  #DC1015 0%,#cf0404 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#DC1015', endColorstr='#cf0404',GradientType=0 ); /* IE6-8 */
		
	box-shadow: inset 0px 0px 1px rgba(0, 0, 0, 0.5);
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
}

.ui-switchbutton-default label.ui-switchbutton-enabled {
	color: white;
	box-shadow: inset 0px 0px 1px rgba(0, 0, 0, 0.7);
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
	padding-right: 4px;
	
	background: #7CAD14; /* Old browsers */
	background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzI5OWEwYiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMyOTlhMGIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
	background: -moz-linear-gradient(top,  #7CAD14 0%, #7CAD14 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7CAD14), color-stop(100%,#7CAD14)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  #7CAD14 0%,#7CAD14 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  #7CAD14 0%,#7CAD14 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  #7CAD14 0%,#7CAD14 100%); /* IE10+ */
	background: linear-gradient(to bottom,  #7CAD14 0%,#7CAD14 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7CAD14', endColorstr='#7CAD14',GradientType=0 ); /* IE6-8 */
}

.ui-switchbutton-default .ui-switchbutton-handle {
	height: 22px;
	background: #f2f2f2; /* Old browsers */
	background: -moz-linear-gradient(top, #d7d7d7 0%, #fcfcfc 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d7d7d7), color-stop(100%,#fcfcfc)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, #d7d7d7 0%,#fcfcfc 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, #d7d7d7 0%,#fcfcfc 100%); /* Opera11.10+ */
	background: -ms-linear-gradient(top, #d7d7d7 0%,#fcfcfc 100%); /* IE10+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d7d7d7', endColorstr='#fcfcfc',GradientType=0 ); /* IE6-9 */
	background: linear-gradient(top, #d7d7d7 0%,#fcfcfc 100%); /* W3C */
	box-shadow: inset 0px 0px 2px rgba(255, 255, 255, 1);
	border: 1px solid #a2a2a2;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
}

/* Thin style */

.ui-switchbutton-thin {
	height: 20px;
}

.ui-switchbutton-thin label {
	font-size: 13px;
	line-height: 16px;
	height: 18px;
	padding-top: 2px;
}

.ui-switchbutton-thin .ui-switchbutton-handle {
	height: 18px;
}


/* iso5 style */

.ui-switchbutton-ios5 label.ui-switchbutton-disabled {
	-webkit-border-radius: 12px;
	-moz-border-radius: 12px;
	border-radius: 12px;
}

.ui-switchbutton-ios5 label.ui-switchbutton-enabled {
	-webkit-border-radius: 12px;
	-moz-border-radius: 12px;
	border-radius: 12px;
	-webkit-border-top-right-radius: 0px;
	-moz-border-radius-topright: 0px;
	border-top-right-radius: 0px;
	-webkit-border-bottom-right-radius: 0px;
	-moz-border-radius-bottomright: 0px;
	border-bottom-right-radius: 0px;
}


.ui-switchbutton-ios5 label.ui-switchbutton-enabled {
	padding-right: 0px;
}

.ui-switchbutton-ios5.ui-state-active label.ui-switchbutton-enabled {
	padding-right: 10px;
}

.ui-switchbutton-ios5 .ui-switchbutton-handle {
	height: 22px;
	width: 22px !important;
	-webkit-border-radius: 12px;
	-moz-border-radius: 12px;
	border-radius: 12px;
}


/* Force sizes */
/*
.ui-switchbutton {
	width: 50px;
}

.ui-switchbutton .ui-switchbutton-handle {
	width: 20px;
}
*/
