.form-control {
    outline: none;
    height: 50px;
    font-size: 14px;
    padding: 0 20px;
    border: none;
    height: 50px;
    border-radius: 0;
    border: 1px solid #e5e5e5;
    transition: all 0.4s ease;
    box-shadow: 0 0 0 transparent;
    background-color: transparent;
    @include placeholder() {
        opacity: 1;
        font-size: 14px;
    }

    &:focus {
        outline: none;
        box-shadow: 0 0 0 #000;
        border-color: $color-1st;
    }
}

textarea.form-control {
    height: auto;
    padding: 2rem;
    resize: none;
}

.checkbox {
    position: relative;
    display: block;

    > input {
        position: absolute;
        visibility: hidden;
    }

    label {
        margin-bottom: 0;
        position: relative;
        padding-left: 30px;
        font-family: $font-1st;
        color: rgba($color-heading, 0.5);
        font-weight: 400;
        cursor: pointer;

        &:before {
            content: "";
            display: block;
            position: absolute;
            left: 0;
            top: 0px;
            height: 20px;
            width: 20px;
            z-index: 10;
            border: 1px solid $color-heading;
            transition: all 0.4s ease;
        }

        &:after {
            content: "";
            display: block;
            position: absolute;
            top: 4px;
            left: 7px;
            width: 6px;
            height: 10px;
            border: 2px solid #fff;
            border-top: none;
            border-left: none;
            z-index: 10;
            opacity: 0;
            @include transform(rotate(0deg));
            transition: all 0.4s ease;
        }
    }

    input[type="checkbox"]:checked ~ label {
        &:before {
            background-color: $color-2nd;
            border-color: $color-2nd;
        }

        &:after {
            @include transform(rotate(45deg));
            opacity: 1;
        }
    }

    &--circle {
        label {
            font-size: 20px;
            font-weight: 600;
            color: #555;

            &:before {
                border-radius: 50%;
                border-color: #595959;
            }
        }

        input[type="checkbox"]:checked ~ label {
            &:before {
                background-color: transparent;
            }

            &:after {
                background-color: $color-1st;
                border-radius: 50%;
                border: none;
                width: 14px;
                height: 14px;
                top: 3px;
                left: 3px;
            }
        }
    }

    &--inline {
        display: inline-block;
        margin-bottom: 1rem;
    }

    &--color {
        margin-right: 1rem;

        > label {
            margin-bottom: 0;
            width: 20px;
            height: 20px;
            padding-left: 0;
            background-color: transparent;
            border-radius: 50%;
            transition: all 0.4s ease;

            &:before {
                width: 20px;
                height: 20px;
                @include center();
                border: none;
                border-radius: 50%;
            }

            &:after {
                display: none !important;
            }
        }

        input[type="checkbox"]:checked ~ label {
            background-color: transparent;

            &:before {
                background-color: transparent;
                border: 1px solid #ccc;
            }
        }
    }

    &--size {
        margin-right: 1rem;

        > label {
            margin-bottom: 0;
            padding: 8px 20px;
            border: none;
            color: #222222;
            background-color: #f6f6f6;
            border-radius: 0;
            transition: all 0.4s ease;

            &:before,
            &:after {
                display: none;
            }
        }

        input[type="checkbox"]:checked ~ label {
            color: #ffffff;
            background-color: #a7a7a7;
        }
    }
}

.radio {
    position: relative;

    > input {
        position: absolute;
        visibility: hidden;
    }

    label {
        position: relative;
        margin-bottom: 0;
        padding-left: 30px;
        font-family: $font-1st;
        color: #737373;
        font-weight: 400;
        cursor: pointer;

        &:before {
            content: "";
            display: block;
            position: absolute;
            left: 0;
            top: 0px;
            height: 20px;
            width: 20px;
            z-index: 10;
            border: 1px solid rgba(19, 8, 1, 0.2);
            background-color: #fff;
            transition: all 0.4s ease;
            border-radius: 50%;
        }

        &:after {
            content: "";
            display: block;
            position: absolute;
            width: 8px;
            height: 8px;
            top: 6px;
            left: 6px;
            border-radius: 50%;
            background-color: #fff;
            z-index: 15;
            opacity: 0;

            transition: all 0.6s ease;
        }
    }

    input[type="checkbox"]:checked ~ label {
        &:before {
            background-color: transparent;
        }

        &:after {
            border-radius: 50%;
            border: none;
            width: 8px;
            height: 8px;
            top: 6px;
            left: 6px;
            opacity: 1;
            background-color: $color-1st;
        }
    }

}

.form-group {
    margin-bottom: 20px;

    > label {
        margin-bottom: 10px;
        font-weight: 500;
        color: #000000;
        line-height: 1em;
        font-size: 14px;

        sup {
            color: $color-danger;
        }
    }

    @media (min-width: 992px) {
    }
}

.form-group--inline {
    position: relative;
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;

    > label {
        margin-bottom: 0;
    }

    .form-group__content {
        width: 100%;
    }
}

