/**
 * Header topbar — co-located with topbar.php (uses design tokens from design-tokens enqueue).
 */

.ds-topbar {
    background: rgba(51, 107, 171, 0.05);
    color: var(--text-secondary);
    overflow: hidden;
    white-space: nowrap;
}

.ds-topbar__inner {
    display: flex;
    width: max-content;
    gap: var(--space-6);
}

.ds-topbar__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-3) 0;
}

.ds-topbar__item {
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.ds-topbar__link,
.ds-topbar__text {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    line-height: 1.4;
    font-weight: var(--font-semibold);
    text-decoration: none;
    color: var(--text-primary);
}

.ds-topbar__link {
    gap: var(--space-2);
}

.ds-topbar__link:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.ds-topbar__icon {
    fill: var(--text-primary);
    flex-shrink: 0;
}

.ds-topbar__icon.users {
    height: 16px;
}

.ds-topbar__icon.flag {
    height: 14px;
    border-radius: 2px;
    margin-right: var(--space-1);
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
}

.ds-topbar__icon.heart, .ds-topbar__icon.lock {
    fill: var(--color-brand);
}


.ds-topbar-stars-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-right: var(--space-1);
}

.ds-topbar-stars-wrapper .star-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 15px;
    width: 15px;
    background: #448b3c;
}

.ds-topbar-stars-wrapper svg {
    fill: var(--text-inverse);
    width: 12px;
    height: 12px;
}

@media (max-width: 640px) {
    .ds-topbar__list {
        gap: var(--space-3);
    }

    .ds-topbar__item:not(:last-child) {
        padding-right: var(--space-3);
    }
}


@media (min-width: 975px) {
    .ds-topbar__inner {
      animation: none;
      display: flex;
      width: 100%;
      justify-content: space-between;
    }
    
    .duplicate {
        display: none;
    }
  }
  
  /* mobile: animate */
  @media (max-width: 975px) {
    .ds-topbar__inner {
      animation: topbar-scroll 18s linear infinite;
    }

    .ds-topbar:hover .ds-topbar__inner {
        animation-play-state: paused;
      }

    .duplicate {
        display: flex;
    }
  }
  

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