/* ─── Common ─── */

.marquixfe-marquee-container {
  --marquixfe-duration: 10s;
  overflow: hidden;
  width: 100%;
}

.marquixfe-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation-duration: var(--marquixfe-duration);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-name: none;
  /* JS activates the correct animation */
  will-change: transform;
}

.marquixfe-pause-hover:hover .marquixfe-marquee-track {
  animation-play-state: paused;
}

/* ─── Text Marquee ─── */

.marquixfe-text-marquee .marquixfe-marquee-item {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Seamless: padding-right acts as separator between cloned copies */
.marquixfe-text-seamless .marquixfe-marquee-item {
  padding-right: 2rem;
}

/* Normal: no extra padding (single text, no copies) */
.marquixfe-text-normal .marquixfe-marquee-item {
  padding-right: 0;
}

/* ─── Logo Marquee ─── */

.marquixfe-logo-marquee .marquixfe-marquee-group {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-shrink: 0;
  padding-right: var(--marquixfe-group-gap, 40px);
}

.marquixfe-logo-marquee .marquixfe-logo-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.marquixfe-logo-marquee .marquixfe-logo-item img {
  width: 120px;
  height: auto;
  max-width: 100%;
  display: block;
}

/* ─── Fade edges ─── */

.marquixfe-fade {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black var(--marquixfe-fade-size, 80px),
    black calc(100% - var(--marquixfe-fade-size, 80px)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black var(--marquixfe-fade-size, 80px),
    black calc(100% - var(--marquixfe-fade-size, 80px)),
    transparent 100%
  );
}

/* ─── Keyframes ─── */

/* Seamless scroll — shared by text-seamless and logo marquees.
   --marquixfe-translate is set by JS to -<one copy width>px */
@keyframes marquixfe-scroll-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(var(--marquixfe-translate));
  }
}

@keyframes marquixfe-scroll-right {
  from {
    transform: translateX(var(--marquixfe-translate));
  }

  to {
    transform: translateX(0);
  }
}

/* Normal scroll — text enters from one side, exits on the other.
   --marquixfe-start and --marquixfe-end are set by JS */
@keyframes marquixfe-normal-scroll {
  from {
    transform: translateX(var(--marquixfe-start));
  }

  to {
    transform: translateX(var(--marquixfe-end));
  }
}