.topbar-text-ads {
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  padding: 0 18px;
}

.topbar-text-ads__viewport {
  position: relative;
  width: min(100%, 680px);
  height: 22px;
  overflow: hidden;
}

.topbar-text-ads__item,
.topbar-text-ads__item:visited {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  color: inherit !important;
  line-height: 22px;
  opacity: 0;
  pointer-events: none;
  text-decoration: none;
  transform: translateY(100%);
}

.topbar-text-ads__item.is-active { opacity: 1; pointer-events: auto; transform: translateY(0); }
.topbar-text-ads__item.is-entering { animation: topbar-text-ad-enter 300ms ease both; pointer-events: auto; }
.topbar-text-ads__item.is-leaving { animation: topbar-text-ad-leave 300ms ease both; pointer-events: none; }
.topbar-text-ads__item:hover { color: inherit !important; text-decoration: underline; }
.topbar-text-ads__item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-text-ads__item i { flex: 0 0 auto; }

@keyframes topbar-text-ad-enter { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } }
@keyframes topbar-text-ad-leave { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-100%); } }

@media (prefers-reduced-motion: reduce) {
  .topbar-text-ads__item.is-entering, .topbar-text-ads__item.is-leaving { animation: none; }
}
