.btn-group {
  > .btn:not(:last-child):not(.dropdown-toggle),
  > .btn-group:not(:last-child) > .btn {
    @include border-end-radius($btn-border-radius);
  }

  > .btn:not(:first-child),
  > .btn-group:not(:first-child) > .btn {
    @include border-start-radius($btn-border-radius);
  }
}
.btn-group,
.btn-group-vertical {
  > .btn {
    position: relative;
    flex: 1 1 auto;

    &:hover {
      z-index: 0;
    }

    &:focus,
    &:active,
    &.active {
      z-index: 0;
    }
  }

  .btn + .btn {
    margin-left: $btn-spacer;
  }
}
.btn-group-toggle {
  padding: calc(#{$input-padding-y-lg} - 4px) calc(#{$input-padding-x-lg} - 10px);
  background-color: $input-bg;
  border: $input-border-width solid $input-border-color;
  border-radius: $input-border-radius;

  > .btn {
    padding-top: calc(#{$input-padding-y-lg} - 5px);
    padding-bottom: calc(#{$input-padding-y-lg} - 5px);
    border-radius: $input-border-radius !important;
    font-size: $input-font-size;
    box-shadow: none;
    border: 1px solid transparent;
    color: inherit !important;

    &:disabled,
    &.disabled {
      background-color: transparent;
    }
  }

  > .btn-check:focus + .btn,
  > .btn:focus {
    box-shadow: none;
  }

  > .btn-check:checked + .btn,
  > .btn-check:active + .btn,
  > .btn:active,
  > .btn.active {
    background-color: $gray-200 !important;
    border-color: $input-border-color !important;

    &:focus {
      box-shadow: none;
    }
  }

  > .btn-group:not(:first-child) > .btn,
  > .btn:nth-child(n+3),
  > :not(.btn-check) + .btn {
    margin-left: 5px;
  }
}
