@import "ui-variables";

.btn {
  color: @text-color;
  border-radius: @component-border-radius;
  border: none;
  text-shadow: none;

  height: @component-line-height + 2px;
  line-height: @component-line-height;

  padding: 0 @component-padding;
  font-size: @font-size;
  z-index: 0;

  background-color: @button-background-color;
  &:hover {
    background-color: @button-background-color-hover;
  }
  &.selected,
  &.selected:hover {
    // we want the selected button to behave like the :hover button; it's on top of the other buttons.
    z-index: 1;
    background-color: @button-background-color-selected;
  }
}

.btn.btn-xs,
.btn-group-xs > .btn {
  padding: @component-padding/4 @component-padding/2;
  font-size: @font-size - 2px;
  height: auto;
  line-height: 1.3em;
}
.btn.btn-sm,
.btn-group-sm > .btn {
  padding: @component-padding/4 @component-padding/2;
  height: auto;
  line-height: 1.3em;
}
.btn.btn-lg,
.btn-group-lg > .btn {
  font-size: @font-size + 2px;
  padding: @component-padding - 2px  @component-padding + 2px;
  height: auto;
  line-height: 1.3em;
}

.btn-group > .btn {
  border-left: 1px solid @button-border-color;
  border-right: 1px solid @button-border-color;
}
.btn-group > .btn:first-child {
  border-left: none;
  border-top-left-radius: @component-border-radius;
  border-bottom-left-radius: @component-border-radius;
}
.btn-group > .btn:last-child,
.btn-group > .btn.selected:last-child,
.btn-group > .dropdown-toggle {
  border-right: none;
  border-top-right-radius: @component-border-radius;
  border-bottom-right-radius: @component-border-radius;
}

.btn-toolbar {
  > .btn-group + .btn-group, > .btn-group + .btn, > .btn + .btn {
    float: none;
    display: inline-block;
    margin-left: 0;
  }
  > * {
    margin-right: @component-padding / 2;
  }
  > *:last-child {
    margin-right: 0;
  }
}
