@layer component {
  theme-carousel {
    position: relative;
    display: block;
  }

  theme-carousel .carousel__autoplay-toggle {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
    z-index: 8;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    color: rgb(var(--color-text));
    font: 700 14px/1.2 "Courier New", Courier, monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    background: rgb(var(--color-background) / 88%);
    border: 1px solid rgb(var(--color-text) / 55%);
    border-radius: 0;
  }

  theme-carousel .carousel__autoplay-toggle:hover {
    border-color: rgb(var(--color-text));
  }

  theme-carousel .carousel__autoplay-toggle:focus-visible {
    outline: 3px solid rgb(var(--color-text));
    outline-offset: 3px;
  }

  theme-carousel .carousel__autoplay-toggle:disabled {
    cursor: default;
    opacity: 0.72;
  }

  theme-carousel .carousel__track {
    position: relative;
    display: flex;
    flex-wrap: inherit;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
  }

  theme-carousel .carousel__track::-webkit-scrollbar {
    display: none;
  }

  theme-carousel .carousel__track > * {
    flex-shrink: 0;
    list-style: none;
    scroll-snap-align: start;
  }
  theme-carousel .carousel__track-scroll-behavior--auto {
    scroll-behavior: auto;
  }
  theme-carousel .carousel__track-scroll-snap-type--none {
    scroll-snap-type: none;
  }
  theme-carousel[data-scroll-snap-align="center"] .carousel__track > * {
    scroll-snap-align: center;
  }
  theme-carousel[data-scroll-snap-align="end"] .carousel__track > * {
    scroll-snap-align: end;
  }
  theme-carousel[data-direction="vertical"] .carousel__track {
    flex-direction: column;
    overflow-x: unset;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
  }
  @media (min-width: 960px) {
    theme-carousel[data-desktop-direction="vertical"] .carousel__track {
      flex-direction: column;
      overflow-x: unset;
      overflow-y: auto;
      scroll-snap-type: y mandatory;
    }
  }
  @media (max-width: 959px) {
    theme-carousel[data-mobile-direction="vertical"] .carousel__track {
      flex-direction: column;
      overflow-x: unset;
      overflow-y: auto;
      scroll-snap-type: y mandatory;
    }
  }
}
