@import 'src/styles/variables.scss';

.wrapper {
  border-radius: $radius;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;

  :global(.swiper) {
    width: 100%;
  }

  :global(.swiper-pagination) {
    left: 50%;
    bottom: $gap * 2;
    transform: translate(-50%, 25%);
    background: $content_bg_darker;
    width: auto;
    padding: 5px 10px;
    border-radius: 10px;
    font: $font_10_semibold;
  }

  :global(.swiper-container) {
    width: 100%;
    position: relative;
  }

  :global(.swiper-button-next),
  :global(.swiper-button-prev) {
    @include outer_shadow;

    color: white;
    font-size: 10px;
    width: 40px;
    height: 40px;
    background: $content_bg;
    border-radius: 100%;
    transition: transform 0.25s;
    transform: scale(1);

    @include tablet {
      width: 32px;
      height: 32px;
    }

    &:global(.swiper-button-prev) {
      left: $gap;
      padding-right: 3px;

      @include tablet {
        left: 0;
        border-radius: 0 $radius $radius 0;
        transform-origin: 0 50%;
      }
    }

    &:global(.swiper-button-next) {
      right: $gap;
      padding-left: 3px;

      @include tablet {
        right: 0;
        border-radius: $radius 0 0 $radius;
        transform-origin: 100% 50%;
      }
    }

    &:global(.swiper-button-disabled) {
      opacity: 0;
      transform: scale(0);
    }

    &::after {
      font-size: 18px;
      pointer-events: none;
      font-weight: 900;

      @include tablet {
        font-size: 12px;
      }
    }
  }
}

.slide.slide {
  text-align: center;
  text-transform: uppercase;
  font: $font_32_bold;
  display: flex;
  border-radius: $radius;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100vw;
  opacity: 1;
  transform: scale(0.99);
  filter: brightness(50%) saturate(0.5);
  transition: opacity 0.5s, filter 0.5s, transform 0.5s;
  padding-bottom: $gap * 1.5;
  padding-top: $gap;
  position: relative;

  &:global(.swiper-slide-active) {
    opacity: 1;
    filter: brightness(100%);
    //transform: translate(0, 0);
    transform: scale(1);
  }

  @include tablet {
    padding-bottom: 0;
    padding-top: 0;
    transform: translate(0, 0);
  }
}

.image {
  max-inline-size: calc(100vh - 160px);
  writing-mode: vertical-rl;
  block-size: auto;
  border-radius: $radius;
  transition: box-shadow 1s;
  box-shadow: transparentize(black, 0.7) 0 3px 5px;

  &.loading {
    opacity: 0;
  }

  :global(.swiper-slide-active) & {
    box-shadow: transparentize(black, 0.9) 0 10px 5px 4px,
      transparentize(black, 0.7) 0 5px 5px, $gray_90 0 -1px 2px, $gray_90 0 -1px;
  }

  @include tablet {
    padding-bottom: 0;
    max-height: 100vh;
    border-radius: 0;
  }

  @media (orientation: portrait) {
    max-inline-size: 100vw;
    writing-mode: horizontal-tb;
  }
}