/**
 * 滚动公告样式（逐条播放）
 * @author Telegram @okgeceo
 */

.ok-rolling-notice {
  position: relative;
  z-index: auto;
  width: 100%;
  border-bottom: 1px solid color-mix(in oklch, var(--border) 55%, transparent);
  background: color-mix(in oklch, var(--muted) 35%, transparent);
}

.ok-rolling-notice__viewport {
  overflow: hidden;
  width: 100%;
}

.ok-rolling-notice__slides {
  position: relative;
  width: 100%;
}

.ok-rolling-notice__slide[hidden] {
  display: none !important;
}

.ok-rolling-notice__slide-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: var(--space-2) var(--space-4);
}

.ok-rolling-notice__slide-inner {
  display: inline-block;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  will-change: transform;
}

.ok-rolling-notice__item {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--foreground);
}

.ok-rolling-notice__item p:not([style]),
.ok-rolling-notice__item div:not([style]),
.ok-rolling-notice__item h1:not([style]),
.ok-rolling-notice__item h2:not([style]),
.ok-rolling-notice__item h3:not([style]),
.ok-rolling-notice__item h4:not([style]),
.ok-rolling-notice__item h5:not([style]),
.ok-rolling-notice__item h6:not([style]),
.ok-rolling-notice__item ul:not([style]),
.ok-rolling-notice__item ol:not([style]),
.ok-rolling-notice__item blockquote:not([style]) {
  display: inline;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.ok-rolling-notice__item img {
  display: none;
}

.ok-rolling-notice__item a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 767px) {
  .ok-rolling-notice__slide-viewport {
    padding: var(--space-2) var(--space-3);
  }

  .ok-rolling-notice__item {
    font-size: 0.6875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ok-rolling-notice__slide-inner {
    white-space: normal;
    will-change: auto;
  }
}
