﻿@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css');

    .checkbox {
        padding-left: 6.5px;
        top: 0px;
        left: 0px;
    }

    .checkbox label {
        display: inline-block;
        vertical-align: middle;
        position: relative;
        padding-left: 5px;
        margin-top: 0.6rem;
        line-height: 1.2rem;
        cursor: pointer;
    }

        .checkbox label::before {
            content: "";
            display: inline-block;
            position: absolute;
            width: 17px;
            height: 17px;
            left: 0;
            margin-left: -20px;
            border: 1px solid #cccccc;
            border-radius: 3px;
            background-color: #fff;
            -webkit-transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
            -o-transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
            transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
        }

        .checkbox label::after {
            display: inline-block;
            position: absolute;
            width: 16px;
            height: 16px;
            left: 0;
            top: 0;
            margin-left: -20px;
            padding-left: 3px;
            padding-top: 0px;
            font-size: 11px;
            color: #555555;
        }

    .checkbox input[type="checkbox"] {
        opacity: 0;
        z-index: 1;
    }

        .checkbox input[type="checkbox"]:checked + label::after {
            font-family: "FontAwesome";
            content: "\f00c";
        }

.checkbox-primary input[type="checkbox"]:checked + label::before {
    background-color: #337ab7;
    border-color: #337ab7;
}

.checkbox-primary input[type="checkbox"]:checked + label::after {
    color: #fff;
}

.radio {
    padding-left: 6.5px;
    top: 0px;
    left: 0px;
    width: auto;
}

    .radio label {
        display: inline-block;
        vertical-align: middle;
        position: relative;
        padding-left: 5px;
        padding-right: 45px;
        cursor: pointer;
        white-space: nowrap; /* Prevent text from wrapping */
        /*text-overflow: ellipsis; /* Add ellipsis (...) to indicate overflowed text */
    }

        .radio label::before /*ปรับแต่งส่วนวงกลม*/ {
            content: "";
            display: inline-block;
            position: absolute;
            width: 18px; /*ขนาดวงกลม*/
            height: 18px;
            left: 0;
            margin-top: 1px; /*ขอบบนวงกลม*/
            margin-left: -20px;
            border: 1px solid #cccccc;
            border-radius: 10px;
            background-color: #fff;
            -webkit-transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
            -o-transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
            transition: border 0.15s ease-in-out, color 0.15s ease-in-out;
        }

        .radio label::after {
            display: inline-block;
            position: absolute;
            width: 16px;
            height: 16px;
            left: 0;
            top: 0;
            margin-left: -20px;
            padding-left: 4px;
            padding-top: 3px;
            font-size: 11px;
            color: #555555;
        }

.radio-vertical label {
    display: inline-block;
    vertical-align: middle;
    position: absolute;
    padding-left: 5px;
    padding-right: 25px;
    cursor: pointer;
}

.radio input[type="radio"] {
    margin-right: 5px; /* Add margin between radio button and label */
}

.radio input[type="radio"] {
    opacity: 0;
    z-index: 1;
}

    .radio input[type="radio"]:checked + label::after {
        font-family: "FontAwesome";
        content: "\f00c";
    }

.radio-primary input[type="radio"]:checked + label::before {
    background-color: #337ab7;
    border-color: #337ab7;
}

.radio-primary input[type="radio"]:checked + label::after {
    color: #fff;
}
