@import "../style/var";

.fe-button {
  position: relative;
  padding: 0;
  margin: 0;
  display: inline-block;
  height: @button-default-height;
  line-height: @button-default-height;
  border-radius: @button-default-border-radius;
  box-sizing: border-box;
  font-size: @font-size-lg;
  // width: 100%;
  text-align: center;
  -webkit-appearance: none;
  -webkit-text-size-adjust: 100%;
  outline: none;
  user-select: none;
  // & + .fe-button {
  // margin-top: 15px;
  // }

  &::before {
    content: " ";
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 0;
    width: 100%;
    height: 100%;
    border: inherit;
    border-color: @black;
    background-color: @black;
    border-radius: inherit; /* inherit parent's border radius */
    transform: translate(-50%, -50%);
  }

  &:active::before {
    opacity: 0.15;
  }

  &-noBorder {
    border: 0 none !important;
  }

  &-loading,
  &-disabled {
    &::before {
      display: none;
    }
  }

  &-icon + &-text,
  &-loading + &-text {
    display: inline-block;
    vertical-align: top;
  }

  &-loading {
    display: inline-block;
    vertical-align: top;
  }

  &-block {
    display: block;
    width: 100%;
  }

  &-large {
    width: 100%;
    height: 50px;
    line-height: 48px;
  }

  &-normal {
    padding: 0 15px;
    font-size: 14px;
  }

  &-default {
    color: @button-default-color;
    background-color: @button-default-background-color;
    border: 1px solid @button-default-border-color;
  }

  &-primary {
    color: @button-primary-color;
    background-color: @button-primary-background-color;
    border: 1px solid @button-primary-border-color;
  }

  &-danger {
    color: @button-danger-color;
    background-color: @button-danger-background-color;
    border: 1px solid @button-danger-border-color;
  }

  &-warn {
    color: @button-warning-color;
    background-color: @button-warning-background-color;
    border: 1px solid @button-warning-border-color;
  }

  &-plain {
    // background-color: @white;
    &-default {
      // background-color: @white;
      // background-color: @button-default-background-color;
      background-color: transparent;
      border: 1px solid @button-default-border-color;
    }

    &-primary {
      // background-color: @white;
      background-color: transparent;
      color: @button-primary-background-color;
      border: 1px solid @button-primary-border-color;
    }

    &-warn {
      // background-color: @white;
      background-color: transparent;
      color: @button-warning-background-color;
      border: 1px solid @button-warning-border-color;
    }

    &-danger {
      // background-color: @white;
      background-color: transparent;
      color: @button-danger-background-color;
      border: 1px solid @button-danger-border-color;
    }

    &.fe-button-danger {
      color: @button-danger-background-color;
    }

    &.fe-button-warning {
      color: @button-warning-background-color;
    }
  }

  &-mini {
    display: inline-block;
    min-width: 50px;
    height: 22px;
    font-size: 10px;
    line-height: 20px;

    & + .fe-button-mini {
      margin-right: 5px;
    }
  }

  &-small {
    min-width: 60px;
    height: 30px;
    padding: 0 8px;
    font-size: 12px;
    line-height: 28px;

    & + .fe-button-small {
      margin-right: 5px;
    }
  }

  &-bottom-action {
    width: 100%;
    height: 50px;
    line-height: 50px;
    border: 0;
    border-radius: 0;
    font-size: @font-size-lg;
    color: @button-bottom-action-default-color;
    background-color: @button-bottom-action-default-background-color;

    &.fe-button-primary {
      background-color: @button-bottom-action-primary-background-color;
    }
  }

  &-disabled {
    opacity: 0.5;
  }

  &-round {
    border-radius: 10em;
  }

  &-square {
    border-radius: 0;
  }
}
