﻿@supports (-webkit-appearance: none) or (-moz-appearance: none) {
    input[type='checkbox'], input[type='radio'] {
        --active: var(--colorhighlight);
        --active-inner: #fff;
        --focus: 2px rgba(39, 94, 254, .3);
        --border: #8c8c8c;
        --border-hover: #a6aed9;
        --background: #fff;
        --disabled: #f6f8ff;
        --disabled-inner: #e1e6f9;
        -webkit-appearance: none;
        -moz-appearance: none;
        height: 21px;
        outline: none;
        display: inline-block;
        vertical-align: top;
        position: relative;
        cursor: pointer;
        border: 1px solid var(--bc, var(--border));
        background: var(--b, var(--background));
    }

        input[type='checkbox']:after, input[type='radio']:after {
            content: '';
            display: block;
            left: 0;
            top: 0;
            position: absolute;
        }

        input[type='checkbox']:checked, input[type='radio']:checked {
            --b: var(--active);
            --bc: var(--active);
            --d-o: 0.3s;
            --d-t: 0.6s;
            --d-t-e: cubic-bezier(0.2, 0.85, 0.32, 1.2);
        }

        input[type='checkbox'].tree:checked, input[type='radio'].tree:checked {
            --b: #ececec;
            --bc: #cdd1e9;
        }

        input[type='checkbox']:disabled, input[type='radio']:disabled {
            --b: var(--disabled);
            cursor: not-allowed;
            opacity: 0.9;
        }

            input[type='checkbox']:disabled:checked, input[type='radio']:disabled:checked {
                --b: var(--disabled-inner);
                --bc: var(--border);
            }

            input[type='checkbox']:disabled + span, input[type='radio']:disabled + span {
                cursor: not-allowed;
            }

        input[type='checkbox']:hover:not(:checked):not(:disabled), input[type='radio']:hover:not(:checked):not(:disabled) {
            --bc: var(--border-hover);
        }

        input[type='checkbox']:focus, input[type='radio']:focus {
            box-shadow: 0 0 0 var(--focus);
        }

        input[type='checkbox']:not(.switch), input[type='radio']:not(.switch) {
            width: 21px;
            min-width: 21px;
        }

            input[type='checkbox']:not(.switch):after, input[type='radio']:not(.switch):after {
                opacity: var(--o, 0);
            }

            input[type='checkbox']:not(.switch):checked, input[type='radio']:not(.switch):checked {
                --o: 1;
            }

        input[type='checkbox'] + span, input[type='radio'] + span {
            line-height: 21px;
            display: inline-block;
            vertical-align: top;
            cursor: pointer;
        }

        input[type='checkbox']:not(.switch) {
            border-radius: 0.25rem;
        }

            input[type='checkbox']:not(.switch) + span {
                margin-right: 5px;
            }

            input[type='checkbox']:not(.switch):after {
                width: 5px;
                height: 9px;
                border: 2px solid var(--active-inner);
                border-top: 0;
                border-left: 0;
                left: calc(50% - 3px);
                top: 3.4px;
                transform: rotate(var(--r, 20deg));
            }

            input[type='checkbox']:not(.switch).tree:after {
                width: 5px;
                height: 5px;
                border: 2px solid #ffffff;
                left: 5px;
                top: 5px;
                transform: none;
            }

            input[type='checkbox']:not(.switch):checked {
                --r: 43deg;
            }

        input[type='checkbox'].switch {
            width: 38px;
            margin: 0 5px;
            border-radius: 11px;
        }

            input[type='checkbox'].switch:after {
                left: 2px;
                top: 2px;
                border-radius: 50%;
                width: 15px;
                height: 15px;
                background: var(--ab, var(--border));
                transform: translateX(var(--x, 0));
            }

            input[type='checkbox'].switch:checked {
                --ab: var(--active-inner);
                --x: 17px;
            }

            input[type='checkbox'].switch:disabled:not(:checked):after {
                opacity: 0.6;
            }

    input[type='radio'] {
        border-radius: 50%;
        margin-left: 5px;
    }

        input[type='radio']:after {
            width: 19px;
            height: 19px;
            border-radius: 50%;
            background: var(--active-inner);
            opacity: 0;
            transform: scale(var(--s, 0.7));
        }

        input[type='radio']:checked {
            --s: 0.5;
        }
}

