﻿/* https://bootsnipp.com/snippets/featured/funky-radio-buttons */

.funkyradio {
    margin-top: 20px;
}

.funkyradio div {
    clear: both;
    overflow: hidden;
}

.funkyradio label {
    width: 100%;
    border-radius: 15px;
    border: 1px solid #D1D3D4;
    font-weight: normal;
    background-color: white;
}

.funkyradio input[type="radio"]:empty,
.funkyradio input[type="checkbox"]:empty {
    display: none;
}

    .funkyradio input[type="radio"]:empty ~ label,
    .funkyradio input[type="checkbox"]:empty ~ label {
        position: relative;
        /*line-height: 2.5em;*/
        padding-top: 0.5em;
        padding-bottom: 0.5em;
        /*text-indent: 3.25em;*/
        padding-left: 3.25em;
        padding-right: 0.5em;
        /*margin-top: 2em;*/
        margin-bottom: 0.5em;
        cursor: pointer;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

        .funkyradio input[type="radio"]:empty ~ label:before,
        .funkyradio input[type="checkbox"]:empty ~ label:before {
            position: absolute;
            display: block;
            top: -1px;
            bottom: -1px;
            left: -1px;
            content: '';
            width: 2.5em;
            background: #D1D3D4;
            border-radius: 14px 0 0 14px;
        }

    .funkyradio input[type="radio"]:hover:not(:checked):not(:disabled) ~ label,
    .funkyradio input[type="checkbox"]:hover:not(:checked):not(:disabled) ~ label {
        color: #888;
    }

    .funkyradio input[type="radio"]:hover:not(:checked):not(:disabled) ~ label:before,
    .funkyradio input[type="checkbox"]:hover:not(:checked):not(:disabled) ~ label:before {
        content: '\2714';
        padding-top: 0.6em;
        text-indent: .9em;
        color: #C2C2C2;
    }

.funkyradio input[type="radio"]:checked ~ label,
.funkyradio input[type="checkbox"]:checked ~ label {
    color: #777;
}

    .funkyradio input[type="radio"]:checked ~ label:before,
    .funkyradio input[type="checkbox"]:checked ~ label:before {
        content: '\2714';
        padding-top: 0.5em;
        text-indent: .9em;
        color: #333;
        background-color: #ccc;
    }

.funkyradio input[type="radio"]:focus ~ label:before,
.funkyradio input[type="checkbox"]:focus ~ label:before {
    box-shadow: 0 0 0 3px #999;
}

.funkyradio-default input[type="radio"]:checked ~ label:before,
.funkyradio-default input[type="checkbox"]:checked ~ label:before {
    color: #333;
    background-color: #ccc;
}

.funkyradio-primary input[type="radio"]:checked ~ label:before,
.funkyradio-primary input[type="checkbox"]:checked ~ label:before {
    color: #fff;
    background-color: #337ab7;
}

.funkyradio-success input[type="radio"]:checked ~ label:before,
.funkyradio-success input[type="checkbox"]:checked ~ label:before {
    color: #fff;
    background-color: #5cb85c;
}

.funkyradio-danger input[type="radio"]:checked ~ label:before,
.funkyradio-danger input[type="checkbox"]:checked ~ label:before {
    color: #fff;
    background-color: #d9534f;
}

.funkyradio-warning input[type="radio"]:checked ~ label:before,
.funkyradio-warning input[type="checkbox"]:checked ~ label:before {
    color: #fff;
    background-color: #f0ad4e;
}

.funkyradio-info input[type="radio"]:checked ~ label:before,
.funkyradio-info input[type="checkbox"]:checked ~ label:before {
    color: #fff;
    background-color: #5bc0de;
    cursor: not-allowed;
}

.funkyradio input[type="radio"]:disabled ~ label,
.funkyradio input[type="checkbox"]:disabled ~ label {
    background-color: #e6e6e6;
    cursor: not-allowed;
}

.funkyradio input[type="radio"]:disabled:not(:checked) ~ label,
.funkyradio input[type="checkbox"]:disabled:not(:checked) ~ label {
    color: #a9a9a9;
}

.funkyradio.horizontal {
    display: flex;
    flex-wrap: wrap;
}

.funkyradio.horizontal .funkyradio-success {
    flex-shrink: 1;
    flex-grow: 1;
    margin-right: 20px;
}

@media screen and (max-width: 512px) {
    .funkyradio.horizontal {
        flex-direction: column;
    }
}