// 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();

        &#Wholesale, &#contact {
            background-color : lighten(@brand-primary, 30%);
            padding          : 30px;
            overflow         : hidden;
        }

        &#newsletter {
            padding    : 15px;
            border     : 1px solid @gray-lighter;
            margin-top : 15px;
            .border-radius(3px);
            p {
                margin-bottom : 4px;
            }
        }

        footer &#newsletter {
            border-width : 0;
            padding      : 0;
            margin-top   : 5px;
            p {
                float : left;
                width : 76%;
            }
            input[type="submit"] {
                margin-top : 0;
            }
        }

        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();
        }

        // -- Recaptcha & Captcha style
        .captcha {

            .captcha_image {
                width         : 65% !important;
                height        : auto !important;
                float         : left;
                text-align    : center;
                padding-right : 10px;

                aside & {
                    width : 100% !important;
                }
            }

            label, input {
                float       : left;
                width       : 35%;
                font-weight : normal;
                font-size   : @font-size-small;

                aside & {
                    width : 100%;
                }
            }

            .recaptcha_links {
                clear       : both;
                font-size   : @font-size-small;
                padding-top : 1em;

                a + a {
                    border-left  : 1px solid @gray;
                    padding-left : 1em;
                    margin-left  : 1em;
                }
            }
        }

        // -- Buttons
        [type="submit"] {
            float : right;

            &: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(1px 1px 3px @gray-light inset, @input-inner-shadow);
        & when (@button-transition) {
            .transition(all; 0.3s);
        }

        //&:focus:not([type="submit"]):not([type="button"]){
        &: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; @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 : 5em;

        &.resize {
            .resize(vertical);
        }
    }

    #contactsmall {
        background-color : lighten(@brand-primary, 35%);
        padding          : 15px;

        select {
            width : 98%;
        }

        p {
            margin-bottom : 7px;
        }
    }
    .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";
}