// Table of Content
//==================================================
//	Custom style
//	Search form
//==================================================

// [type="text"], [type="password"], [type="email"], [type="search"], [type="tel"], [type="url"], [type="date"], [type="datetime"], [type="datetime-local"], [type="time"], [type="month"], [type="week"], [type="number"]

//	Custom style
//==================================================
form{
    .clearfix-mixin();
    //padding: 20px;
    //background: #fff;
    margin: 15px;
    position: relative;
    z-index: 2;
    &:before {
        content: '';
        position: absolute;
        z-index: -1;
        top: -15px;
        bottom: -15px;
        left:-15px ;
        right: -15px;
        .rgba(#fff;50);
    }

    fieldset{
        &.unstyled{
            padding : 0;
            border  : 0;

            legend{
                width         : 100%;
                padding       : 0;
                margin-bottom : 1em;
                font-weight   : @heading-weight;
            }
        }

        legend{
            font-size : @font-size-large;
        }
    }

    p{
        .clearfix-mixin();
        margin-bottom: 10px;
    }

    // -- Recaptcha & Captcha style
    @import "form/form-recaptcha";

    // -- Buttons
    [type="submit"]{
        float : right;
        margin-bottom: 0;

        &:hover{
        }
    }
}

label, .label{
    display       : block;
    margin-bottom : 0.25em;

    &[for]{
        cursor : pointer;
    }

    &[class*="grid_"]{
        margin-bottom : 0;
    }

    .label-inline &{
        margin-bottom : 0;
        line-height   : unit(@button-line-height * 2, em);
    }

    &.required:after{
        color   : @brand-error;
        content : ' *';
    }
}

.notvalid{
    color : @brand-error !important;
}

select, textarea, input{
    font-family      : @font-family-text;
    border-width     : @input-border-width;
    border-style     : solid;
    border-color     : @input-border-color;
    background-color : @input-bg;
    color            : @input-color;
    .border-radius(@input-border-radius);
    .box-shadow(0 1px 2px rgba(0,0,0,0.26), @input-inner-shadow);
    & when (@button-transition){
        .transition(all; 0.3s);
    }

    &:focus{
        & when not(@input-bg-focus = @input-bg){
            background : @input-bg-focus;
        }
        & when not(@input-border-color-focus = @input-border-color){
            border-color : @input-border-color-focus;
        }
        .box-shadow(0 0 @input-shadow-size @input-border-color-focus, 0 1px 2px rgba(0,0,0,0.26); @input-shadow-focus);
    }

    &.success, &.warning, &.error, &.info{
        & when (@form-colors){
            color : @input-color;
        }
    }
    &.success when (@form-color-success) and (@form-colors){
        border-color : @brand-success;
        &:focus{
            .box-shadow(0 0 @input-shadow-size @brand-success; @input-shadow-focus);
        }
    }
    &.warning when (@form-color-warning) and (@form-colors){
        border-color : @brand-warning;
        &:focus{
            .box-shadow(0 0 @input-shadow-size @brand-warning; @input-shadow-focus);
        }
    }
    &.error, &.notvalid{
        & when (@form-color-error) and (@form-colors){
            border-color : @brand-error;
            &:focus{
                .box-shadow(0 0 @input-shadow-size @brand-error; @input-shadow-focus);
            }
        }
    }
    &.info when (@form-color-info) and (@form-colors){
        border-color : @brand-info;
        &:focus{
            .box-shadow(0 0 @input-shadow-size @brand-info; @input-shadow-focus);
        }
    }

    &[disabled], [disabled] &, &[disabled]:focus, &.noedit, &.noedit:focus{
        border-color : darken(@input-bg-disabled, 10%) !important;
        background   : @input-bg-disabled !important;
        color        : darken(@input-bg-disabled, 30%) !important;
        .box-shadow(none) !important;
    }
}

input, select{
    padding     : 0 .5em;
    height      : unit(@input-line-height * 2, em);
    line-height : unit(@input-line-height * 2, em) - 1;
}

select{
    option{
//        color : @text-color;
    }
}

textarea{
    padding    : .5em;
    min-height : 100px;

    &.resize{
        .resize(vertical);
    }
}

.forgot-password, .retrieveFormBlock > form + a{
    float      : left;
    margin-top : -(@button-height-base - @padding-base-vertical);
}

// Checkbox & Radio Styles
//===================================================
@import "form/form-checkbox_radio";

// Search Form Styles
//==================================================
@import "../widgets/search_form";

// Form builder elements Styles
//==================================================
@import "../widgets/form_builder";

// Form labeled elements Styles
//==================================================
@import "form/form-labeled";

// Form input label elements Styles
//==================================================
@import "form/form-input-label";