@import 'press-ui/common/style/smoba/layout.scss';
@import 'press-ui/common/style/smoba/mixin.scss';
@import './tree-mixin.scss';

// 瑞士轮
.press-schedule-tree--swiss {

  // 瑞士轮设计稿使用的是圆点
  @include sche-tab-highlight(-3, $background-image: url('https://image-1251917893.file.myqcloud.com/Esports/new/user/sche-border-blue.png'));

  .press-schedule-tree-tab-icon {
    top: -21px;
    width: 26px;
    height: 21px;
    background: url(https://image-1251917893.file.myqcloud.com/Esports/new/user/sche-border-gray.png) no-repeat center;
  }

  // 获取连接线高度需要
  .press-schedule-tree-layout {
    height: auto;
  }

  .press-schedule-tree-group {
    &-scoreboard-wrap {
      background: #eef0f6;
      padding-bottom: 8px;
    }

    &-scoreboard {
      width: 100%;
      height: 24px;
      line-height: 24px;
      text-align: center;
      border-radius: 4px 4px 0px 0px;
      background: $color-gray-3;
      font-size: .32rem;
    }
  }

  .press-schedule-tree-column {
    margin: 0 8px;

    &:first-child {
      margin-left: 0;

      // .press-schedule-tree-pair {
      //   padding-left: 8px;
      // }
    }

    &:last-child {
      .press-schedule-tree-pair::after {
        display: none;
      }
    }
  }

  .press-schedule-tree-pair {
    // background: #eef0f6;
    // margin-bottom: 30px;
    padding-bottom: 30px;
    position: relative;

    padding: 0;

    .press-schedule-team {
      background: #eef0f6;
      padding: 0 8px;
    }

    // &:nth-last-child(2) {
    &:nth-last-of-type(1) {
      margin-bottom: 0;
    }

    &::before {
      position: absolute;
      content: '';
      top: 50%;
      left: -8px;
      width: 8px;
      border-top: 1px solid #dfe2ea;
    }

    &::after {
      position: absolute;
      content: '';
      top: 50%;
      right: -8px;
      width: 8px;
      border-top: 1px solid #dfe2ea
    }

    // 小程序下会多出多余的组件结构，
    // 导致 margin-bottom 错误的全部置为 0
    // ::v-deep {
    //   .press-schedule-team {
    //     &:last-child {
    //       margin-bottom: 0;
    //     }
    //   }
    // }
  }

  .press-schedule-tree-pair-gap {
    height: 30px;
  }

  .press-schedule-tree-pair-border {
    border: 0;
    border-right: 1px solid #dfe2ea;
    left: -17px;
    top: 0;
    bottom: 0;

    &--first {
      top: 50%;
    }

    &--last {
      bottom: 50%;
    }

    &::after {
      display: none;
    }
  }

  .press-schedule-tree-swiss-border {
    position: absolute;
    content: '';
    right: -8px;
    border-right: 1px solid #dfe2ea;
  }
}