// Default styling for the forms-angular classes, to work with navbar-fixed
.list-item {
  .well-sm;
  min-height: 40px;
}

button.form-btn {
  font-size: 60%;
  padding-top: 0.25em;
}

.form-horizontal {
  input.input-sm,  textarea.input-sm {
    font-size: 14px;
    padding: 2px 6px;
  }
  select.input-sm {
    font-size: 14px;
    padding-left: 5px;
  }
  .checkbox {
    float: left;
    padding: 5px 10px 0 6px;
  }
  .control-label {
    padding-top: 6px;
  }
  .bs3-input {
    padding-left: 0;
  }
  .help-block {
    clear: left;
    bottom-margin: 4px;
  }
}

// Try and get angular-elastic to work properly (or as near as is really necessary for now)
// May be worth trying to understand why it works fine in BS2
textarea[msd-elastic] {
  min-height: 25px;
}

.fileupload-buttonbar .btn {
  padding: 5px 8px;
}

.page-header {
  font-family: @headings-font-family;
  font-weight: @headings-font-weight;
  color: @headings-color;
  font-size: @font-size-large;
  border-bottom: 2px solid @headings-color;
  min-height: @navbar-height;
}

.fixed-header {
  background-color: @body-bg;
}

@media (max-width: @grid-float-breakpoint) {

  // UNFIX THE TOPBAR
  // ----------------
  //  // Remove any padding from the page body
  .page-body {
    padding-top: 0;
  }

  // Unfix the navbars
  .page-header {
    position: static;
  }

  .global-search {
    padding-right: 7px;
  }
}

form, ng-form {
  &.form-horizontal .form-group {
    margin-left: 0;
    margin-right: 0;
  }
  &.form-horizontal.compact {
    .form-group {
      margin-bottom: 2px;
    }
  }

  ol.sub-doc li {
    border-bottom: 1px solid darken(@well-bg, 7%);
  }

  .schema-head, .schema-foot {
    border-bottom: 1px solid darken(@well-bg, 7%);
    padding-left: 23px;
  }

  .schema-head {
    border-top: 1px solid darken(@well-bg, 7%);
  }

  //  .radio input[type="radio"], .radio-inline input[type="radio"], .checkbox-inline input[type="checkbox"]
  .checkbox input[type="checkbox"] {
    margin-left: -5px;
  }

  .form-inline > .sub-doc {
    background-color: @body-bg;
  }
}

.search-results {
  .search-result {
    color: @link-color;
  }
  .search-result.focus {
    background-color: @link-hover-color;
  }
}

.form-inline {
  .row {
    margin-left: 5px;
    margin-right: 0;
  }
  .form-group .input-group {
    display: table-cell;
    .input-group-addon {
      display: none;
    }
  }
}

form {
  .tab-content {
    margin-top: 5px;
  }
}

@media (max-width: 767px) {
  // For some reason bootstrap only does this for large windows - need it for search on mobile
  .navbar-form {
    width: auto;
    border: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    -webkit-box-shadow: none;
    box-shadow: none;
  }

  .navbar-form.navbar-right:last-child {
    margin-right: -15px;
  }

  form {
    .schema-head, .schema-foot {
      padding: 5px 15px;
    }
  }

}
