﻿.switch {
    background-color: #fff;
    border: 1px solid #999;
    border-radius: 2px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 0;
    height: 34px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    width: 80px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.switch:after, .switch:before {
    background-color: #9bca3e;
    color: #fff;
    content: "Yes";
    display: block;
    font-size: 13px;
    line-height: 1.5;
    height: 100%;
    left: 0;
    padding: 7px 0;
    position: absolute;
    text-align: center;
    top: 0;
    width: 51%;
    /* This is so the darker color doesn't show through the rounded corners of the knob */
}

.switch:before {
    background-color: #999;
    content: "No";
    left: auto;
    right: 0;
    width: 50%;
}

.switch .knob {
    background: #f7f7f7;
    border: 1px solid #999;
    border-bottom: none;
    border-top: none;
    border-radius: 2px;
    display: block;
    font-size: 13px;
    height: 100%;
    left: -1px;
    position: relative;
    top: 0;
    width: 40px;
    z-index: 2;
    -webkit-transition: all 0.15s ease;
    -moz-transition: all 0.15s ease;
    -ms-transition: all 0.15s ease;
    transition: all 0.15s ease;
}

.switch .knob:before, .switch .knob:after {
    border: 4px solid transparent;
    border-left-color: inherit;
    content: "";
    display: block;
    height: 0;
    left: 50%;
    margin-left: 2px;
    margin-top: -3px;
    position: absolute;
    top: 50%;
    width: 0;
}

.switch .knob:before {
    border-left-color: transparent;
    border-right-color: inherit;
    margin-left: -10px;
}

.switch input {
    position: absolute;
    visibility: hidden;
}

.switch input:checked + .knob {
    left: 50%;
}