/**
 * Marquee for Creative Elements - front styles
 */

.zdm {
  --zdm-distance: 0px;
}

/* Viewport = the clipped window the track scrolls inside */
.zdm-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* The moving track; JS clones .zdm-run inside it until it overflows twice */
.zdm-track {
  display: flex;
  width: max-content;
  flex-wrap: nowrap;
  will-change: transform;
  animation-name: zdm-scroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: 20s;
}
.zdm-track.zdm-reverse {
  animation-direction: reverse;
}
.zdm-track.zdm-paused {
  animation-play-state: paused;
}
.zdm-run {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}

@keyframes zdm-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--zdm-distance))); }
}
@media (prefers-reduced-motion: reduce) {
  .zdm-track {
    animation: none;
  }
}

/* Items */
.zdm-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex: 0 0 auto;
}
.zdm-item > a {
  display: inline-flex;
  align-items: center;
  gap: inherit;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.zdm-text {
  display: inline-block;
  line-height: 1.2;
}
.zdm-item i {
  flex: 0 0 auto;
  line-height: 1;
}
.zdm-img {
  display: block;
  width: auto;
  height: 40px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Separator */
.zdm-sep {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 1;
}

/* Outline text style */
.zdm-outline .zdm-text {
  -webkit-text-stroke: 1px currentColor;
  text-stroke: 1px currentColor;
  color: transparent;
}

/* Multi-row wrapper */
.zdm--multi {
  display: flex;
  flex-direction: column;
  row-gap: 8px;
}

/* Crossed / diagonal layout */
.zdm--crossed {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}
.zdm--crossed .zdm-band {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 200%;
  display: flex;
  align-items: center;
  padding: 14px 0;
  transform: translate(-50%, -50%) rotate(var(--zdm-angle, 0deg));
  transform-origin: center center;
}
.zdm--crossed .zdm-band--a {
  background-color: #f5e400;
  color: #111111;
  z-index: 1;
}
.zdm--crossed .zdm-band--b {
  background-color: #e5007d;
  color: #ffffff;
  z-index: 2;
}
.zdm--crossed .zdm-viewport,
.zdm--crossed .zdm-track {
  width: 100%;
}
.zdm--crossed .zdm-band .zdm-track {
  width: max-content;
}

/* Editor helper */
.zdm-empty {
  padding: 20px;
  text-align: center;
  border: 1px dashed rgba(0, 0, 0, 0.25);
  color: rgba(0, 0, 0, 0.5);
  font-size: 14px;
}
