@import '../../base.less';

@import './_var.less';

.@{prefix}-swiper {
  position: relative;
  box-sizing: border-box;
  font-weight: normal;
  border-radius: @swiper-border-radius;
  overflow: hidden;

  &-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-shrink: 0;

    & > * {
      border-radius: @swiper-border-radius;
    }

    &--image-host {
      width: 100%;
      display: flex;
      align-items: center;
      box-sizing: border-box;
      overflow: hidden;
      justify-content: center;
      position: relative;

      & > * {
        border-radius: @swiper-border-radius;
      }

      img {
        height: 100%;
        width: 100%;
        max-width: none;
        object-fit: cover;
      }
    }
  }

  // 主要容器
  &__container {
    height: 100%;
    width: auto;
    position: relative;
  }

  &__item {
    overflow: hidden;

    img {
      height: 100%;
      width: 100%;
    }
  }

  &--outside {
    padding-bottom: @swiper-placement-outside-padding;
  }

  &__container--card {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
  }

  &--card {
    .@{prefix}-swiper-item {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      z-index: 0;

      &--active {
        z-index: 1;
      }
    }

    .t-swiper-item--image-host {
      transition: all .3s ease;
    }

    .t-swiper-item--image-host--prev {
      right: @swiper-item-right-padding;
    }

    .t-swiper-item--image-host--next {
      left: @swiper-item-left-padding;
    }
  }
}
