@import './mixins/mixins.scss';
@import './theme/default.scss';

@include b(button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1.5px $button-default-border-color;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  text-align: center;
  .n-button__icon {
    margin-right: 2px;
    &.n-button__icon--right {
      margin-right: 0px;
      margin-left: 4px;
    }
  }
  .n-button__content {
    white-space: nowrap;
  }
  border-radius: $button-border-radius;
  &.n-button--disabled {
    cursor: not-allowed;
    opacity: .43;
  }
  &.n-button--tiny-size {
    font-size: $button-tiny-font-size;
    height: $tiny-height;
    padding: 0 14px;
    &.is-round {
      border-radius: $tiny-height / 2;
    }
    .n-button__content {
      line-height: $tiny-height;
    }
    .n-button__icon {
      height: 16px;
      width: 16px;
      .n-icon {
        font-size: 16px;
        display: block;
      }
    }
    .n-button__icon--slot {
      height: 14px;
      width: 14px;
      line-height: 14px;
      .n-icon-slot {
        height: 14px;
        width: 14px;
        font-size: 14px;
      }
    }
  }
  &.n-button--small-size {
    font-size: $button-small-font-size;
    height: $small-height;
    padding: 0 18px;
    &.is-round {
      border-radius: $small-height / 2;
    }
    .n-button__content {
      line-height: $small-height;
    }
    .n-button__icon {
      height: 18px;
      width: 18px;
      .n-icon {
        font-size: 18px;
        display: block;
      }
    }
    .n-button__icon--slot {
      height: 16px;
      line-height: 16px;
      width: 16px;
      .n-icon-slot {
        height: 16px;
        width: 16px;
        font-size: 16px;
      }
    }
  }
  &.n-button--default-size, &.n-button--medium-size {
    font-size: $button-default-font-size;
    height: $default-height;
    padding: 0 24px;
    &.is-round {
      border-radius: $default-height / 2;
    }
    .n-button__content {
      line-height: $default-height;
    }
    .n-button__icon {
      height: 20px;
      width: 20px;
      .n-icon {
        font-size: 20px;
      }
    }
    .n-button__icon--slot {
      height: 18px;
      line-height: 18px;
      width: 18px;
      .n-icon-slot {
        height: 18px;
        width: 18px;
        font-size: 18px;
      }
    }
  }
  &.n-button--large-size {
    font-size: $button-large-font-size;
    height: $large-height;
    padding: 0 24px;
    &.is-round {
      border-radius: $large-height / 2;
    }
    .n-button__content {
      line-height: $large-height;
    }
    .n-button__icon {
      height: 20px;
      width: 20px;
      .n-icon {
        font-size: 20px;
      }
    }
    .n-button__icon--slot {
      line-height: 18px;
      height: 18px;
      width: 18px;
      .n-icon-slot {
        height: 18px;
        width: 18px;
        font-size: 18px;
      }
    }
  }
  
  
  &.is-default {
    color: $button-default-text-color;
    background-color: $button-default-background-color;
    &:hover {
      background-color: $button-default-background-color--hover;
    }
    &:active {
      background-color: $button-default-background-color--active;
    }
  }
  &.is-primary {
    color: #1F263EFF;
    background-color: $button-primary-background-color;
    box-shadow: none;
    &:hover {
      background-color: $button-primary-background-color--hover;
    }
    &:active {
      background-color: $button-primary-background-color--active;
    }
  }
}