// shared styles
.btn,
.btn-flat {
  box-sizing: content-box;
  border: $button-border;
  border-radius: $button-radius;
  display: inline-block;
  font-size: $button-font-size;
  height: $button-height;
  line-height: $button-height;
  outline: 0;
  padding: $button-padding;
  text-transform: uppercase;
  vertical-align: middle;
  // Gets rid of tap active state
  -webkit-tap-highlight-color: transparent;
}

// Disabled shared style
.btn.disabled,
.btn-floating.disabled,
.btn-large.disabled,
.btn:disabled
.btn-large:disabled,
.btn-floating:disabled {
  background-color: $button-disabled-background !important;
  box-shadow: none;
  color: $button-disabled-color !important;
  cursor: default;

  * {
    pointer-events: none;
  }

  &:hover {
    background-color: $button-disabled-background !important;
    color: $button-disabled-color !important;
  }
}

// Shared icon styles
.btn,
.btn-floating,
.btn-large,
.btn-flat {
  i {
    font-size: $button-font-size;
    line-height: inherit;
  }
}

// Raised Button
.btn {
  text-decoration: none;
  color: $button-raised-color;
  background-color: $button-raised-background;
  text-align: center;
  letter-spacing: .5px;
  @extend .z-depth-1;
  transition: .2s ease-out;
  cursor: pointer;

  &:hover {
    background-color: $button-raised-background-hover;
    @extend .z-depth-1-half;
  }
}

// Floating button
.btn-floating {
  display: inline-block;
  color: $button-floating-color;
  position: relative;
  overflow: hidden;
  z-index: 1;
  width: $button-floating-size;
  height: $button-floating-size;
  line-height: $button-floating-size;
  padding: 0;
  background-color: $button-floating-background;
  border-radius: $button-floating-radius;
  @extend .z-depth-1;
  transition: .3s;
  cursor: pointer;
  vertical-align: middle;

  i {
    width: inherit;
    display: inline-block;
    text-align: center;
    color: $button-floating-color;
    font-size: $button-large-icon-font-size;
    line-height: $button-floating-size;
  }

  &:hover {
    background-color: $button-floating-background-hover;
    @extend .z-depth-1-half;
  }

  &:before {
    border-radius: 0;
  }

  &.btn-large {
    width: $button-floating-large-size;
    height: $button-floating-large-size;
    i {
      line-height: $button-floating-large-size;
    }
  }
}

// button fix
button.btn-floating {
  border: $button-border;
}

// Fixed Action Button
.fixed-action-btn {
  &.active {
    ul {
     visibility: visible;
    }
  }

  &.horizontal {
    padding: 0 0 0 15px;

    ul {
      text-align: right;
      right: 64px;
      top: 50%;
      transform: translateY(-50%);
      height: 100%;
      left: auto;
      width: 500px; /*width 100% only goes to width of button container */

      li {
        display: inline-block;
        margin: 15px 15px 0 0;
      }
    }
  }

  position: fixed;
  right: 23px;
  bottom: 23px;
  padding-top: 15px;
  margin-bottom: 0;
  z-index: 998;

  ul {
    left: 0;
    right: 0;
    text-align: center;
    position: absolute;
    bottom: 64px;
    margin: 0;
    visibility: hidden;

    li {
      margin-bottom: 15px;
    }

    a.btn-floating {
      opacity: 0;
    }
  }
}

// Flat button
.btn-flat {
  box-shadow: none;
  background-color: transparent;
  color: $button-flat-color;
  cursor: pointer;

  &.disabled {
    color: $button-flat-disabled-color;
    cursor: default;
  }
}

// Large button
.btn-large {
  @extend .btn;
  height: $button-large-height;
  line-height: $button-large-height;

  i {
    font-size: $button-large-icon-font-size;
  }
}

// Block button
.btn-block {
  display: block;
}
