@import '@/styles/variables.less';

@item-color: @blColorG1;
@active-item-color: @blColor;

.base-tab-bar {
  width: 100%;
  height: 110px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;

  --tabbar-item-color: @item-color;
  --tabbar-item-active-color: @active-item-color;

  &__wrapper {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    // padding-bottom: 68px;
    padding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS < 11.2 */
    padding-bottom: env(safe-area-inset-bottom); /* 兼容 iOS >= 11.2 */
    background: #FFFFFF;
  }

  &__item {
    flex: 1 1 0%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: @item-color;

    --tabbar-item-font-size: 34px;

    &.selected {
      color: @active-item-color;
    }
  }

  &__item_content {
    position: relative;

    &__badge {
      position: absolute;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #EB5953;
      top: -14px;
      right: -14px;
    }

    &__num-badge {
      position: absolute;
      top: 0;
      right: 0;
      min-width: calc(32px - 8px);
      height: 32px;
      line-height: 32px;
      border-radius: 32px;
      padding: 4px 8px;
      font-size: 24px;
      font-weight: 400;
      color: #FFFFFF;
      text-align: center;
      background: #EB5953;
      transform: translate3d(80%, -70%, 0);
    }
  }
}
