@import "../import.less";
.mu-button {
  display: inline-block;
  overflow: hidden;
  position: relative;
  transition-duration: 300ms;
  transition-timing-function: @easeOutFunction;
  text-decoration: none;
  text-align: center;
  border: none;
  appearance: none;
  outline: none;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  cursor: pointer;
  .flex-shrink(0);
  .mu-icon-left {
    margin-right: 8px;
  }
  .mu-icon-right {
    margin-left: 8px;
  }
  &.hover::before{
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: currentColor;
    opacity: .12;
  }
}

.mu-button-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.mu-raised-button {
  font-size: 14px;
  min-width: 88px;
  height: 36px;
  line-height: 36px;
  border-radius: 2px;
  background-color: @dialogBackgroundColor;
  color: @textColor;
  .depth(2);
  &.mu-inverse {
    .mu-circle-ripple {
      opacity: 0.3;
    }
  }
  &.disabled{
    color: fade(@textColor, 30%);
    cursor: not-allowed;
    background-color: darken(@alternateTextColor, 10%);
    .depth(0);
    &.hover,
    &:active,
    &:hover {
      box-shadow: none;
    }
  }
  &.focus {
    .depth(6);
  }
  &:active {
    .depth(8);
  }

  .mu-button-wrapper {
    padding: 0 16px;
  }

  &.mu-button-round {
    border-radius: 36px;
  }
  &.mu-button-full-width {
    width: 100%;
  }
  &.mu-button-small {
    font-size: 13px;
    height: 28px;
    &.mu-button-round {
      border-radius: 28px;
    }
    .mu-button-wrapper {
      padding: 0 8px;
    }
    .mu-icon {
      font-size: 20px;
    }
  }
  &.mu-button-large {
    font-size: 15px;
    height: 44px;
    &.mu-button-round {
      border-radius: 44px;
    }
    .mu-button-wrapper {
      padding: 0 32px;
    }
    .mu-icon {
      font-size: 28px;
    }
  }
}

.mu-flat-button {
  border-radius: 2px;
  height: 36px;
  line-height: 36px;
  min-width: 88px;
  font-size: 14px;
  color: @textColor;
  background: transparent;
  &.disabled{
    color: @disabledColor;
    cursor: not-allowed;
    background: none;
  }
  .mu-button-wrapper {
    padding: 0 16px;
  }

  &.mu-button-small {
    font-size: 13px;
    height: 28px;
    .mu-button-wrapper {
      padding: 0 8px;
    }
    .mu-icon {
      font-size: 20px;
    }
  }
  &.mu-button-large {
    font-size: 15px;
    height: 44px;
    .mu-button-wrapper {
      padding: 0 32px;
    }
    .mu-icon {
      font-size: 28px;
    }
  }
}

.mu-icon-button {
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 24px;
  padding: 12px;
  border: none;
  appearance: none;
  background: none;
  color: inherit;
  background-color: transparent;
  &.disabled{
    color: @disabledColor;
    cursor: not-allowed;
  }
  &.mu-button-small {
    width: 32px;
    height: 32px;
    .mu-icon {
      font-size: 20px;
    }
  }
  &.mu-button-large {
    width: 56px;
    height: 56px;
    .mu-icon {
      font-size: 28px;
    }
  }
}

.mu-fab-button {
  line-height: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  appearance: none;
  background-color: @primaryColor;
  color: @alternateTextColor;
  .depth(6);
  &.hover,
  &:active{
    .depth(12);
  }

  &.disabled{
    color: fade(@textColor, 30%);
    cursor: not-allowed;
    background-color: darken(@alternateTextColor, 10%);
    box-shadow: none;
    &.hover,
    &:active,
    &:hover {
      box-shadow: none;
    }
  }
  .mu-circle-ripple{
    opacity: .3;
  }

  &.mu-button-small {
    width: 40px;
    height: 40px;
    .mu-icon {
      font-size: 18px;
    }
  }
  &.mu-button-large {
    width: 72px;
    height: 72px;
    .mu-icon {
      font-size: 30px;
    }
  }
}
