textarea {
  resize: vertical;
}

input {
  border-radius: $border-radius-base;
}

input[type='text'].danger {
  background: #f2dede!important;
  border-color: #d66;
  text-shadow: 0 1px 1px #fff;
}

.datetime-controls {
  select {
    width: 100px;
  }
}

.form-actions {
  margin-top: 0;
  margin-bottom: -$gl-padding;
  padding: $gl-padding;
  background-color: $background-color;
  border-top: 1px solid $border-color;
}

label {
  &.inline-label {
    margin: 0;
  }

  &.label-light {
    font-weight: 600;
  }
}

.control-label {
  @extend .col-sm-2;
}

.inline-input-group {
  width: 250px;
}

.custom-form-control {
  width: 150px;
}

@media (min-width: $screen-sm-min) {
  .custom-form-control {
    width: 150px;
  }
}

/* Medium devices (desktops, 992px and up) */
@media (min-width: $screen-md-min) {
  .custom-form-control {
    width: 170px;
  }
}

/* Large devices (large desktops, 1200px and up) */
@media (min-width: $screen-lg-min) {
  .custom-form-control {
    width: 200px;
  }
}

.help-form .form-group {
  margin-left: 0;
  margin-right: 0;

  .control-label {
    font-weight: bold;
    padding-top: 4px;
  }

  .form-control {
    height: 29px;
    background: $white-light;
    font-family: $monospace_font;
  }

  .input-group-btn .btn {
    padding: 3px $gl-btn-padding;
    background-color: $gray-light;
    border: 1px solid $border-color;
  }

  .text-block {
    line-height: 0.8;
    padding-top: 9px;

    code {
      line-height: 1.8;
    }
  }

  @media(max-width: $screen-sm-min) {
    padding: 0 $gl-padding;

    .control-label,
    .text-block {
      padding-left: 0;
    }
  }
}

.fieldset-form fieldset {
  margin-bottom: 20px;
}

.form-control {
  @include box-shadow(none);
  border-radius: 2px;
  padding: $gl-vert-padding $gl-input-padding;
}

.select-wrapper {
  position: relative;

  .fa-caret-down {
    position: absolute;
    right: 10px;
    top: 10px;
    color: $gray-darkest;
    pointer-events: none;
  }
}

.select-control {
  padding-left: 10px;
  padding-right: 10px;
  -webkit-appearance: none;
}

.form-control-inline {
  display: inline;
}

.wiki-content {
  margin-top: 35px;
}

.form-group .control-label {
  font-weight: normal;
}

.form-control::-webkit-input-placeholder {
  color: $gl-placeholder-color;
}

.input-group {
  .select2-container {
    display: table-cell;
    width: 200px !important;
  }

  .input-group-addon {
    background-color: #f7f8fa;
  }

  .input-group-addon:not(:first-child):not(:last-child) {
    border-left: 0;
    border-right: 0;
  }
}

.help-block {
  margin-bottom: 0;
}

.gl-field-error {
  color: $red-normal;
}

.gl-show-field-errors {
  .gl-field-success-outline {
    border: 1px solid $green-normal;

    &:focus {
      box-shadow: 0 0 0 1px $green-normal inset, 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 4px 0 $green-normal;
      border: 0 none;
    }
  }

  .gl-field-error-outline {
    border: 1px solid $red-normal;

    &:focus {
      box-shadow: 0 0 0 1px $red-normal inset, 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 4px 0 rgba(210, 40, 82, 0.6);
      border: 0 none;
    }
  }

  .gl-field-success-message {
    color: $green-normal;
  }

  .gl-field-error-message {
    color: $red-normal;
  }

  .gl-field-hint {
    color: $gl-text-color;
  }
}
