/* SWIPER CAROUSEL */
.item-page .swiper .swiper-wrapper {
  position: relative;
  margin: 0;
  padding-left: 0;
}

/* CAROUSEL NAVIGATION */
.swiper.ow-swiper-carousel {
    --primary-brand-colour: hsl(233 100% 25.1%);

     /* General carousel control button styles */
    button {
      display: inherit;
      position: relative;
      top: 0;
      flex-shrink: 0;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      margin: 0;
      padding: 0;
      border: none;
      border-radius: 100em;
      background-color: #ffffff;
      box-shadow: 0 0.15em 0 hsl(0 0% 85.1%);
      color: var(--primary-brand-colour);
      font-weight: 700;
      font-family: Arial;
      transform-origin: bottom;

      &:hover {
        background-color: hsl(233 34.8% 91%);
      }

      &:active {
        transform: translateY(0.15em);
        box-shadow: 0 0 0 hsl(0 0% 85.1%);
      }

      &:focus {
        outline: 2px dashed #da192e;
        outline-offset: -1px;
      }
    }
  /* Ensures the controls don't display until the Swiper instance is initialised */
  .carousel-controls {
    display: none;
  }

  /* COMPACT CAROUSEL CONTROL PRESENTATION */
  &.swiper-initialized .carousel-controls.compact {
    display: flex;
    gap: 1rem;
    z-index: 2;
    position: absolute;
    right: 0;
    bottom: 0.5rem;
    left: 0;
    width: fit-content;
    margin-inline: auto;
    padding: 1em;
    border-radius: 100em;
    background-color: hsl(0 0% 100% / 0.5);
    transition: background-color 0.5s;
  }

  /* Autoplay toggle button */
  button.carousel-autoplay-toggle-button {
    span {
      width: 32px;
      height: 32px;
    }

    span.off {
      display: inline-block;
    }

    span.on {
      display: none;
    }

    &[aria-checked="true"] span.off {
      display: none;
    }

    &[aria-checked="true"] span.on {
      display: inline-block;
    }
  }

  .swiper-pagination.swiper-pagination-fraction {
    display: inherit;
    position: relative;
    bottom: 0;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: var(--primary-font-color, #252525);
    font-weight: bold;
    font-size: 1rem;
  }

  .carousel-autoplay-toggle-button .autoplay-progress {
    --progress: 0;
    z-index: 10;
    position: absolute;
    top: 1px;
    left: 0;
    width: 100%;
    height: 100%;
    stroke-width: 2px;
    stroke: var(--primary-brand-colour);
    fill: none;
    stroke-dashoffset: calc(125.6px * (1 - var(--progress)));
    stroke-dasharray: 125.6;
    transform: rotate(-90deg);
  }

  .swiper-pagination.swiper-pagination-bullets {
    bottom: 0;
  }

  .swiper-pagination-bullet {
    width: var(--spacing-200, 16px);
    height: var(--spacing-200, 16px);
    background-color: var(--greyscale-400, #dedede);
    box-shadow: none;
    opacity: 1;

    &.swiper-pagination-bullet-active {
      background-color: var(--primary-blue-500, #001080);
    }

    &:hover,
    &:focus {
      border: 1px solid var(--primary-blue-500, #001080);
    }
  }

  @media screen and (width >= 768px) {
    .carousel-controls.compact {
      left: auto;

      &:hover {
        background-color: hsl(0 0% 100%);
      }
    }
  }

  /* FULL-SIZE CAROUSEL CONTROL PRESENTATION */
  &.swiper-initialized .carousel-controls.full-size {
    display: flex;
    position: absolute;
    bottom: 0.5rem;
    width: 100%;

    .swiper-button-prev,
    .swiper-button-next {
      position: absolute;
      transform: translateY(-11rem);
    }

  }
}
