.lcm-carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: var(--lcm-bg, #fff);
}

/* The moving strip */
.lcm-carousel .lcm-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: max-content !important;
  will-change: transform;
  animation: lcm-scroll-left var(--lcm-speed, 35s) linear infinite;
}

/* Direction */
.lcm-carousel[data-direction="right"] .lcm-track {
  animation-name: lcm-scroll-right;
}

/* Each duplicated set */
.lcm-carousel .lcm-group {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: var(--lcm-gap, 24px);
  flex: 0 0 auto !important;
}

/* Each logo item */
.lcm-carousel .lcm-logo {
  flex: 0 0 auto !important;
  width: var(--lcm-item-width, 160px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.lcm-carousel .lcm-logo a,
.lcm-carousel .lcm-logo img {
  display: block;
  width: 100%;
}

.lcm-carousel .lcm-logo img {
  height: auto;
  object-fit: contain;
}

.lcm-carousel .lcm-logo.is-grayscale img {
  filter: grayscale(100%);
}

/* Infinite loop animation */
@keyframes lcm-scroll-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes lcm-scroll-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

/* Edge fade */
.lcm-carousel.has-fade::before,
.lcm-carousel.has-fade::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--lcm-fade-width, 12%);
  pointer-events: none;
  z-index: 2;
}

.lcm-carousel.has-fade::before {
  left: 0;
  background: linear-gradient(
    to right,
    rgba(var(--lcm-fade-rgb, 255, 255, 255), 1) 0%,
    rgba(var(--lcm-fade-rgb, 255, 255, 255), 0) 100%
  );
}

.lcm-carousel.has-fade::after {
  right: 0;
  background: linear-gradient(
    to left,
    rgba(var(--lcm-fade-rgb, 255, 255, 255), 1) 0%,
    rgba(var(--lcm-fade-rgb, 255, 255, 255), 0) 100%
  );
}

@media (prefers-reduced-motion: reduce) {
  .lcm-carousel .lcm-track {
    animation: none;
  }
}
