//
// Forms
// --------------------------------------------------
.form-actions {
   background-color: inherit;
}


.label {
   .no-border-radius;
   text-shadow: none;
}


//a.win-command,
input, button, select, textarea {
   font-family: @sansFontFamily;
   font-weight: 300;
   line-height: 30px;
   .box-sizing(border-box);
}

textarea {
   width: 260px;
   height: auto;
   .SwapPadding(4px, 4px, 4px, 8px);
   overflow-y: scroll;
   word-wrap: break-word;
   min-width: 260px;
   min-height: 39px;
}

input[type=text], input[type=password], input[type=email], input[type=number],
input[type=tel], input[type=url], input[type=search], textarea {
   min-height: 28px;
   min-width: 64px;
   border-width: 2px;
   border-style: solid;
   background-clip: padding-box;
   font-weight: 400;
   line-height: 1.3636; /* 20px when font-size is 11pt */
}

.input-prepend .add-on, .input-append .add-on {
   height: 16px;
   line-height: 15px;
}
.input-prepend .btn-group .btn.dropdown-toggle .caret {margin-top: 0}

.input-prepend .add-on:first-child,
.input-prepend .btn:first-child {
   .formBorder;
   .Border-width(2px, 0, 2px, 2px);
}
.input-append .add-on:last-child,
.input-append .btn:last-child {
   .formBorder;
   .Border-width(2px, 2px, 2px, 0);
}
.input-prepend.input-append .add-on:first-child, .input-prepend.input-append .btn:first-child {
   .MarginLeftOrRight("margin-right",-1px);
}
.input-append .btn {
   height: 28px;
   min-height: 28px;
}

.radio.inline,
.checkbox.inline {
   padding-top: 0;
}


/*
Select control.
*/
select {
   padding: 2px;
   min-height: 24px;
   min-width: 80px;
   border-width: 2px;
   border-style: solid;
   background-clip: padding-box;
}


/*
Range control.
*/
input[type=range] {
   width: 280px;
   height: auto;
   .SwapPadding(17px, 0, 32px, 0);
}

// Form Search
// ------------------------
input.search-query {
   .no-border-radius;
}
.form-search .input-append .search-query {
   .no-border-radius;
}
.form-search .input-append .btn {
   .no-border-radius;
}
.form-search .input-prepend .search-query {
   .no-border-radius;
}
.form-search .input-prepend .btn {
   .no-border-radius;
}



.form-search .input-append button[type="submit"].btn ,
.form-search .input-append input[type="submit"].btn {
   .BorderLeftOrRight("border-left", 0);
   .PaddingLeftOrRight("padding-right", 2px);
   background-color: transparent;
   color: @grayDark;
}
   .form-search .input-append button[type="submit"].btn .icon-search,
   .form-search .input-append input[type="submit"].btn .icon-search {
      font-size: 18px;
      line-height: 18px;
   }

.form-search .input-append .search-query {
   .BorderLeftOrRight("border-right", 0);
}
   // TODO: this should be moved in theme css
   .form-search .input-append .search-query:focus + button[type="submit"].btn,
   .form-search .input-append .search-query:focus + input[type="submit"].btn {
      border-color: rgba(0, 0, 0, 0.6);
   }


.form-search .input-prepend button[type="submit"].btn ,
.form-search .input-prepend input[type="submit"].btn {
   .BorderLeftOrRight("border-right", 0);
   .PaddingLeftOrRight("padding-left", 2px);
   background-color: transparent;
   color: @grayDark;
}
.form-search .input-prepend button[type="submit"].btn .icon-search,
.form-search .input-prepend input[type="submit"].btn .icon-search {
   font-size: 18px;
   line-height: 18px;
}

.form-search .input-prepend .search-query {
   .BorderLeftOrRight("border-left", 0);
}
// TODO: this should be moved in theme css
.form-search .input-prepend .search-query:focus + button[type="submit"].btn,
.form-search .input-prepend .search-query:focus + input[type="submit"].btn {
   border-color: rgba(0, 0, 0, 0.6);
}




// FORM FIELD FEEDBACK STATES
// --------------------------

// Warning
.control-group.warning {
   .formFieldState(@warningBackground, @warningBackground, @warningBackground);
}
// Error
.control-group.error {
   .formFieldState(@errorBackground, @errorBackground, @errorBackground);
}
// Success
.control-group.success {
   .formFieldState(@successBackground, @successBackground, @successBackground);
}
// Success
.control-group.info {
   .formFieldState(@infoBackground, @infoBackground, @infoBackground);
}
