﻿/*
 *   simple css only toggle switch, see https://codepen.io/jplwood/pen/GyZQrj for usage
 */

/**** Base switch toggle stylings ****/
.switch {
    position: relative;
    display: block;
    vertical-align: top;
    width: 80px;
    height: 17px;
    padding: 0;
    background: #FFF;
    margin: 0;
    border-radius: 6px;
    cursor: pointer;
    box-sizing: content-box;
}


.switch-input {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    box-sizing: content-box;
}

.switch-label {
    position: relative;
    display: block;
    height: inherit;
    font-size: 12px;
    background: #eceeef;
    border-radius: inherit;
    box-sizing: content-box;
    font-weight: normal;
    border: solid 1px #dadada;
    background: #fff;
}

.switch-label:before, .switch-label:after {
    position: absolute;
    top: 50%;
    margin-top: -.5em;
    line-height: 1;
    -webkit-transition: inherit;
    -moz-transition: inherit;
    -o-transition: inherit;
    transition: inherit;
    box-sizing: content-box;
}

.switch-label:before {
    content: attr(data-off);
    right: 6px;
    color: #aaaaaa;
}

.switch-label:after {
    content: attr(data-on);
    left: 6px;
    opacity: 0;
    color: #aaaaaa;
}

.switch-input:checked ~ .switch-label {
    border-color: #dadada;
}

.switch-input:checked ~ .switch-label:before {
    opacity: 0;
}

.switch-input:checked ~ .switch-label:after {
    opacity: 1;
}

.switch-handle {
    position: absolute;
    border-radius: 5px;
    top: 5px;
    left: 4px;
    background: #dadada;
    width: 18px;
    height: 10px;
}

.switch-input:checked ~ .switch-handle {
    left: 58px;
    background: #dadada;
}

/* Transition
============================================================ */
.switch-label, .switch-handle {
    transition: All 0.2s ease;
    -webkit-transition: All 0.2s ease;
    -moz-transition: All 0.2s ease;
    -o-transition: All 0.2s ease;
}

/************************************/
/*******     Switch Sizes    ********/
/************************************/

/* xs meant for no text*/
.switch-xs {
    width: 36px;
}

.switch-xs .switch-input:checked ~ .switch-handle {
    left: 19px;
}

.switch-xs .switch-handle {
    width: 13px;
    height: 10px;
}


/* sm meant for three letter labels (on/off) */
.switch-sm {
    width: 42px;
}

.switch-sm .switch-input:checked ~ .switch-handle{
    left: 26px;
}

.switch-sm .switch-handle {
    width: 13px;
    height: 10px;
}


/*Medium size is default*/


.switch-lg {
    width: 110px;
    height: 23px;
    margin-bottom: 6px;
}

.switch-lg .switch-label {
    font-size: 14px;
}
    
.switch-lg .switch-input:checked ~ .switch-handle {
    left: 81px;
}

.switch-lg .switch-handle {
    top: 6px;
    width: 24px;
    height: 14px;
    border-radius:10px;
}




/************************************/
/*******Bootstrap-like styles********/
/************************************/

/* Switch Default Styling */
.switch-default .switch-handle {
    background: #dadada;
}

.switch-default .switch-input:checked ~ .switch-handle {
    background: #dadada;
}

.switch-default .switch-label {
    border-color: #dadada;
}

.switch-primary .switch-input:checked ~ .switch-label {
    border-color: #dadada;
}

.switch-default .switch-label:before {
    color: #aaaaaa;
}

.switch-default .switch-label:after {
    color: #aaaaaa;
}




/* Switch Primary Styling */
.switch-primary .switch-handle {
    background: #dadada;
}

.switch-primary .switch-input:checked ~ .switch-handle {
    background: #3c8dbc;
}

.switch-primary .switch-label {
    border-color: #dadada;
}

.switch-primary .switch-input:checked ~ .switch-label {
    border-color: #3c8dbc;
}

/*Off*/
.switch-primary .switch-label:before {
    color: #aaaaaa;
}

/*On*/
.switch-primary .switch-label:after {
    color: #3c8dbc;
}



/* Switch primary Reversed Styling */
.switch-primary.switch-reversed .switch-handle {
    background: #3c8dbc;
}

.switch-primary.switch-reversed .switch-input:checked ~ .switch-handle {
    background: #dadada;
}

.switch-primary.switch-reversed .switch-label {
    border-color: #3c8dbc;
}

.switch-primary.switch-reversed .switch-input:checked ~ .switch-label {
    border-color: #dadada;
}

/*Off*/
.switch-primary.switch-reversed .switch-label:before {
    color: #3c8dbc;
}

/*On*/
.switch-primary.switch-reversed .switch-label:after {
    color: #aaaaaa;
}



/* Switch Success Styling */
.switch-success .switch-handle {
    background: #dadada;
}

.switch-success .switch-input:checked ~ .switch-handle {
    background: #5e8028;
}

.switch-success .switch-label {
    border-color: #dadada;
}

.switch-success .switch-input:checked ~ .switch-label {
    border-color: #5e8028;
}

/*Off*/
.switch-success .switch-label:before {
    color: #aaaaaa;
}

