.carousel {
  ul {
    list-style: none;
    padding: 0;
  }
  &__canvas {
    margin: 0 0 2rem;
  }

  &--thumbnail {
    .carousel__item {
      height: 8rem;
      margin-left: $grid-gutter-width;
    }
    img {
      display: block;
      height: 100%;
      width: auto;
    }
  }

  &--grid {
    .carousel__item {
      width: 100%;
      margin-left: $grid-gutter-width;
    }

    &--cols-2 {
      .carousel__item {
        @include media-breakpoint-up(sm) {
          width: calc( 50% - #{$grid-gutter-width} / 2 );
        }
      }
    }
    &--cols-3 {
      .carousel__item {
        @include media-breakpoint-up(sm) {
          width: calc( 50% - #{$grid-gutter-width} / 2 );
        }
        @include media-breakpoint-up(md) {
          width: calc( 33.33333% - #{$grid-gutter-width} / 3 * 2 );
        }
      }
    }
    &--cols-4 {
      .carousel__item {
        @include media-breakpoint-up(sm) {
          width: calc( 50% - #{$grid-gutter-width} / 2 );
        }
        @include media-breakpoint-up(md) {
          width: calc( 33.33333% - #{$grid-gutter-width} / 3 * 2 );
        }
        @include media-breakpoint-up(lg) {
          width: calc( 25% - #{$grid-gutter-width} / 4 * 3 );
        }
      }
    }
  }

  &__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    .button:first-of-type {
      transform: rotate(180deg);
    }
  }

  &--expose-controls {
    position: relative;
    @include media-breakpoint-up(xl) {
      .carousel__controls {
        .button {
          position: absolute;
          top: 50%;
          transform: translateY(-50%);
          width: 3rem;
          height: 3rem;
          transform-origin: center;
          margin: 0 $grid-gutter-width;
        }
        .button:first-of-type {
          transform: scale(-1, 1) translateY(-50%);
          right: 100%;
        }
        .button:last-of-type {
          left: 100%;
        }
      }
    }
  }

  &--grid--cols-1 {
    @include media-breakpoint-up(md) {
      position: relative;
      .carousel__controls {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        justify-content: space-between;
        .button {
          margin: 0;
          transform: translateY(-100%);
          transform-origin: center;
        }
        .button:first-of-type {
          transform: rotate(180deg) translateY(100%);
        }
      }
    }
  }
}