.btn {
  border: 0;
  color: #fff;
  font-weight: $fw-semi;
  background: $primary;
  position: relative;
  overflow: hidden;
  display: inline-block;
  @include border-radius(100px);
  @include transition(background .3s ease, color .3s ease, border .3s ease, transform .3s ease);
  @include box-shadow(none!important);

  @include rem(font-size, 18px);
  @include rem(padding, 13px 28px 12px);

  &:not([disabled]) {
    &:hover {
      color: #fff;
      background: darken($primary, 4%);
    }

    &:focus, &:active {
      color: #fff;
    }

    &:active, &.active {
      background: darken($primary, 4%);
      @include transform(scale(0.98));
    }
  }

  &[disabled] {
    background: #EBEDEF !important;
    color: rgba($secondary, .3) !important;
    opacity: 1;
  }

  &--gradient {
    /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#ff9100+0,ff0029+50,ab00ff+100 */
    background: $primary !important; /* Old browsers */
    background: -moz-linear-gradient(left,  #ff9100 0%, #ff0029 50%, #ab00ff 100%)!important; /* FF3.6-15 */
    background: -webkit-linear-gradient(left,  #ff9100 0%,#ff0029 50%,#ab00ff 100%)!important; /* Chrome10-25,Safari5.1-6 */
    background: linear-gradient(to right,  #ff9100 0%,#ff0029 50%,#ab00ff 100%)!important; /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff9100', endColorstr='#ab00ff',GradientType=1 )!important; /* IE6-9 */
  }

  &--icon {
    color: #8C94A0;
    background: transparent !important;
    line-height: normal;
    border-radius: 0;

    @include rem(padding, 4px);

    &:hover, &:active, &:focus {
      color: $secondary !important;
    }

    .icon {
      margin-right: 0;

      @include rem(font-size, 20px);
    }
  }

  &--link {
    padding: 0 !important;
    background: transparent !important;
    color: inherit;
    font-weight: normal;

    &:hover, &:active, &:focus {
      color: inherit !important;
    }
  }

  &--stroke {
    background: transparent;
    box-shadow: inset 0 0 0 2px $primary !important;
    color: $primary !important;
    font-weight: $fw-semi;

    @include border-radius(200px);

    .header & {
      font-size: 16px;
      padding: 7px 25px;
    }

    &:hover {
      background: $primary;
      color: #fff !important;
    }

    &[disabled], &[disabled]:hover {
      background: transparent !important;
      color: rgba($secondary, .3) !important;
      box-shadow: inset 0 0 0 2px rgba($secondary, .3) !important;
    }
  }

  &--flat {
    background: transparent !important;
    color: $primary !important;

    &[disabled] {
      background-color: transparent !important;
    }
  }

  &--go {
    margin: 60px 0 40px;
  }

  &--default {
    border: 1px solid #e1e1e1;
    background: transparent;
    color: $secondary !important;
    font-weight: normal;

    @include rem(font-size, 16px);
    @include rem(padding, 13px 21px);

    &:after {
      display: none;
    }

    &:hover {
      border-color: #B3B7BA;
      color: $secondary !important;
      background: transparent !important;
      @include transform(none !important);
    }

    &[disabled] {
      border-color: #e1e1e1;
      background: #EBEDEF !important;
      color: rgba($secondary, .3) !important;
      opacity: 1;
    }
  }

  &--red {
    background: #FF3E2E;

    &:not([disabled]):hover {
      background: #dd1500;
    }

    &:after {
      display: none;
    }
  }

  &--green {
    background: #13B72A;

    &:not([disabled]):hover {
      background: #009907;
    }

    &:after {
      display: none;
    }
  }

  &--delete {
    background: transparent !important;
  }

  &.btn-lg {
    @include rem(padding, 16px 40px);
    @include rem(font-size, 20px);
  }

  &.btn-sm {
    @include rem(padding, 8px 22px);
    @include rem(font-size, 16px);
  }

  &.btn-xs {
    @include rem(padding, 6px 24px);
    @include rem(font-size, 16px);
  }
}

.btn-circle,
.btn--circle {
  border-radius: 100px;
  text-align: center;
  text-transform: uppercase;
  font-weight: $fw-regular;

  @include rem(height, 50px);
  @include rem(min-width, 50px);
  @include rem(padding, 10px 15px);
  @include rem(font-size, 18px);
  @include rem(line-height, 24px);

  &:after {
    display: none;
  }

  .page_nav & {
    margin-top: 0;
  }

  .icon {
    margin-right: 0;

    + span {
      margin-left: 10px;
    }
  }
}

.new-project-button {
  color: #fff !important;
  background: $primary;

  @include rem(font-size, 40px);
  @include rem(line-height, 34px);

  &:hover, &:focus {
    background: #9217e2 !important;
  }

  span {
    color: #fff;
    letter-spacing: 0;
    text-transform: none;
    font-weight: $fw-semi;
    display: inline-block;
    vertical-align: top;
    position: relative;
    top: -2px;

    @include rem(font-size, 18px);
    @include rem(margin-right, 12px);
  }

  &.btn-sm {
    width: 30px;
    height: 30px;
    font-size: 34px;
    padding: 6px;
    min-width: 0;
    line-height: 20px;
  }

  &.with_text {
    font-size: 34px;
  }

  .nav & {
    position: relative;
    top: -1px;
    left: -8px;
  }
}

.btn-group {
  font-size: 0;
  display: table;
  width: 100%;
  white-space: nowrap;
  margin-bottom: 40px;

  .btn {
    background: transparent;
    border: 1px solid #D3D6DB;
    border-radius: 0;
    margin-left: -1px;
    padding: 7px 21px;
    font-size: 16px;
    color: rgba(#3F4D60, .8) !important;
    letter-spacing: 0px;
    line-height: 24px;
    display: table-cell;
    vertical-align: top;

    + .btn {
      border-left: 0;
    }

    .icon {
      font-size: 16px;
      color: rgb(138,150,161);

      .path1:before, .path2:before, .path3:before {
        color: rgb(138,150,161);
      }
    }

    &:after {
      display: none;
    }


    &:active {
      border-color: #D3D6DB;
      background: rgba(#D3D6DB, .2);
      @include transform(none);
    }

    &:hover {
      @include scale(1);
      background: rgba(#D3D6DB, .2);
    }

    &:first-child {
      border-radius: 50px 0 0 50px;
    }

    &:last-child {
      border-radius: 0 50px 50px 0;
      padding: 7px 18px;
    }
  }
}

.btn_loading {
  overflow: hidden;
  pointer-events: none;
  cursor: default;
  background-color: #EBEDEF !important;

  &:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background-color: #EBEDEF;
  }

  &:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    margin: -12px auto 0;
    width: 24px;
    height: 24px;
    border-radius: 100px;
    border: 3px solid rgba(63, 77, 96, 0.3);
    border-top-color: transparent;
    animation: spin .5s linear infinite;
  }
}