/* -----------------------------------------
   Forms
----------------------------------------- */
.form-horizontal,
.form-inline {

    .form-group {

        .control-label {
            font-weight: normal;
            color: darken(@text-color, 10%);

            &.col-lg-12,
            &.col-md-12,
            &.col-sm-12,
            &.col-xs-12 {
                text-align: left;
                margin-bottom: 5px;
            }
        }
        
        .input-icon,
        .input-serach {
            width: 100%;
            table-layout: fixed;    

            .input-group-addon {
                position: relative;
                padding: 0;
                border: 0 none;
                width: 0;

                i {
                    position: absolute;
                    top: 0;
                    left: 0;
                    bottom: 0;
                    border: 0;
                    z-index: 5;
                    width: auto;
                    display: inline-block;
                    vertical-align: middle;
                    text-align: center;
                    padding: 6px 12px;
                    background: transparent;
                    line-height: @line-height-base;
                    -webkit-box-sizing: content-box;
                    -moz-box-sizing: content-box;
                    box-sizing: content-box;
                    pointer-events: none;
                    color: @input-border;
                    margin:0;
                    margin-top: -2px;

                    &.glyphicon {padding: 4px 12px 4px;}
                }

                &:last-child {
                    i {
                        right: 0;
                        left: auto;
                    }
                }
            }       

            .form-control {
                padding-right: 35px;
                border-top-right-radius: @border-radius-base;
                border-bottom-right-radius: @border-radius-base;
            } 
            .input-group-addon + .form-control  {
                padding-left: 35px;
                padding-right: 12px;
                border-top-left-radius: @border-radius-base;
                border-bottom-left-radius: @border-radius-base;
            } 
        }

        .input-group + .input-group {margin-top: 15px;}

        &.has-error {
            .control-label {color: @brand-danger;}
            .form-control {
                border-color: @brand-danger;
                &:focus {
                    border-color: @brand-danger;
                }
            }
            .help-block {color: @brand-danger; font-weight: bold; font-size: 13px;}
        }
        &.has-success {
            .control-label {color: @brand-success;}
            .form-control {
                border-color: @brand-success;
                &:focus {
                    border-color: @brand-success;
                }
            }
        }
        &.has-warning {
            .control-label {color: @brand-warning;}
            .form-control {
                border-color: @brand-warning;
                &:focus {
                    border-color: @brand-warning;
                }
            }
        }

        &.form-group-vertical {
            .form-control {
                margin-bottom: 15px;
                &:last-child {margin-bottom: 0;}
            }
        }

        .icon-textarea {
            padding-left: 32px;
        }

        .textarea-icon {
            position: absolute;
            top: 10px;
            left: 25px;
            color: @input-border;
            .transition(color);
            .transition-duration(0.4s);
        }

        &:hover {
            .textarea-icon {color: @mainColor;}
        }
    }

    .form-control {

        &.input-sm,
        &.input-lg {
            border-radius: @border-radius-base;
        }

        &.input-rounded {
            border-radius: 50px;
        }

    }

    &.group-border {

        .form-group {
            border-bottom: 1px solid lighten(@input-border, 10%);
            padding-bottom: 15px;
            padding-top: 15px;
            margin-left: -15px;
            margin-right: -15px;
            margin-bottom: 0;
        }

        .form-group:last-child {
            border-bottom: none;
            margin-bottom: 0;
        }
    }

    &.stripped {
        .form-group:nth-child(even) {
            #gradient.vertical(#ffffff;@hover-stripped-bg;0%;100%);
        }
    }

    &.hover-stripped {
               
        .form-group:hover {
            .transition(~"background ease-in-out .25s");
            #gradient.vertical(#ffffff;@hover-stripped-bg;0%;100%);
        }
    }
}

.form-inline {
    .checkbox-custom,
    .radio-custom {
        margin-top: 0;
    }
}

.form-control {
    outline: 0;
    box-shadow: none;

    &:hover {
        border-color: @input-border-focus;
    }
}

.help-block {
    margin-bottom: 0;
    font-size: 13px;
    padding-left: 3px;
}

/* -----------------------------------------
   Input group
----------------------------------------- */
.input-group {
    .input-group-btn {
        .btn {
            padding: 6px 12px;
            border: 1px solid @input-border;

            &.btn-sm {
                padding: 5px 10px;
            }
        }
    }
}

/* -----------------------------------------
   Input sizes
----------------------------------------- */
.input-mini {width: 60px!important;}
.input-small {width: 90px!important;}
.input-medium {width: 150px!important;}
.input-large {width: 210px!important;}
.input-xlarge {width: 270px!important;}
.input-block {width: 100%; display: block;}