// 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
//==================================================
& when (@form) {
    form {
        .clearfix-mixin();

        p {
            .clearfix-mixin();
        }

        // -- Recaptcha & Captcha style
        @import "form/form-recaptcha";

        // -- Buttons
        [type="submit"] {
            float : right;

            &:hover {
            }
        }
    }

    fieldset {

        legend {
            font-size : @font-size-large;
        }

        &.unstyled {
            padding : 0;
            border  : 0;

            legend {
                padding       : 0;
                margin-bottom : .45em;
                font-weight   : @heading-weight;
            }
        }
    }

    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           : @input-border-width solid @input-border-color;
        background-color : @input-bg;
        color            : @input-color;
        .border-radius(@input-border-radius);
        //.box-shadow(1px 1px 3px @gray-light inset, @input-inner-shadow);
        & when (@button-transition) {
            .transition(border 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; @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 inset; @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 inset; @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 inset; @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 inset; @input-shadow-focus);
            }
        }

        &[disabled], [disabled] &, &[disabled]:focus, &.noedit, &.noedit:focus {
            border-color : @input-border-color-disabled; //!important;
            background   : @input-bg-disabled; //!important;
            color        : darken(@input-bg-disabled, 30%); //!important;
            & when (@ie) and (@ie8) {
                cursor : default; // !important;
            }
            cursor       : not-allowed; // !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 : 5em;

        &.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";
}