/* ===================== «История»: слой сайта в списке материалов =====================
   Базовая разметка архива (строки, превью, галерея) живёт в components.css;
   здесь — только то, что добавил слой сайта: кликабельная шапка строки,
   чипы статуса, ссылки на YouTube рядом с «TG ↗». */

/* Шапка строки открывает карточку материала. */
.archive-row-head.is-clickable {
  margin: -4px -6px 4px;
  padding: 4px 6px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .14s;
}
.archive-row-head.is-clickable:hover { background: var(--surface-2); }
.archive-row-head.is-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Чипы статуса материала: «Нет на сайте», «Текст ✓», «Медиа ✓», «RU», «правлено». */
.history-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.history-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  white-space: nowrap;
}
.history-chip.is-ok { background: var(--green-soft); color: var(--green); }
.history-chip.is-warn { background: var(--amber-soft); color: var(--amber); }
.history-chip.is-bad { background: var(--red-soft); color: var(--red); }
.history-chip.is-info { background: var(--blue-soft); color: var(--blue); }
.history-chip.is-muted { background: var(--surface-2); color: var(--ink-4); }
.archive-version-edited { flex: none; margin-left: auto; }

/* Плитка видео с привязанным YouTube: сама плитка и ссылка — соседи,
   вложить одну ссылку в другую HTML не даёт. */
.archive-thumb-wrap { position: relative; flex: none; display: inline-flex; }
.archive-thumb-yt {
  position: absolute;
  left: 3px;
  top: 20px;
  z-index: 1;
  padding: 0 4px;
  border-radius: 4px;
  background: #c4302b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-decoration: none;
  white-space: nowrap;
}
/* У скачанного ролика нет «TG ↗» — ссылка встаёт в самый угол. */
.archive-thumb-wrap.is-plain .archive-thumb-yt { top: 3px; }
.archive-thumb-yt:hover,
.archive-gallery-yt:hover { background: #a3241f; color: #fff; }

.archive-gallery-item.has-youtube { color: #fff; }
.archive-gallery-cover {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
  text-decoration: none;
}
.archive-gallery.is-single .archive-gallery-item.has-youtube .archive-gallery-cover { min-height: 120px; }
.archive-gallery-yt {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  max-width: calc(100% - 16px);
  padding: 3px 8px;
  border-radius: 6px;
  background: #c4302b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Окно, пока едет полный материал, и пояснение запасного окна копии. */
.history-loading { padding: 22px 4px; text-align: center; font-size: 13px; }
.history-notice {
  margin-bottom: 10px;
  padding: 8px 11px;
  border-radius: var(--r-sm);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}