[type='color'] {
    display: inline-flex;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
    border: none;
    width: 25px;
    height: 25px;
    cursor: pointer;
}

    [type='color']::-webkit-color-swatch-wrapper {
        padding: 0;
    }

    [type='color']::-webkit-color-swatch {
        border: none;
    }

.clrpicker > label {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    flex: 1;
    cursor: pointer;
}


.clrpicker {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: absolute;
    top: -29px;
    left: -1px;
    width: 79px;
    height: 28px;
    border-radius: 5px;
    background-color: #fefefe;
    border: 1px solid #e6e6e6;
}

    .clrpicker > label > label {
        display: inline-flex;
        border-radius: 100%;
        width: 17px;
        height: 17px;
        overflow: hidden;
    }


    .clrpicker > span {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 25px;
        height: 100%;
        border-right: 1px solid #e6e6e6;
    }

    .clrpicker > div {
        position: absolute;
        z-index: 999;
        top: 26px;
        left: 0;
        direction: ltr;
        background-color: #fff;
        border: 1px solid #e6e6e6;
        padding: 5px;
        box-shadow: 3px 4px 2px -2px rgba(0, 0, 0, 0.2);
    }

        .clrpicker > div > ul {
            display: flex;
            flex-direction: row;
        }

            .clrpicker > div > ul li {
                display: block;
                border-radius: 100%;
                margin: 5px;
                width: 26px;
                height: 26px;
                padding: 0 !important;
                border: 1px dotted #b9b9b9;
                cursor: pointer;
            }


            .clrpicker > div > ul:nth-child(1) > li:nth-child(1) {
                background-color: #f49700;
            }

            .clrpicker > div > ul:nth-child(2) > li:nth-child(1) {
                background-color: #ffeddb;
            }


            .clrpicker > div > ul:nth-child(1) > li:nth-child(2) {
                background-color: #ff2424;
            }

            .clrpicker > div > ul:nth-child(2) > li:nth-child(2) {
                background-color: #ffeaea;
            }


            .clrpicker > div > ul:nth-child(1) > li:nth-child(3) {
                background-color: #38ff38;
            }

            .clrpicker > div > ul:nth-child(2) > li:nth-child(3) {
                background-color: #daffda;
            }

            .clrpicker > div > ul:nth-child(1) > li:nth-child(4) {
                background-color: #38dbff;
            }

            .clrpicker > div > ul:nth-child(2) > li:nth-child(4) {
                background-color: #def9ff;
            }

            .clrpicker > div > ul:nth-child(1) > li:nth-child(5) {
                background-color: #000000;
            }

            .clrpicker > div > ul:nth-child(2) > li:nth-child(5) {
                background-color: #e6e6e6;
            }

            .clrpicker > div > ul:nth-child(3) > li:nth-child(1) {
                background-color: #244cff;
            }

            .clrpicker > div > ul:nth-child(4) > li:nth-child(1) {
                background-color: #dee4ff;
            }

            .clrpicker > div > ul:nth-child(3) > li:nth-child(2) {
                background-color: #ffa3d0;
            }

            .clrpicker > div > ul:nth-child(4) > li:nth-child(2) {
                background-color: #f0d7ff;
            }

            .clrpicker > div > ul:nth-child(3) > li:nth-child(3) {
                background-color: #fff64d;
            }

            .clrpicker > div > ul:nth-child(4) > li:nth-child(3) {
                background-color: #fffcbe;
            }

            .clrpicker > div > ul:nth-child(3) > li:nth-child(4) {
                background-color: #d4d4a4;
            }

            .clrpicker > div > ul:nth-child(4) > li:nth-child(4) {
                background-color: #eeeecd;
            }

            .clrpicker > div > ul:nth-child(5) > li:nth-child(5) {
                background-color: #ffffff;
            }

            .clrpicker > div > ul:nth-child(3) > li:nth-child(5) {
                background-color: #999999;
            }

