/* v2-bot47.css — docs/47 W4: «Ответ для бота» (шторка/панель, MobileFix.dc.html) и «Каналы бота»
 * (Channels.dc.html). Только токены дизайн-системы v2 (tokens.css); коралл — только главная кнопка. */

/* ═════════════ «Ответ для бота» ═════════════ */
.bga { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.bga__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 2px 16px 10px;
}
.v2-sheet--side .bga__head { padding: 6px 24px 12px; }
.bga__title { margin: 0; font-size: 20px; line-height: 26px; font-weight: var(--weight-semibold); letter-spacing: -0.01em; color: var(--text); }
.bga__content {
  display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain; padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px));
}
.v2-sheet--side .bga__content { padding: 0 24px 24px; }

.bga__q {
  display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px;
  background: var(--st-work-bg);
}
.bga__q-meta { font-size: 12px; line-height: 16px; font-weight: var(--weight-semibold); color: var(--st-work-fg); }
.bga__q-text { font-size: 15px; line-height: 20px; font-weight: var(--weight-semibold); color: var(--text); overflow-wrap: anywhere; }
.bga__q-sim { font-size: 13px; line-height: 18px; color: var(--text-muted); overflow-wrap: anywhere; }

.bga__field { display: flex; flex-direction: column; gap: 6px; }
.bga__label { font-size: 13px; line-height: 18px; color: var(--text-muted); }
.bga__input {
  box-sizing: border-box; width: 100%; padding: 12px; border-radius: 14px; border: 1px solid var(--border-strong);
  background: var(--surface); font: inherit; font-size: 16px; line-height: 22px; color: var(--text); resize: none;
}
.bga__input:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-color: var(--text-faint); }
.bga__tr { display: flex; flex-direction: column; gap: 10px; }
.bga__tr[hidden] { display: none; }

.bga__use { display: flex; flex-direction: column; gap: 6px; }
.bga__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bga-chip {
  min-height: 32px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 13px; line-height: 16px;
}
.bga-chip--on { background: var(--text); color: var(--surface); border-color: var(--text); font-weight: var(--weight-semibold); }
.bga-chip--btn { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.bga-chip--btn:active { background: var(--surface-hover); }
.bga-chip--btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.bga-chip--btn.is-loading { opacity: .6; }
@media (hover: hover) and (pointer: fine) { .bga-chip--btn:hover { background: var(--surface-hover); } }

.bga__pv {
  display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--border-subtle);
}
.bga__cap { font-size: 11px; line-height: 14px; font-weight: var(--weight-semibold); letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.bga__pv-body { display: flex; flex-direction: column; gap: 8px; }
.bga__pv-lang { font-size: 12px; line-height: 16px; color: var(--text-faint); margin-top: 2px; }
.bga-bubble {
  max-width: 86%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 20px;
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.bga-bubble--client { align-self: flex-end; background: var(--surface); border: 1px solid var(--border); border-bottom-right-radius: 6px; color: var(--text); }
.bga-bubble--bot { align-self: flex-start; background: var(--text); color: var(--surface); border-bottom-left-radius: 6px; }
.bga-bubble--empty { align-self: flex-start; background: var(--surface-sunken); color: var(--text-faint); border-bottom-left-radius: 6px; }

.bga__actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.bga__confirm {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px;
  background: var(--surface-sunken); font-size: 13px; line-height: 18px; color: var(--text); cursor: pointer;
}
.bga__confirm input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--text); }
.bga__primary.btn, .bga__secondary.btn { width: 100%; min-height: 48px; border-radius: 10px; font-size: 16px; }
.bga__secondary.btn { min-height: 44px; font-size: 15px; }
.bga__err { margin: 0; font-size: 13px; line-height: 18px; color: var(--neg-600); }
.bga__err[hidden] { display: none; }

/* подложка маршрута #/bot/<id>/answer */
.bga-page { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.bga-page__title { margin: 0; font-size: 24px; line-height: 30px; font-weight: var(--weight-semibold); letter-spacing: -0.02em; color: var(--text); }
.bga-page__back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 32px;
  font-size: 14px; line-height: 20px; color: var(--text-muted); text-decoration: none;
}
.bga-page__back .icon { width: 16px; height: 16px; stroke-width: 2; }
.bga-page__back:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 8px; }

/* ═════════════ «Каналы бота» ═════════════ */
.bch { display: flex; flex-direction: column; gap: 16px; padding: 8px 0 24px; }
.bch__head { display: flex; flex-direction: column; gap: 6px; }
.bch__title { margin: 0; font-size: 24px; line-height: 30px; font-weight: var(--weight-semibold); letter-spacing: -0.02em; color: var(--text); }
.bch__sub { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-muted); }
.bch__grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) {
  .bch__title { font-size: 28px; line-height: 34px; }
  .bch__grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}
.bch-card {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); min-width: 0;
}
.bch-card__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bch-card__ic {
  width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--surface-sunken); color: var(--text);
}
.bch-card__ic .icon { width: 20px; height: 20px; stroke-width: 1.8; }
.bch-card__who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bch-card__title { margin: 0; font-size: 16px; line-height: 22px; font-weight: var(--weight-semibold); color: var(--text); }
.bch-card__detail { font-size: 13px; line-height: 18px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bch-pill {
  flex: none; display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; line-height: 16px; font-weight: var(--weight-semibold); white-space: nowrap;
  background: var(--surface-sunken); color: var(--text-muted);
}
.bch-pill--on { background: var(--st-won-bg); color: var(--st-won-fg); }
.bch-card__stat { font-size: 14px; line-height: 20px; color: var(--text); }
.bch-card__how { margin: 0; font-size: 13px; line-height: 18px; color: var(--text-faint); }
.bch-card__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: auto; }
.bch-btn.btn { min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 14px; text-decoration: none; }
.bch-link {
  display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; line-height: 20px;
  color: var(--link); text-decoration: none;
}
.bch-link:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 8px; }
@media (hover: hover) and (pointer: fine) { .bch-link:hover { text-decoration: underline; } }

.bch-book {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
}
.bch-book__title { margin: 0; font-size: 16px; line-height: 22px; font-weight: var(--weight-semibold); color: var(--text); }
.bch-book__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bch-chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); font-size: 13px; line-height: 16px; color: var(--text); max-width: 100%;
}
.bch-chip--on { background: var(--surface-sunken); border-color: transparent; }

.bch-sheet__body { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.v2-sheet--side .bch-sheet__body { padding: 0 24px 24px; }
.bch-qr { align-self: center; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.bch-qr svg { display: block; width: 200px; height: 200px; }
.bch-url { font-size: 15px; line-height: 20px; color: var(--text); text-align: center; overflow-wrap: anywhere; }
.bch-sheet .bch-btn.btn { width: 100%; min-height: 48px; font-size: 16px; }

/* вход «Каналы бота» на шаге «Проверка и запуск» — как .bi-entry (свой класс: тесты ищут единственный .bi-entry) */
.bch-entry {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
  font: inherit; text-align: left; color: var(--text); cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.bch-entry:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
@media (hover: hover) and (pointer: fine) { .bch-entry:hover { background: var(--surface-hover); } }
.bch-entry__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bch-entry__sub { font-size: 13px; line-height: 18px; color: var(--text-muted); overflow-wrap: anywhere; }
.bch-entry .v2f-chev { width: 18px; height: 18px; color: var(--text-faint); flex: none; }
.bch-entry__name { font-size: 15px; font-weight: var(--weight-semibold); color: var(--text); }
