@use '../../base/token';
@use '../../abstract';

.cds-carousel-layout {
  .swiper {
    padding: 0 16px;
  }

  .swiper-slide {
    width: 100%;
  }

  .cds-card {
    width: auto;
  }

  .cds-card__description {
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    word-wrap: break-word;
    display: -webkit-box;
  }

  &__arrows {
    display: flex;
    align-items: center;
    margin-top: 24px;
    padding: 0 16px;
    justify-content: space-between;
  }

  &__pagination {
    display: inline-block;
    color: #667085;

    .swiper-pagination-current {
      color: #0c111d;
    }
  }

  @include abstract.media-bp-up('md') {
    .swiper {
      padding: 0 max(50% - 608px, 32px);
    }

    .swiper-slide {
      width: auto;
    }

    .cds-card__title-text {
      white-space: pre-wrap;
    }
    .cds-card__description {
      white-space: pre-wrap;
      overflow: visible;
      display: block;
    }

    &__arrows {
      padding: 0;
      padding: 0 max(50% - 608px, 32px);
      justify-content: flex-start;
      gap: 32px;
    }
  }
}
