.reels-block-wrapper {
  width: 100%;
  overflow: hidden;
  max-width: 46vw;
  display: none;

  &:has(.swiper-initialized) {
    display: block;
  }

  @media screen and (max-width: 767px) {
    max-width: calc(100vw - 30px);
  }

  .reels-block {
    display: flex;
    justify-content: center;
    overflow: hidden;
    width: 100%;
  }

  .reels-block__list {
    width: 100%;
    position: relative;

    .swiper-slide {
      position: relative;
      cursor: pointer;
      border-radius: var(--button-border-radius);
      overflow: hidden;
      display: flex;
      aspect-ratio: 150/250;

      .reels-block__item {
        width: 100%;
        video {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }

      svg {
        width: 30px;
        height: 30px;
        position: absolute;
        bottom: 20px;
        left: 20px;
        z-index: 9999;
        cursor: pointer;
        opacity: 1;
        transition: opacity 0.3s ease;
      }
    }
  }

  .slider-arrow {
    svg {
      circle,
      path {
        stroke: #fff;
      }
    }
  }

  .sliderPagination__prev,
  .sliderPagination__next {
    &.swiper-button-disabled {
      opacity: 0.5;
    }
  }

  .slider-arrow:has(.sliderPagination__prev) {
    left: 10px;
  }

  .slider-arrow:has(.sliderPagination__next) {
    right: 10px;
  }
}

.reels-popup-wrapper {
  display: none;

  &.active {
    display: flex;
  }

  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;

  .icon-close-reels-popup {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
  }

  .reels-popup {
    aspect-ratio: 15 / 25;
    height: min(90dvh, 50vw);
    max-height: 90dvh;
    overflow: hidden;
    margin: 0 auto;

    @media screen and (max-width: 767px) {
      height: 90dvh;
      max-width: 95%;
      align-content: center;
    }
  }

  .reels-popup__item {

    video {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;

    svg {
      path,
      circle {
        stroke: #fff;
      }
    }

    .swiper-button-disabled {
      opacity: 0.5;
    }
  }

  .slider-arrow:has(.sliderPagination__prev) {
    left: 50px;

    @media screen and (max-width: 767px) {
      left: 10px;
    }
  }

  .slider-arrow:has(.sliderPagination__next) {
    right: 50px;

    @media screen and (max-width: 767px) {
      right: 10px;
    }
  }

  .swiper-wrapper {
    align-items: stretch;

    .swiper-slide {
      aspect-ratio: 15 / 25;
      height: 100%;
      border-radius: var(--button-border-radius);
      overflow: hidden;

      .reels-popup__item {
        height: 100%;
      }
    }
  }
}