// @import "../var.scss";
$openBallScale: 32px;
$openBallSmScale: 24px;

.animate-balls {
  $scrollWidth: 30px;
  width: 100%;
  display: inline-block;
  // height: 100%;
  position: relative;
  // perspective: 4400px;
  // overflow: hidden;
  // display: inline-block;
  animation-duration: 1.8s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;

  &.loop1 {
    animation-name: loop;
  }
  &.loop2 {
    animation-name: re-loop;
  }
  .carousel2 {
    // height: 100%;
    transition: transform ease 2s;
    // transform: rotateX(0deg);
    // animation-duration: 1.5s;
    // animation-iteration-count: infinite;
    // animation-timing-function: linear;
  }
  .item {
    $imgWidth: 100%;
    $imgHeight: 100%;
    width: $imgWidth;
    height: $imgHeight;
    // margin-top: 50%;
    // top: - $imgWidth / 2;
    backface-visibility: hidden;
    display: block;
    &.active {
      z-index: 101;
      .card-img {
        opacity: 1 !important;
      }
    }
  }
}

.LHC .animate-balls {
  animation-duration: 8s;
}

// @keyframes loopBall {
//   from {
//     transform: translateY(-54px);
//     // transform: rotateX(0deg);
//   }
//   to {
//     transform: translateY(-100%);
//     // transform: rotateX(-360deg);
//   }
// }
// @keyframes loopBallRe {
//   from {
//     transform: translateY(-100%);
//     // transform: rotateX(0deg);
//   }
//   to {
//     transform: translateY(-54px);
//     // transform: rotateX(360deg);
//   }
// }

.ball-group {
  @include layout();
  justify-content: space-around;
  overflow-y: auto;
  .ball-wrap {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: hidden;
  }
  .ball {
    width: $openBallScale;
    height: $openBallScale;
    line-height: $openBallScale - 2;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    display: inline-block;
    border-radius: $openBallScale;
    position: relative;
    // overflow: hidden;
    &.s {
      background-color: $themeColor !important;
      border-color: $themeColor;
      color: #FFF;
    }
    &.active {
      .front {
        transform: scale(0);
      }
      .back {
        transform: scale(1);
      }
    }
    &.sm {
      width: $openBallSmScale;
      height: $openBallSmScale;
      line-height: $openBallSmScale - 2;
      font-size: 14px;
    }
    &.b {
      border: 1px solid #DDD;
    }

    .front,.back {
      width: 100%;
      height: 100%;
      transition: all ease 0.2s;
    }
    .front,.ball {
      transform: scale(1);
    }
    .back {
      overflow: hidden;
      transform: scale(0);
    }
  }

}
