/* Метки статей (теги блога) — общий стиль для /articles, тег-страниц и самих статей.
   Источник правды по набору меток: scripts/lib/articles-data.mjs
   Цвета держим здесь (а не в <style> страниц), чтобы они были едины во всех местах. */

/* Контейнер набора меток (в карточке и на странице статьи) */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.article .article-tags { margin-bottom: 16px; }
.article-card-meta .article-tags { margin: 0; }

/* Базовый чип. Используем потомковые селекторы (.article-tags .tag / .tag-filter .tag),
   чтобы перебить инлайновое .article .tag на страницах статей по порядку загрузки. */
.article-tags .tag,
.tag-filter .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.2px;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
a.tag:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(15,56,21,.10); }

/* Уменьшенный вариант для карточек списка */
.article-card-meta .tag { padding: 3px 10px; font-size: 11px; }

/* Цветовые варианты по slug метки */
.article-tags .tag--updates,      .tag-filter .tag--updates      { background: rgba(124,58,237,.10); color: #6d28d9; }
.article-tags .tag--guides,       .tag-filter .tag--guides       { background: rgba(0,200,83,.10);   color: #0a8f43; }
.article-tags .tag--manuals,      .tag-filter .tag--manuals      { background: rgba(59,130,246,.10); color: #2563eb; }
.article-tags .tag--reviews,      .tag-filter .tag--reviews      { background: rgba(217,119,6,.12);  color: #b45309; }
.article-tags .tag--cases,        .tag-filter .tag--cases        { background: rgba(20,184,166,.14); color: #0f766e; }
.article-tags .tag--integrations, .tag-filter .tag--integrations { background: rgba(99,102,241,.12); color: #4f46e5; }
.article-tags .tag--analytics,    .tag-filter .tag--analytics    { background: rgba(219,39,119,.10); color: #be185d; }
.article-tags .tag--news,         .tag-filter .tag--news         { background: rgba(220,38,38,.10);  color: #dc2626; }

/* Панель фильтра на страницах списка */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.tag-filter .tag { font-size: 13px; padding: 7px 16px; }
.tag-filter .tag .count { opacity: .55; font-weight: 700; }
.tag-filter .tag--all { background: var(--color-bg-card); color: var(--color-text-muted); border-color: var(--color-border); }
.tag-filter .tag[aria-current="page"] { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }

@media (max-width: 600px) {
  .tag-filter { gap: 8px; margin-bottom: 28px; }
}
