@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

.news-ticker {
  --ticker-bg: rgb(0 0 0 / 50%);
  --ticker-bg-hover: rgb(255 255 255 / 12%);
  --ticker-text: #fff;
  --ticker-line: rgb(255 255 255 / 28%);
  --ticker-up: #3ddc84;
  --ticker-down: #ff5c5c;
  --ticker-flat: #c8c8c8;
  --ticker-icon: #5aa2e8;
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  margin: 0;
  padding: 0;
  background: var(--ticker-bg);
  color: var(--ticker-text);
  border: 0;
  overflow: hidden;
  position: relative;
  top: 0;
  z-index: 1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 16px;
}

html[data-theme-mode="dark"] .news-ticker {
  --ticker-bg: rgb(0 0 0 / 50%);
  --ticker-bg-hover: rgb(255 255 255 / 12%);
  --ticker-text: #fff;
  --ticker-line: rgb(255 255 255 / 28%);
}

.news-ticker *,
.news-ticker *::before,
.news-ticker *::after {
  box-sizing: border-box;
}

.news-ticker.is-paused .news-ticker__track {
  animation-play-state: paused;
}

.news-ticker__pause {
  appearance: none;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid var(--ticker-line);
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  color: transparent;
  cursor: pointer;
  z-index: 2;
}

.news-ticker__pause:hover {
  background: var(--ticker-bg-hover);
  color: var(--ticker-bg-hover);
}

.news-ticker__pause path {
  fill: currentColor;
  stroke: var(--ticker-icon);
}

.news-ticker__pause svg {
  grid-area: 1 / 1;
  width: 14px;
  height: 14px;
}

.news-ticker__pause .news-ticker__icon--pause {
  display: block;
}

.news-ticker__pause .news-ticker__icon--play {
  display: none;
}

.news-ticker.is-paused .news-ticker__pause .news-ticker__icon--pause {
  display: none;
}

.news-ticker.is-paused .news-ticker__pause .news-ticker__icon--play {
  display: block;
}

.news-ticker__pause svg[hidden] {
  display: none !important;
}

.news-ticker__viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  height: 32px;
}

.news-ticker__track {
  display: flex;
  align-items: stretch;
  width: max-content;
  height: 32px;
  will-change: transform;
  animation: news-ticker-scroll 90s linear infinite;
}

.news-ticker__group {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
}

.news-ticker__item {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  height: 32px;
  padding: 8px 16px;
  border-right: 1px solid var(--ticker-line);
  color: var(--ticker-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
  text-decoration: none;
  background: transparent;
}

.news-ticker__item strong {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ticker-text);
}

.news-ticker__value {
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: var(--ticker-text);
}

a.news-ticker__item:hover,
.news-ticker__item:hover {
  color: var(--ticker-text);
  text-decoration: none;
  background: var(--ticker-bg-hover);
}

.news-ticker__pct {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.news-ticker__pct.is-up { color: var(--ticker-up); }
.news-ticker__pct.is-down { color: var(--ticker-down); }
.news-ticker__pct.is-flat { color: var(--ticker-flat); }

@keyframes news-ticker-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@media (max-width: 640px) {
  .news-ticker__item {
    padding: 8px 12px;
  }
}
