.c3-horizontal-ticker {
  background-color: rgb(var(--color-background));
  color: rgb(var(--color-text));
  padding-top: var(--ticker-padding-top, 16px);
  padding-bottom: var(--ticker-padding-bottom, 16px);
  overflow: hidden;
}

/* 不在此处裁剪:横向裁剪由外层 .c3-horizontal-ticker 的 overflow 负责。
   这里若裁,盒子高度正好卡在字号,会切掉 line-height:1 下字形的上下缘。 */
.c3-horizontal-ticker__viewport {
  width: 100%;
}

.c3-horizontal-ticker__track {
  display: flex;
  width: max-content;
  animation: c3-ticker-scroll var(--ticker-speed, 40s) linear infinite;
}

.c3-horizontal-ticker[data-direction="right"] .c3-horizontal-ticker__track {
  animation-direction: reverse;
}

.c3-horizontal-ticker[data-pause-on-hover="true"]:hover .c3-horizontal-ticker__track {
  animation-play-state: paused;
}

.c3-horizontal-ticker__group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: var(--ticker-gap, 48px);
  padding-right: var(--ticker-gap, 48px);
}

.c3-horizontal-ticker__item {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 文字元素用 <p>(块级),0,2,0 特异性压过版式 class(如 .body2)的 line-height。
   line-height:1 + margin:0 让高度贴合字号,与例站一致。 */
.c3-horizontal-ticker .c3-horizontal-ticker__item--text {
  margin: 0;
  color: inherit;
  line-height: 1;
}

a.c3-horizontal-ticker__link {
  color: inherit;
  text-decoration: none;
}
a.c3-horizontal-ticker__link:hover {
  color: inherit;
}

.c3-horizontal-ticker--uppercase .c3-horizontal-ticker__item--text {
  text-transform: uppercase;
}

.c3-horizontal-ticker--bold .c3-horizontal-ticker__item--text {
  font-weight: 700;
}

.c3-horizontal-ticker--italic .c3-horizontal-ticker__item--text {
  font-style: italic;
}

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

@media (prefers-reduced-motion: reduce) {
  .c3-horizontal-ticker__track {
    animation: none;
  }
}
