.btn {
  border: 0;
  border-radius: 0;
  transition: all 0.2s;
  margin: 0.15em;
  .button-size(@padding-small-vertical; @padding-small-horizontal * 2; @font-size-small; @line-height-small; 0px);
}

.button-variant(@color; @background:transparent; @border:@background) {
  color: @color;
  background: @background;
  &:hover,
  &:focus,
  &:active,
  &.active,
  .open .dropdown-toggle& {
    background: lighten(@background, 7%);
  }
  &.disabled,
  &[disabled],
  fieldset[disabled] & {
    &,
    &:hover,
    &:focus,
    &:active,
    &.active {
      color: lighten(@color, 10%);
      background: desaturate(@background, 15%);
    }
  }
}

.btn-link:before {
  border-color: transparent;
  &:hover,
  &:focus,
  &:active {
    border-color: @btn-primary-border;
  }
}

.btn-lg {
  // line-height: ensure even-numbered height of button next to large input
  .button-size(@padding-large-vertical; @padding-large-horizontal * 3; @font-size-large; @line-height-large; 0px);
}

.btn-sm,
.btn-xs {
  // line-height: ensure proper height of button next to small input
  .button-size(@padding-small-vertical; @padding-small-horizontal * 1.5; @font-size-small; @line-height-small; 0px);
}

.btn-xs {
  padding: 1px 5px;
}

.btn-transparent {
  border: none;
  outline: none;
  background: transparent;
}