.form-group--number {
    display: inline-block;
    position: relative;

    button {
        @include vertical-align();
        width: 20px;
        height: 20px;
        max-width: 20px;
        color: $color-heading;
        font-size: 30px;
        border: none;
        background: none;

        &.up {
            right: 12px;

            &:before,
            &:after {
                position: absolute;
                top: 50%;
                left: 50%;

                display: inline-block;
                content: "";
                width: 14px;
                height: 1px;
                background-color: $color-text;
            }

            &:before {
                @include transform(translate(-50%, -50%) rotate(90deg));
            }

            &:after {
                @include transform(translate(-50%, -50%) rotate(0deg));
            }
        }

        &.down {
            left: 12px;

            &:before {
                position: absolute;
                top: 50%;
                left: 50%;
                display: inline-block;
                content: "";
                width: 14px;
                height: 1px;
                background-color: $color-text;
                @include transform(translate(-50%, -50%) rotate(0deg));
            }
        }
    }

    .form-control {
        height: 45px;
        padding: 0 25px;
        font-size: 18px;
        font-weight: 600;
        text-align: center;
        border: none;
        color: $color-heading;
        background-color: transparent;
        @include placeholder() {
            color: $color-heading;
        }
    }
}

.select--arrow {
    position: relative;

    i {
        @include vertical-align();
        right: 10px;
    }

    .form-control {
        @include appearance(none);
    }
}

.dropdown {
    position: relative;
    display: inline-block;

    > a {
        position: relative;
        display: block;
        padding-right: 20px;

        &:after {
            content: "\e93a";
            font: normal normal normal 12px/1 linearicons;
            @include vertical-align();
            right: 0;
        }
    }

    ul {
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 100;
        min-width: 120px;
        max-width: 200px;
        width: 100%;
        padding: 4px 0;
        background-color: #fff;
        box-shadow: 0 1px 1px 2px rgba(#ccc, 0.2);
        @include hidden;
        text-align: left;

        li {
            list-style-type: none;
            margin: 0;
            padding: 0;

            a {
                display: block;
                font-size: 1.3rem;
                color: $color-heading;
                padding: 6px 10px;
            }
        }
    }

    &:hover {
        ul {
            @include show;
        }
    }

    &.open {
        ul {
            @include show;
        }
    }
}

.variant {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    z-index: 10;
    border: 1px solid #999;
    cursor: pointer;

    &__tooltip {
        position: absolute;
        bottom: 100%;
        left: 50%;
        padding: 5px 10px;
        @include transform(translate(-50%, -50%));
        background-color: rgba(#000, 0.9);
        border-radius: 2px;
        color: #ffffff;
        font-size: 12px;
        transition: all 0.4s ease;
        @include hidden;

        &:before {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            @include transform(translateX(-50%));
            @include triangle(12px, #000, down);
        }
    }

    &:last-child {
        margin-right: 0;
    }

    &.variant--size {
        position: relative;
        vertical-align: top;
        border: none;
        background-color: #f1f1f1;
        transition: all 0.4s ease;

        .variant__size {
            @include center();
            color: $color-text;
            font-size: 12px;
        }

        &.active {
            .variant__size {
                color: $color-heading;
            }
        }

        &:hover {
            background-color: $color-1st;

            .variant__size {
                color: #ffffff;
            }
        }
    }

    &.variant--color {
        border: 1px solid #ccc;

        &:before {
            content: "";
            width: 14px;
            height: 14px;
            border-radius: 50%;
            @include center();
        }

        &.color--1 {
            &:before {
                background-color: #70849d;
            }
        }

        &.color--2 {
            &:before {
                background-color: #cfa58f;
            }
        }

        &.color--3 {
            &:before {
                background-color: #f06292;
            }
        }
    }

    &.variant--image {
        img {
            border-radius: 50%;
            max-width: 20px;
            @include center;
        }
    }

    &:hover {
        .variant__tooltip {
            @include show;
        }
    }

    &.active {
        &:before {
            border-color: #000;
        }

        .variant__tooltip {
            @include show;
        }
    }
}

.custom-checkbox, .custom-radio {
    input[type="checkbox"], input[type="radio"] {
        display: none;
    }

    label {
        display: block;
    }

    span {
        display: block;
        border-radius: 50%;
        width: 25px;
        height: 25px;
        position: relative;
        cursor: pointer;
    }

    input[type="checkbox"]:checked ~ span, input[type="radio"]:checked ~ span {
        &:before {
            content: "";
            display: block;
            border: 2px solid $color-1st;
            position: absolute;
            top: -4px;
            left: -4px;
            right: -4px;
            bottom: -4px;
            border-radius: 50%;
        }
    }

    &.disabled {
        label {
            position: relative;

            &:before,
            &:after {
                content: "";
                position: absolute;
                top: 50%;
                left: 50%;
                width: 1px;
                height: 90%;
                background-color: $color-heading;
                transform-origin: 50% 50%;
                transition: all 0.4s ease;
                transform-origin: 50% 50%;
                z-index: 20;
            }

            &:before {
                transform: translate(-50%, -50%) rotate(45deg);
            }

            &:after {
                transform: translate(-50%, -50%) rotate(-45deg);
            }
        }

        span {
            opacity: .9;
        }

        input[type="checkbox"]:checked ~ span, input[type="radio"]:checked ~ span {
            &:before {
                display: none;
            }
        }
    }
}
