/* sources.css — источники: карточки подключений, мастер Битрикс24 (шаги, подсказка), таблица каналов.
   Владелец — агент `sources`. Правила: только var(--…) токены (tests/ui/test_ui_regulation.py), см. docs/THEMES.md.
   Общие для форм доступа блоки .acl-block/.acl-checks — в access.css. */

/* ---------- карточки подключений ---------- */
.src-card h2 { font-size: var(--fs-lg); }
.src-card h2 a { color: inherit; text-decoration: none; }
.src-card h2 a:hover { text-decoration: underline; text-underline-offset: 2px; }
.src-icon { display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: calc(var(--control-h) + var(--s1)); height: calc(var(--control-h) + var(--s1)); border-radius: var(--r);
  background: var(--accent-soft); color: var(--accent); }
.src-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.src-meta > span { display: inline-flex; align-items: center; gap: var(--s1); }
.src-meta .icon { width: 14px; height: 14px; }
.src-card.soon { border-style: dashed; box-shadow: none; background: var(--surface-2); }
.src-card.soon .src-icon { background: var(--surface-3); color: var(--fg-muted); }

/* ---------- мастер Битрикс24 ---------- */
.wizard-steps { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: 0 0 var(--s4); padding: 0; }
.wizard-steps li { display: inline-flex; align-items: center; gap: var(--s2); color: var(--fg-muted); font-size: var(--fs-sm); }
.wizard-num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px;
  border-radius: var(--r-pill); border: var(--border-w) solid var(--border-strong); background: var(--surface-1);
  font: var(--fw-semibold) var(--fs-xs) var(--font-data); }
.wizard-num .icon { width: 14px; height: 14px; }
.wizard-steps li.current { color: var(--fg); font-weight: var(--fw-semibold); }
.wizard-steps li.current .wizard-num { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.wizard-steps li.done .wizard-num { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.b24-help h2 { font-size: var(--fs-lg); }
.b24-howto { margin: 0; padding-left: var(--s5); line-height: var(--lh-body); }
.b24-howto li + li { margin-top: var(--s2); }
.wizard details[open] summary { margin-bottom: var(--s1); }

/* ---------- таблица каналов (все правила — под .ch-table/.ch-bar, чтобы не задевать чужие экраны) ---------- */
.ch-table .row-title a.muted { display: inline-flex; vertical-align: middle; }
.ch-table .row-title a.muted .icon { width: 14px; height: 14px; }
/* действия строки переносятся: на 1280 таблица помещается без прокрутки */
.ch-table td:last-child .actions { flex-wrap: wrap; gap: var(--s1) var(--s2); }
.ch-table td .small .icon { width: 13px; height: 13px; vertical-align: -2px; }
.ch-bar .toolbar { flex: 1 1 260px; justify-content: flex-end; }
.ch-bar .toolbar input[type="search"] { max-width: 320px; }

@media (max-width: 640px) {
  .ch-bar .toolbar { justify-content: stretch; }
  .ch-bar .toolbar input[type="search"] { max-width: none; }
  .wizard-steps { gap: var(--s2) var(--s3); }
  .wizard-steps li > span:last-child { font-size: var(--fs-xs); }
}
/* узкие колонки не сжимают название канала в столбик букв */
.ch-table td:first-child { min-width: 190px; }
.ch-table td:nth-child(4) { min-width: 150px; }
@media (max-width: 640px) {
  .ch-table td:first-child, .ch-table td:nth-child(4) { min-width: 0; }
}
