/* Form */

input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"],
.uneditable-input{@extend .inputs}

.inputs{
  &.input-size-large{padding:$paddingLarge;font-size:16px;vertical-align:top}
}
.input-micro{width:30px}


// Carets in other button sizes
.btn-mini .caret,
.btn-small .caret,
.btn-large .caret {
  margin-top: 8px;
}

fieldset{
  & + fieldset,.tab-content &{margin-top:$baseLineHeight * 2}
  + .form-actions{margin-top:40px}
  hr{margin:$baseLineHeight * 2 0}
}

.page-header + fieldset{margin-top:40px}
.tab-content + .form-actions{margin-top:30px}

legend{padding:1px;
  + p, + .well{margin-top:10px;margin-bottom:35px;-webkit-margin-top-collapse: separate}
  + .control-group{margin-top:$baseLineHeight+5;-webkit-margin-top-collapse:separate} // Legend collapses margin, so next element is responsible for spacing}   
}

.controls > .radio:first-child, .controls > .radio:first-of-type, // Aggiunto first-of-type per farlo funzionare anche con input hidden che lo precedono
.controls > .checkbox:first-child, .controls > .checkbox:first-of-type{
  padding-top: 5px; // has to be padding because margin collaspes
}

.form-actions{
  .pull-right + .pull-right{margin-right:10px}
  &.form-actions-basic{
    background:none;
    margin-top:$baseLineHeight*2;
    padding:($baseLineHeight - 1) 0 $baseLineHeight;
  }
}


.controls{
  + .controls{margin-top:5px}
  .icon-help{margin-left:10px}
  ul.unstyled,ul.icons{margin-top:5px}
  .btn-group{display:inline-block;vertical-align:middle}
}

label abbr[title]{border:0} // Mandatory

.form-horizontal{
  .controls .help-block{margin-top: 5px}
  .controls + .controls{margin-top:10px}
  .checkbox-solo{margin:0;vertical-align:baseline}
} 

.input-prepend,.input-append{
  select{-webkit-appearance: none;line-height:1;cursor:pointer;width:auto}
  .help-block{font-size:$baseFontSize !important}
  input + input{margin:0 -2px;} 
}

input,.input-prepend,.input-append{
   + .checkbox.inline{margin-left:10px}
}

.input-block{width:100%;@include input-block-level()}

.input-spin.on{background:#fff url('https://static.estraspa.it/assets/img/spinner.gif') 97% 51% no-repeat !important}
