@mixin next-button-size(
  $padding,
  $height,
  $font-size,
  $border-width,
  $corner,
  $icon-margin,
  $icon-size,
  $icon-split-size
) {
  border-radius: $corner;

  @include button-size($padding, $height, $font-size, $border-width);
  @if ($AT_THEME == 'teambition') {
    min-width: 38px + $padding * 2;
  }
  @if ($AT_THEME == 'apsara') {
    min-width: 30px + $padding * 2;
  }

  #{$btn-prefix}-children {
    display: inline-block;
  }
  // 针对firefox 的css hack
  @-moz-document url-prefix() {
    #{$btn-prefix}-children {
      margin-top: 1px;
    }
  }

  #{$btn-prefix}-children > #{$btn-prefix}-icon#{$btn-icon-prefix}-first {
    margin-right: $icon-margin;
  }
  #{$btn-prefix}-children > #{$btn-prefix}-icon#{$btn-icon-prefix}-last {
    margin-left: $icon-margin;
  }
}

/// 设置 iconbutton 外观颜色
///
/// @param {String} $color 字体色
/// @param {String} $color-hover 鼠标悬浮时的字体色
/// @param {String} $color-active 鼠标点击时的字体色
/// @param {String} $bg-color 背景色
/// @param {String} $bg-color-hover 鼠标悬浮时的背景色
/// @param {String} $bg-color-active 鼠标悬浮时的背景色
@mixin next-iconbutton-color(
  $color,
  $color-hover,
  $color-active,
  $bg-color: transparent,
  $bg-color-hover: transparent,
  $bg-color-active: transparent
) {
  background-color: $bg-color;

  &,
  &:link,
  &:visited,
  &.visited {
    color: $color;
  }

  &:focus,
  &:hover,
  &.hover {
    color: $color-hover;
    background-color: $bg-color-hover;
    text-decoration: none;
  }

  &:active,
  &.active {
    color: $color-active;
    background-color: $bg-color-active;
    text-decoration: none;
  }
}

@keyframes loadingCircle {
  0% {
    transform-origin: 50% 50%;
    transform: rotate(0deg);
  }
  100% {
    transform-origin: 50% 50%;
    transform: rotate(360deg);
  }
}
