@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');
*, *:before, *:after {
    box-sizing: border-box;
}

input[type="radio"] {
    display: none;
    margin: 10px 0 8px 0;
}

input[type="radio"] + label {
    font-size: 3em;
    line-height: 1;
    width: 4rem;
    height: 2rem;
    background-color: #ddd;
    background-image: none;
    border-radius: 2rem;
    padding: 0.16667rem;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    position: relative;
    box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2) inset;
    font-family: inherit;
    -webkit-transition: all 0.1s ease-in-out;
    transition: all 0.1s ease-in-out;
}

input[type="radio"] + label:before {
    /* Label */
    text-transform: uppercase;
    color: #b7b7b7;
    content: attr(data-off-label);
    display: block;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.7rem;
    line-height: 1.74rem;
    position: absolute;
    right: 0.21667rem;
    margin: 0.21667rem;
    top: 0;
    text-align: center;
    min-width: 1.66667rem;
    overflow: hidden;
    -webkit-transition: all 0.1s ease-in-out;
    transition: all 0.1s ease-in-out;
}

input[type="radio"] + label:after {
    /* Slider */
    content: '';
    position: absolute;
    left: 0.16667rem;
    background-color: #f7f7f7;
    box-shadow: none;
    border-radius: 2rem;
    height: 1.66667rem;
    width: 1.66667rem;
    -webkit-transition: all 0.1s ease-in-out;
    transition: all 0.1s ease-in-out;
}

input[type="radio"]:checked + label {
    background-color: lightblue;
    background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.2));
    background-image: linear-gradient(rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.2));
    box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.3) inset;
}

input[type="radio"]:checked + label:before {
    color: #fff;
    content: attr(data-on-label);
    right: auto;
    left: 0.21667rem;
}

input[type="radio"]:checked + label:after {
    left: 2.16667rem;
    background-color: #f7f7f7;
    box-shadow: 1px 1px 10px 0 rgba(0, 0, 0, 0.3);
}