@import '../common/abstracts/variable';
@import '../common/abstracts/mixin';

@include b(swiper) {
  position: relative;

  @include e(track) {
    border-radius: $-swiper-radius;
    overflow: hidden;
    transform: translateY(0);
  }

  @include e(item) {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: $-swiper-item-padding;

    @include m(slot) {
      // 问题来自 https://github.com/dcloudio/uni-app/issues/4629，支付宝小程序不支持属性选择器
      /* #ifdef MP */
      :deep() {
        /* #ifdef MP-WEIXIN */
        view:not([class]) {
          width: 100%;
          height: 100%;
        }
        /* #endif */
        /* #ifndef MP-WEIXIN */
        view {
          width: 100%;
          height: 100%;
        }
        /* #endif */
      }
      /* #endif */
    }
  }

  @include e(image, video) {
    width: 100%;
    transition: all 0.3s ease;
  }

  @include e(text) {
    // 随便搞个样式，反正用户还是会覆盖的
    position: absolute;
    right: 24rpx;
    top: 24rpx;
    color: $-swiper-item-text-color;
    font-size: $-swiper-item-text-fs;
  }
}