/* Theme. To restyle, set any --fx-* variable on :root (every feature on the site)
   or on .fx-marquee (this feature only). The values here are the defaults. */
.fx-marquee {
  --_accent: var(--fx-accent, #d4af37);
  --_text: var(--fx-text, #f5f5f5);
  --_muted: var(--fx-muted, #b8b8b8);
  --_line: var(--fx-line, rgba(255,255,255,.15));
  --_demo: var(--fx-demo, #9ad1ff);
  --_font-display: var(--fx-font-display, inherit);
  --_font-body: var(--fx-font-body, inherit);
  --_space: var(--fx-space, 16px);
  --_radius: var(--fx-radius, 6px);
  --_size: var(--fx-marquee-size, clamp(2rem, 7vw, 4rem));
  position: relative;
  padding: calc(var(--_space) * 1.5) 0;
  color: var(--_text);
  border-top: 1px solid var(--_line);
  border-bottom: 1px solid var(--_line);
  font-family: var(--_font-body);
}
.fx-marquee-view { overflow: hidden; }
.fx-marquee-track { display: flex; width: max-content; }
.fx-marquee-group { display: flex; flex: none; align-items: center; margin: 0; padding: 0; list-style: none; }
.fx-marquee-word, .fx-marquee-sep {
  padding: 0 calc(var(--_space) * .9);
  font-family: var(--_font-display);
  font-size: var(--_size);
  font-weight: var(--fx-heading-weight, 800);
  line-height: 1.1;
  text-transform: var(--fx-heading-case, uppercase);
  white-space: nowrap;
}
.fx-marquee-sep { padding: 0; color: var(--_accent); font-size: calc(var(--_size) * .5); }
/* Every second word as an outline (SETTINGS.outline) */
@supports (-webkit-text-stroke: 1px #000) {
  .fx-marquee-word.is-outline { color: transparent; -webkit-text-stroke: 1px var(--_text); }
}

.fx-marquee.is-moving .fx-marquee-track { animation: fx-marquee-slide 30s linear infinite; }
.fx-marquee.is-reverse .fx-marquee-track { animation-direction: reverse; }
.fx-marquee.is-off .fx-marquee-track, .fx-marquee.is-paused .fx-marquee-track { animation-play-state: paused; }
@media (hover: hover) {
  .fx-marquee.is-hover-pause .fx-marquee-view:hover .fx-marquee-track { animation-play-state: paused; }
}
@keyframes fx-marquee-slide { to { transform: translateX(var(--fx-marquee-shift, -50%)); } }

/* Still version: reduced motion, or no animation */
.fx-marquee.is-still .fx-marquee-track { width: auto; }
.fx-marquee.is-still .fx-marquee-group { flex-wrap: wrap; justify-content: center; row-gap: 6px; }

.fx-marquee-pause {
  display: block;
  min-height: 40px;
  margin: calc(var(--_space) * .5) var(--_space) 0 auto;
  padding: 0 14px;
  background: none;
  color: var(--_muted);
  border: 1px solid var(--_line);
  border-radius: var(--_radius);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}
.fx-marquee-pause:hover { color: var(--_text); }
.fx-marquee :focus-visible { outline: 3px solid var(--_accent); outline-offset: 2px; }
.fx-marquee .fx-demo {
  display: block;
  width: max-content;
  max-width: calc(100% - var(--_space) * 2);
  margin: 0 var(--_space) 12px;
  padding: 4px 10px;
  border: 1px dashed var(--_demo);
  border-radius: calc(var(--_radius) * .6);
  color: var(--_demo);
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .fx-marquee .fx-marquee-track { animation: none !important; }
}