/*On*/
.switch-success .switch-label:after {
    color: #5e8028;
}



/* Switch Success Reversed Styling */
.switch-success.switch-reversed .switch-handle {
    background: #5e8028;
}

.switch-success.switch-reversed .switch-input:checked ~ .switch-handle {
    background: #dadada;
}

.switch-success.switch-reversed .switch-label {
    border-color: #5e8028;
}

.switch-success.switch-reversed .switch-input:checked ~ .switch-label {
    border-color: #dadada;
}

/*Off*/
.switch-success.switch-reversed .switch-label:before {
    color: #5e8028;
}

/*On*/
.switch-success.switch-reversed .switch-label:after {
    color: #aaaaaa;
}



/* Switch Danger Styling */
.switch-danger .switch-handle {
    background: #dadada;
}

.switch-danger .switch-input:checked ~ .switch-handle {
    background: #B64947;
}

.switch-danger .switch-label {
    border-color: #dadada;
}

.switch-danger .switch-input:checked ~ .switch-label {
    border-color: #B64947;
}

/*Off*/
.switch-danger .switch-label:before {
    color: #aaaaaa;
}

/*On*/
.switch-danger .switch-label:after {
    color: #B64947;
}



/* Switch Danger Reversed Styling */
.switch-danger.switch-reversed .switch-handle {
    background: #B64947;
}

.switch-danger.switch-reversed .switch-input:checked ~ .switch-handle {
    background: #dadada;
}

.switch-danger.switch-reversed .switch-label {
    border-color: #B64947;
}

.switch-danger.switch-reversed .switch-input:checked ~ .switch-label {
    border-color: #dadada;
}

/*Off*/
.switch-danger.switch-reversed .switch-label:before {
    color: #B64947;
}

/*On*/
.switch-danger.switch-reversed .switch-label:after {
    color: #aaaaaa;
}


/* Switch Warning Styling */
.switch-warning .switch-handle {
    background: #dadada;
}

.switch-warning .switch-input:checked ~ .switch-handle {
    background: #f39c12;
}

.switch-warning .switch-label {
    border-color: #dadada;
}

.switch-warning .switch-input:checked ~ .switch-label {
    border-color: #f39c12;
}

/*Off*/
.switch-warning .switch-label:before {
    color: #aaaaaa;
}

/*On*/
.switch-warning .switch-label:after {
    color: #f39c12;
}



/* Switch warning Reversed Styling */
.switch-warning.switch-reversed .switch-handle {
    background: #f39c12;
}

.switch-warning.switch-reversed .switch-input:checked ~ .switch-handle {
    background: #dadada;
}

.switch-warning.switch-reversed .switch-label {
    border-color: #f39c12;
}

.switch-warning.switch-reversed .switch-input:checked ~ .switch-label {
    border-color: #dadada;
}

/*Off*/
.switch-warning.switch-reversed .switch-label:before {
    color: #f39c12;
}

/*On*/
.switch-warning.switch-reversed .switch-label:after {
    color: #aaaaaa;
}



/* Switch Info Styling */
.switch-info .switch-handle {
    background: #dadada;
}

.switch-info .switch-input:checked ~ .switch-handle {
    background: #00c0ef;
}

.switch-info .switch-label {
    border-color: #dadada;
}

.switch-info .switch-input:checked ~ .switch-label {
    border-color: #00c0ef;
}

/*Off*/
.switch-info .switch-label:before {
    color: #aaaaaa;
}

/*On*/
.switch-info .switch-label:after {
    color: #00c0ef;
}



/* Switch Info Reversed Styling */
.switch-info.switch-reversed .switch-handle {
    background: #00c0ef;
}

.switch-info.switch-reversed .switch-input:checked ~ .switch-handle {
    background: #dadada;
}

.switch-info.switch-reversed .switch-label {
    border-color: #00c0ef;
}

.switch-info.switch-reversed .switch-input:checked ~ .switch-label {
    border-color: #dadada;
}

/*Off*/
.switch-info.switch-reversed .switch-label:before {
    color: #00c0ef;
}

/*On*/
.switch-info.switch-reversed .switch-label:after {
    color: #aaaaaa;
}




/****************************************/
/******* Labels to Match Toggles ********/
/****************************************/

/*similarly themed labels*/
.switch-themed-label {
    padding: 1px 6px;
    margin: 0;
    border-radius: 6px;
    border: solid 1px #dadada;
    color: #aaaaaa;
    font-size: 12px;
    background-color: #fff;
}


/*Primary or Primary/Reversed*/
.switch-themed-label.primary {
    border-color: #3c8dbc;
    color: #3c8dbc;
}

/*info or info/Reversed*/
.switch-themed-label.info {
    border-color: #00c0ef;
    color: #00c0ef;
}

/*warning or warning/Reversed*/
.switch-themed-label.warning {
    border-color: #f39c12;
    color: #f39c12;
}

/*Danger or Danger/Reversed*/
.switch-themed-label.danger {
    border-color: #B64947;
    color: #B64947;
}

/*success or success/Reversed*/
.switch-themed-label.success{
    border-color: #5e8028;
    color: #5e8028;
}