@import '../common/style/var.less';
@import '../common/style/theme.less';
@import './host.less';

:host {
  .van-goods-action-button-host()
}

.van-goods-action-button {
  flex: 1;
  .theme(
    --button-warning-background-color,
    '@goods-action-button-warning-color'
  );
  .theme(--button-danger-background-color, '@goods-action-button-danger-color');
  .theme(--button-default-height, '@goods-action-button-height');
  .theme(--button-line-height, '@goods-action-button-line-height');
  .theme(--button-plain-background-color, '@goods-action-button-plain-color');

  --button-border-width: 0;

  &--first {
    margin-left: 5px;
    // #ifdef MP-WEIXIN
    button {
      width: calc(100% - 5px);
    }
    // #endif
    .theme(
      --button-border-radius,
      '@goods-action-button-border-radius 0 0 @goods-action-button-border-radius'
    );
  }

  &--last {
    margin-right: 5px;
    // #ifdef MP-WEIXIN
    button {
      width: calc(100% - 5px);
    }
    // #endif
    .theme(
      --button-border-radius,
      '0 @goods-action-button-border-radius @goods-action-button-border-radius 0'
    );
  }

  &--first&--last {
    .theme(--button-border-radius, '@goods-action-button-border-radius');
  }

  &--plain {
    --button-border-width: @button-border-width;
  }

  &__inner {
    width: 100%;
    .theme(font-weight, '@font-weight-bold') !important;
  }

  @media (max-width: 321px) {
    font-size: 13px;
  }
}
