@import './theme/default';
@import './theme/font';

.zent-split-button {
  display: inline-block;

  & + .zent-split-button {
    margin-left: 10px;
  }

  &__main {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;

    &.zent-btn-loading {
      &:hover,
      &:active {
        z-index: 0;
      }
    }

    &.zent-btn-primary {
      @include theme-color(border-right-color, primary, 6);
    }

    &.zent-btn-danger {
      @include theme-color(border-right-color, error, 4);
    }

    &.zent-btn-success {
      @include theme-color(border-right-color, success, 4);
    }

    &.zent-btn-disabled {
      @include theme-color(border-right-color, stroke, 6);
    }
  }

  &__main,
  &__dropdown-wrapper {
    position: relative;
    z-index: 1;

    &:hover {
      z-index: 2;
    }
  }

  &__dropdown-wrapper {
    margin-left: -1px;
  }

  &__dropdown {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 0 4px;

    &-icon {
      font-size: $font-size-large;
    }

    &.zent-btn-primary {
      @include theme-color(border-left-color, primary, 6);
    }

    &.zent-btn-danger {
      @include theme-color(border-left-color, error, 4);
    }

    &.zent-btn-success {
      @include theme-color(border-left-color, success, 4);
    }

    &.zent-btn-disabled {
      @include theme-color(border-left-color, stroke, 6);
    }

    &-disabled {
      cursor: not-allowed;
    }
  }
}
