.op-btn {
  background-color: transparent;
  &.op-btn-normal.op-btn-medium,
  &.op-btn-primary.op-btn-medium,
  &.op-btn-secondary.op-btn-medium,
  &.op-btn-error.op-btn-medium {
    min-width: 120px;
    border-radius: 8px;
    height: 64px;
    padding: 0 20px;
  }
}

.op-btn {
  &.op-btn-normal[disabled],
  &.op-btn-secondary[disabled],
  &.op-btn-error[disabled] {
    cursor: not-allowed;
    border: 1px solid #b8cfe6;
    box-shadow: none;
    .op-btn-helper,
    .op-btn-hotkey {
      color: #b8cfe6;
    }
    &:hover,
    &:active {
      cursor: not-allowed;
      border: 1px solid #b8cfe6;
      box-shadow: none;
      .op-btn-helper,
      .op-btn-hotkey {
        color: #b8cfe6;
      }
      svg path {
        fill: #b8cfe6;
      }
    }
    svg path {
      fill: #b8cfe6;
    }
  }
}

.op-btn {
  &.op-btn-normal.op-btn-small,
  &.op-btn-primary.op-btn-small,
  &.op-btn-secondary.op-btn-small,
  &.op-btn-error.op-btn-small {
    min-width: 120px;
    border-radius: 8px;
    height: 48px;
    padding: 0 20px;
  }
}

.op-btn {
  padding: 0;
  white-space: nowrap;
  cursor: pointer;
  & + .op-btn {
    margin-left: 12px;
  }
  &:focus {
    outline: none;
  }
  &.op-btn-fullWidth {
    width: 100%;
  }
  &.op-btn-normal {
    border: 1px solid #143666;
    background-color: transparent;
    .op-btn-helper,
    .op-btn-hotkey {
      color: #143666;
    }
    &:hover {
      border: 1px solid #435e85;
      box-shadow: 0 4px 6px -2px rgba(67, 94, 133, 0.2);
      .op-btn-helper,
      .op-btn-hotkey {
        color: #435e85;
      }
      svg path {
        fill: #435e85;
      }
    }
    &:active {
      border: 1px solid #102b52;
      box-shadow: none;
      .op-btn-helper,
      .op-btn-hotkey {
        color: #102b52;
      }
      svg path {
        fill: #102b52;
      }
    }
    svg path {
      fill: #143666;
    }
  }
  &.op-btn-primary {
    border: none;
    background: #196ee6;
    .op-btn-helper,
    .op-btn-hotkey {
      color: #ffffff;
    }
    &:hover {
      background: #478beb;
      box-shadow: 0 4px 6px -2px rgba(71, 139, 235, 0.5);
    }
    &:active {
      background: #1458b8;
      box-shadow: none;
    }
    &[disabled] {
      cursor: not-allowed;
      background: #b8cfe6;
      box-shadow: none;
      &:hover,
      &:active {
        cursor: not-allowed;
        background: #b8cfe6;
        box-shadow: none;
      }
    }
    svg path {
      fill: #fff;
    }
  }
  &.op-btn-secondary {
    border: 1px solid #1461cc;
    background-color: transparent;
    .op-btn-helper,
    .op-btn-hotkey {
      color: #196ee6;
    }
    &:hover {
      border: 1px solid #478beb;
      box-shadow: 0 4px 6px -2px rgba(71, 139, 235, 0.15);
      .op-btn-helper,
      .op-btn-hotkey {
        color: #478beb;
      }
      svg path {
        fill: #478beb;
      }
    }
    &:active {
      border: 1px solid #1458b8;
      box-shadow: none;
      .op-btn-helper,
      .op-btn-hotkey {
        color: #1458b8;
      }
      svg path {
        fill: #1458b8;
      }
    }

    svg path {
      fill: #196ee6;
    }
  }
  &.op-btn-error {
    border: 1px solid #fe3824;
    background-color: transparent;
    .op-btn-helper,
    .op-btn-hotkey {
      color: #fe3824;
    }
    &:hover {
      border: 1px solid #ff7b70;
      box-shadow: 0 4px 6px -2px rgba(255, 123, 112, 0.25);
      .op-btn-helper,
      .op-btn-hotkey {
        color: #ff7b70;
      }
      svg path {
        fill: #ff7b70;
      }
    }
    &:active {
      border: 1px solid #d93e36;
      box-shadow: none;
      .op-btn-helper,
      .op-btn-hotkey {
        color: #d93e36;
      }
      svg path {
        fill: #d93e36;
      }
    }
    svg path {
      fill: #fe3824;
    }
  }
  &.op-btn-text,
  &.op-btn-link {
    border: none;
    .op-btn-helper,
    .op-btn-hotkey {
      line-height: 24px;
      font-size: 20px;
      color: #196ee6;
    }
    &:hover {
      .op-btn-helper,
      .op-btn-hotkey {
        color: #478beb;
      }
    }
    &:active {
      .op-btn-helper,
      .op-btn-hotkey {
        color: #1458b8;
      }
    }
    &[disabled] {
      cursor: not-allowed;
      .op-btn-helper,
      .op-btn-hotkey {
        color: #b8cfe6;
      }
      &:hover,
      &:active {
        cursor: not-allowed;
      }
      svg path {
        fill: #b8cfe6;
      }
    }
  }

  &.op-btn-link {
    font-family: AlibabaPuHuiTiM;
    font-size: 20px;
    color: #196ee6;
    height: 24px;
    white-space: nowrap;
    border-bottom: 2px solid #196ee6;
    &:hover {
      border-bottom: 2px solid #478beb;
      .op-btn-helper,
      .op-btn-hotkey {
        color: #478beb;
      }
    }
    &:active {
      border-bottom: 2px solid #1458b8;
      .op-btn-helper,
      .op-btn-hotkey {
        color: #1458b8;
      }
    }
    &[disabled] {
      border-bottom: 2px solid #b8cfe6;
    }
  }
  .op-btn-helper {
    display: inline-block;
    font-size: 24px;
    font-family: AlibabaPuHuiTiM;
    letter-spacing: 0;
  }
  .op-btn-hotkey {
    display: inline-block;
    font-family: AlibabaPuHuiTi-Regular;
    font-size: 20px;
    margin-left: 4px;
    letter-spacing: 0;
  }
  &.op-btn-loading {
    svg {
      width: 20px;
      animation: loadingCircle 1s infinite linear;
      margin-right: 12px;
      vertical-align: middle;
    }
  }
}

@keyframes loadingCircle {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