/* switch vertical */
.toggle-switch {
    width: 10px;
    position: relative;
}

    .toggle-switch input {
        position: absolute;
        top: 0;
        z-index: 2;
        opacity: 0;
        cursor: pointer;
    }

        .toggle-switch input:checked {
            z-index: 1;
        }

            .toggle-switch input:checked + label {
                opacity: 1;
                cursor: default;
            }

        .toggle-switch input:not(:checked) + label:hover {
            opacity: 0.5;
        }

    .toggle-switch label {
        color: #fff;
        opacity: 0.33;
        cursor: pointer;
    }

    .toggle-switch .toggle-outside {
        height: 100%;
        border-radius: 17px;
        overflow: hidden;
    }

    .toggle-switch .toggle-inside {
        border-radius: 50%;
        background: var(--colorhighlight);
        position: absolute;
    }

.switch-vertical {
    background-color: #00F;
    width: 0px;
    height: 32px;
    margin-left: 26px;
}

    .switch-vertical input {
        height: 100%;
        width: 60px;
        right: 0;
        margin: 0;
    }

        .switch-vertical input:focus ~ span {
            box-shadow: 0 0 0 2px rgba(39, 94, 254, .3);
        }

    .switch-vertical label {
        font-size: 15px;
        line-height: 30px;
        display: block;
        width: 80px;
        height: 50%;
        margin: 0;
        text-align: left;
        padding-left: 12px;
    }

    .switch-vertical .toggle-outside {
        background: rgb(241 241 241);
        border: 1px solid #dcdcdc;
        position: absolute;
        width: 21px;
        height: 100%;
        right: 0;
        top: 0;
    }

    .switch-vertical .toggle-inside {
        height: 15px;
        left: 2.2px;
        top: 3px;
        width: 15px;
    }

    .switch-vertical input:checked ~ .toggle-outside .toggle-inside {
        top: 3px;
    }

    .switch-vertical input ~ input:checked ~ .toggle-outside .toggle-inside {
        top: 12px;
    }

/* Gender */
.gender.ny {
    border: 2px solid rgb(50 177 0);
}

.gender > label {
    overflow: hidden;
    width: 50%;
    box-shadow: 0 0 10px rgb(200 200 200 / 20%);
}

    .gender > label:first-child {
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
    }

    .gender > label:last-child {
        border-top-left-radius: 4px;
        border-bottom-left-radius: 4px;
    }

.gender input[type="radio"] {
    display: none;
}

    .gender input[type="radio"]:checked + .box {
        background-color: #6eadbe;
    }

        .gender input[type="radio"]:checked + .box span {
            color: white;
            transform: translateY(10px);
        }

            .gender input[type="radio"]:checked + .box span:before {
                transform: translateY(0px);
                opacity: 1;
            }

.gender .box {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    width: 100%;
    height: 38px;
    background-color: #fff;
    cursor: pointer;
}

    .gender .box:active {
        transform: translateY(2px);
    }

    .gender .box span {
        position: relative;
        transform: translate(0, 10px);
        left: 0;
        right: 0;
        justify-content: center;
        transition: all 150ms ease;
        user-select: none;
        color: #6eadbe;
    }

        .gender .box span:before {
            position: absolute;
            right: -20px;
            font-size: 20px;
            display: block;
            transform: translateY(-20px);
            opacity: 0;
            transition: all 300ms ease-in-out;
            font-weight: normal;
            color: white;
        }

/* wm */
.gender .male span:before {
    content: "\f183";
}

.gender .female span:before {
    content: "\f182";
}
