.btn {
  display: inline-block;
  margin-bottom: 0;
  font-weight: normal;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  background-image: none;
  border: $btn-border;
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 18px;
  border-radius: 4px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;
  color: #444444;
  background-color: #fff;
  text-shadow: none;

  &.hover,
  &:hover {
    color: #444444;
    text-decoration: none;
    background-color: #ebebeb;
    border-color: #adadad;
  }

  &.focus,
  &:focus {
    color: #444444;
    text-decoration: none;
    outline: thin dotted #333;
    outline: 5px auto -webkit-focus-ring-color;
    outline-offset: -2px;
  }

  &.active,
  &:active {
    outline: 0;
    background-image: none;
    -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  }

  &.disabled,
  &[disabled] {
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.65;
    filter: alpha(opacity=65);
    -webkit-box-shadow: none;
    box-shadow: none;
  }

  &.btn-primary {
    color: #ffffff;
    background-color: $bg_primary;
    border-color: $border_primary;

    &.hover,
    &:hover,
    &.disabled,
    &[disabled] {
      color: #ffffff;
    }
  }

  &.btn-success {
    color: #ffffff;
    background-color: $bg_success;
    border-color: $border_success;


    &.hover,
    &:hover,
    &.disabled,
    &[disabled] {
      color: #ffffff;
    }
  }

  &.btn-danger {
    color: #ffffff;
    background-color: $bg_danger;
    border-color: $border_danger;


    &.hover,
    &:hover,
    &.disabled,
    &[disabled] {
      color: #ffffff;
    }
  }

  &.btn-warning {
    color: #ffffff;
    background-color: $bg_warning;
    border-color: $border_warning;


    &.hover,
    &:hover,
    &.disabled,
    &[disabled] {
      color: #ffffff;
    }
  }

  &.btn-new {
    @extend .btn-success;
  }

  &.btn-create {
    @extend .wide;
    @extend .btn-success;
  }

  &.btn-save {
    @extend .wide;
    @extend .btn-primary;
  }

  &.btn-remove {
    @extend .btn-danger;
  }

  &.btn-cancel {
    float: right;
  }

  &.wide {
    padding-left: 20px;
    padding-right: 20px;
  }

  &.btn-small {
    padding: 2px 10px;
    font-size: 12px;
  }

  &.btn-tiny {
    font-size: 11px;
    padding: 2px 6px;
    line-height: 16px;
    margin: 2px;
  }

  &.btn-close {
    color: $bg_danger;
    border-color: $border_danger;
    &:hover {
      color: #B94A48;
    }
  }

  &.btn-reopen {
    color: $bg_success;
    border-color: $border_success;
    &:hover {
      color: #468847;
    }
  }

  &.btn-grouped {
    margin-right: 7px;
    float: left;
    &:last-child {
      margin-right: 0px;
    }
  }
}

.btn-block {
  width: 100%;
  margin: 0;
  margin-bottom: 15px;
  &.btn {
    padding: 6px 0;
  }
}

.btn-group {
  &.btn-grouped {
    margin-right: 7px;
    float: left;
    &:last-child {
      margin-right: 0px;
    }
  }
}

.btn-group-small > .btn { @extend .btn.btn-small; }
.btn-group-tiny > .btn { @extend .btn.btn-tiny; }
