.input-group-btn, .input-group-addon {
  @extend .input-group-append;
}

.form-control-static {
  @extend .form-control-plaintext;
  background-color: $input-disabled-bg;
  @if $enable-rounded {
    // Manually use the if/else instead of the mixin to account for iOS override
    border-radius: $input-border-radius;
  } @else {
    // Otherwise undo the iOS default
    border-radius: 0;
  }
  padding: $input-padding-y $input-padding-x;
  overflow: auto;
}

.input-sm {
  @extend .form-control-sm;
}

.input-lg {
  @extend .form-control-lg;
}

//
.control-label, .form-label {
  color: $gray-800;
  font-weight: $font-weight-semibold;
}

// Custom input file type
.btn-file-input input[type=file] {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  padding: 0;
  height: 100%;
  cursor: pointer;
  opacity: 0;
  filter: alpha(opacity=0);
}

// Input group
//
.input-group-icon {
  @extend .input-group-text;
}

.form-control {
  &:disabled,
  &[readonly] {
    border-color: $gray-300;
  }
}

// Widget
//
.form-widget {
  > div > .form-fields {
    margin-bottom: 0;
  }

  > div:not(:first-child) {
    margin-top: 0;
  }
}

.form-fields {
  @extend .row, .gy-2, .gx-3;

  .form-group {
    &:empty {
      display: none;
    }
  }

  > .span-left,
  > .span-right {
    @extend .col-lg-6;

    &.flex-width {
      @extend .col-lg-3;
    }
  }
}

.hidden-field {
  margin: 0;
}

// Tabs
//
.form-nav {
  &.nav-tabs {
    padding: $form-nav-padding;

    .nav-link {
      border: 0 none;
      font-weight: $font-weight-bold;
      padding: $form-nav-link-padding-y $form-nav-link-padding-x;
    }

    .nav-link:hover,
    .nav-link:focus {
      background-color: $dropdown-link-hover-bg;
      border-radius: $input-border-radius;
    }

    .nav-link.active {
      background-color: transparent;
      color: $primary;
    }
  }
}

@include media-breakpoint-down(sm) {
  .form-widget .tab-heading {
    background-color: $gray-300;
    width: 100%;
    overflow-x: auto;
    display: block;
  }
  .form-nav {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;

    &.nav-tabs {
      .nav-link {
        white-space: nowrap
      }
    }
  }
}

// Field Section
.field-section {
  .section-title {
    color: $text-muted;
    margin-top: 15px;
    margin-bottom: 0;
  }
}

.field-custom-container {
  padding-top: $input-padding-y;
  padding-bottom: $input-padding-y;
  height: add($input-height-inner, 0.25rem);
}

// Control label
.help-block {
  @extend .form-text;
  color: $gray-600;
  margin: 0;

  &.before-field {
    margin-bottom: 10px;
  }
}

.control-colorpicker {
  .form-control-color {
    height: calc(#{$input-height} - 13px);

    &::-webkit-color-swatch {
      border: 0 none;
    }
  }
}

.daterangepicker td.active,
.daterangepicker td.active:hover,
.daterangepicker .ranges li.active {
  background-color: $primary;
}
