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

    label {
        font-weight: var(--font-medium);
        margin-bottom: 6px;
        font-size: 14px;

        > span {
            margin-left: 4px;
            color: var(--color-red);
        }
    }
}

.form-control {
    font-size: 14px;
    height: 40px;
    padding: 10px 15px;
    border-color: var(--color-gray-lite);
    border-radius: var(--radius-default);
    transition: var(--transition-150);

    &:focus {
        border-color: var(--color-primary);
        box-shadow: none;
    }
}

select {
    border: none;

    &.arrow-black {
        background-position: right 10px center;
    }
}

textarea {
    &.form-control {
        transition: border var(--transition-150), resize 0ms;
    }
}

.form-check {
    padding: 0 !important;

    label {
        font-weight: var(--font-normal);
        color: var(--color-gray);
    }

    input[type="checkbox"] {
        position: absolute;
        left: 0;
        margin: 0;
        display: none;

        &:checked + label,
        &:not(:checked) + label {
            position: relative;
            padding-left: 28px;
            cursor: pointer;
            display: inline-block;
            text-align: left;
        }

        &:checked + label:before,
        &:not(:checked) + label:before {
            content: "";
            position: absolute;
            left: 0;
            top: 2px;
            width: 17px;
            height: 17px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            transition: var(--transition-150);
        }

        &:checked + label:after,
        &:not(:checked) + label:after {
            position: absolute;
            content: "";
            top: 7px;
            left: 4px;
            height: 5px;
            width: 9px;
            border: 2px solid;

            border-color: var(--color-primary);
            /*rtl:begin:ignore*/
            border-top: none;
            border-right: none;
            transform: rotate(-45deg) scale(0);
            /*rtl:end:ignore*/
            transition: var(--transition-150);
        }

        &:not(:checked) + label:after {
            opacity: 0;
            transform: rotate(-45deg) scale(0) #{"/*rtl:ignore*/"};
        }

        &:checked + label:after {
            opacity: 1;
            transform: rotate(-45deg) scale(1) #{"/*rtl:ignore*/"};
        }
    }
}

.form-radio {
    padding: 0;

    label {
        font-weight: var(--font-normal);
        color: var(--color-gray);
    }

    input[type="radio"] {
        position: absolute;
        left: 0;
        margin: 0;
        display: none;

        &:checked + label,
        &:not(:checked) + label {
            position: relative;
            padding-left: 28px;
            cursor: pointer;
            display: inline-block;
            text-align: left;
        }

        &:checked + label:before,
        &:not(:checked) + label:before {
            content: "";
            position: absolute;
            left: 0;
            top: 2px;
            width: 18px;
            height: 18px;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-full);
            transition: var(--transition-150);
        }

        &:checked + label:after,
        &:not(:checked) + label:after {
            position: absolute;
            content: "";
            top: 6px;
            left: 4px;
            height: 10px;
            width: 10px;

            background: var(--color-primary);
            border-radius: var(--radius-full);
            transform: scale(0);
            transition: var(--transition-150);
        }

        &:not(:checked) + label:after {
            opacity: 0;
            transform: scale(0);
        }

        &:checked + label:after {
            opacity: 1;
            transform: scale(1);
        }
    }
}

.form-check-label {
    > a {
        color: var(--color-primary);

        &:hover {
            color: var(--color-primary-hover);
        }
    }
}

.has-error {
    .form-control {
        border-color: var(--color-red);

        &:focus {
            border-color: var(--color-red);
        }
    }
}

.error-message {
    line-height: 20px;
    display: block;
    margin: 4px 0 -5px;
    color: var(--color-red);
}

::placeholder {
    color: var(--color-gray-dark-5) !important;
    opacity: 1;
}

:-ms-input-placeholder {
    color: var(--color-gray-dark-5) !important;
}

::-ms-input-placeholder {
    color: var(--color-gray-dark-5) !important;
}
