/*
 * Все уведомления Lampa (Lampa.Noty: и Lampa, и плагинов Skaz, и пакета) — в том же виде, что карточка загрузки
 * (update.js BSBoot): тёмная карточка внизу по центру, слева цветная точка (обычное — зелёная, ошибка — красная).
 * Раньше — зелёная полоса Lampa во всю ширину, потом тихая плашка в правом углу. Не забирает пульт, гаснет сама.
 * !important и html body — потому что app.css Lampa подгружается позже нашего файла.
 */
html body .noty {
  left: 50% !important;
  right: auto !important;
  bottom: 8% !important;
  min-width: 22em !important;
  max-width: 64% !important;
  max-height: 60% !important;
  overflow: hidden !important;
  background: rgba(12, 14, 22, 0.82) !important;
  color: #fff !important;
  border-radius: 1.1em !important;
  box-shadow: 0 0.5em 2.2em rgba(0, 0, 0, 0.4) !important;
  -webkit-backdrop-filter: none !important;
          backdrop-filter: none !important;
  pointer-events: none !important;
  -webkit-transform: translate(-50%, 1.2em) !important;
          transform: translate(-50%, 1.2em) !important;
}
html body .noty.noty--visible {
  -webkit-transform: translate(-50%, 0) !important;
          transform: translate(-50%, 0) !important;
}
html body .noty .noty__body {
  padding: 0.9em 1.6em 0.95em !important;
  text-align: center !important;
}
html body .noty .noty__text {
  font-size: 1.1em !important;
  line-height: 1.4 !important;
}
html body .noty .noty__text:before {
  content: '';
  display: inline-block;
  vertical-align: 0.1em;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.7em;
  border-radius: 50%;
  background: #65eaa7;
}
html body .noty.noty--style--error .noty__text:before { background: #ff7b6e; }
/* панель плеера видна — уведомления над ней, не на кнопках */
html body.bs-panel-up .noty,
html body.bs-panel-up .bs-toast {
  bottom: 8.5em !important;
}

/* Окно поверх плеера: отсчёт до следующей серии, «Вы ещё смотрите?» (bswatch.js). Над панелью плеера, справа. */
.bs-overlay {
  position: fixed;
  right: 2.2em;
  bottom: 9.5em;
  z-index: 1000;
  max-width: 40%;
  padding: 0.9em 1.3em;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  border-radius: 0.6em;
  pointer-events: none;
}
.bs-overlay__title { font-size: 1.5em; line-height: 1.3; }
.bs-overlay__hint { margin-top: 0.35em; font-size: 0.95em; opacity: 0.75; }
/* «Продолжить или сначала»: по центру экрана, две кнопки одна под другой, выбранная — в рамке (как в других плеерах) */
.bs-overlay--choice {
  top: 50%; left: 50%; right: auto; bottom: auto;
  transform: translate(-50%, -50%);
  max-width: none; width: 22em;
  padding: 0; background: none; text-align: center;
}
.bs-overlay--choice .bs-overlay__btn {
  margin: 0.7em 0; padding: 0.7em 1em; border-radius: 0.5em;
  font-size: 1.2em; text-transform: uppercase; letter-spacing: 0.04em;
  background: rgba(70, 70, 95, 0.85); border: 0.15em solid transparent;
}
.bs-overlay--choice .bs-overlay__btn.focus { background: rgba(60, 50, 80, 0.95); border-color: #ff2e7e; }
.bs-overlay--choice .bs-overlay__btn small { display: block; margin-top: 0.15em; font-size: 0.7em; text-transform: none; opacity: 0.7; }

/* Предыдущая и следующая серия по бокам от пуска/паузы (bswatch.js); «предыдущая» — тот же значок, зеркально */
.player-panel__center .bs-ep { margin: 0 0.5em; }
.player-panel__center .bs-btn-prev svg { -webkit-transform: scaleX(-1); transform: scaleX(-1); }

/* Подписка в плеере (bstg.js), как в YouTube: кнопка и когда выйдет следующая серия — слева в панели */
.bs-sub { display: flex; align-items: center; margin-left: 0.6em; }
.bs-sub__btn { width: auto !important; padding: 0 1.1em; border-radius: 2em; font-size: 0.95em; white-space: nowrap; background: rgba(255, 255, 255, 0.92); color: #000; }
.bs-sub__btn--on { background: rgba(255, 255, 255, 0.18); color: #fff; }
.bs-sub__next { margin-left: 0.9em; font-size: 0.85em; opacity: 0.8; white-space: nowrap; }

/* Своя «следующая серия» у Lampa (справа в панели) дублирует ⏭ у пуска/паузы — прячем; «Плейлист» остаётся */
.player-panel__playlist-buttons .player-panel__next { display: none !important; }

/* Плашка серии при запуске (bswatch.js): слева сверху, плавно, как в стриминговых сервисах */
.bs-ep-banner {
  position: fixed; left: 2.5em; top: 2.2em; z-index: 1000; pointer-events: none;
  padding: 0.8em 1.4em 0.9em 1.2em; border-left: 0.25em solid #ff2e7e; border-radius: 0.3em;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35)); color: #fff;
  opacity: 0; -webkit-transform: translateX(-1.5em); transform: translateX(-1.5em);
  -webkit-transition: opacity .5s, -webkit-transform .5s; transition: opacity .5s, transform .5s;
}
.bs-ep-banner--on { opacity: 1; -webkit-transform: none; transform: none; }
.bs-ep-banner__show { font-size: 0.95em; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.bs-ep-banner__ep { margin-top: 0.15em; font-size: 1.9em; font-weight: 700; }
.bs-ep-banner__name { margin-top: 0.2em; font-size: 1.05em; opacity: 0.85; max-width: 28em; }

/* Экранная клавиатура Lampa — современный вид: крупные скруглённые клавиши с промежутками, выбранная — белая,
   чуть крупнее; служебные — другим тоном; значки на выбранной инвертируются, чтобы не пропадали на белом */
.simple-keyboard .hg-row { margin-bottom: 0.35em; }
.simple-keyboard .hg-button {
  margin: 0 0.18em; padding: 0.35em 0; border-radius: 0.35em;
  font-size: 1.9em; background: rgba(255, 255, 255, 0.08); color: #fff;
  -webkit-transition: background .12s, color .12s, -webkit-transform .12s; transition: background .12s, color .12s, transform .12s;
}
.simple-keyboard .hg-button.focus, .simple-keyboard .hg-button.hg-activeButton {
  background: #fff; color: #000;
  -webkit-transform: scale(1.08); transform: scale(1.08);
  -webkit-box-shadow: 0 0.2em 0.8em rgba(0, 0, 0, 0.5); box-shadow: 0 0.2em 0.8em rgba(0, 0, 0, 0.5);
}
.simple-keyboard .hg-button.focus:after { -webkit-filter: invert(1) !important; filter: invert(1) !important; }
/* Служебные клавиши («#+», микрофон, Aa) Lampa красит белым отдельным правилом - на белой выбранной
   клавише текст и значок пропадали. Выбранная клавиша - всегда тёмный текст и значок. */
.simple-keyboard .hg-button.focus, .simple-keyboard .hg-button.focus span,
.simple-keyboard .hg-button.hg-activeButton, .simple-keyboard .hg-button.hg-activeButton span { color: #000 !important; }
.simple-keyboard .hg-button.focus svg { color: #000 !important; fill: currentColor; }
.simple-keyboard .hg-button[data-skbtn^="{"] { background: rgba(255, 255, 255, 0.16); }
.simple-keyboard .hg-button[data-skbtn^="{"].focus { background: #fff; }
.search__keypad .simple-keyboard .hg-button-SPACE { min-width: 9em; }
.search__keypad { padding: 0.6em 1.5em 0.3em; }

/* Telegram: подключение с телефона по QR (bstg.js) */
.bs-tg-pair { display: flex; align-items: flex-start; }
.bs-tg-pair__side { flex: 0 0 auto; }
.bs-tg-pair__hint { width: 13.2em; margin-top: 0.6em; font-size: 0.85em; line-height: 1.3; text-align: center; opacity: 0.8; }
.bs-tg-pair__qr { flex: 0 0 auto; width: 12em; height: 12em; padding: 0.6em; background: #fff; border-radius: 0.5em; }
.bs-tg-pair__qr svg, .bs-tg-pair__qr img { width: 100%; height: 100%; display: block; }
.bs-tg-pair__steps { margin-left: 1.4em; font-size: 0.95em; line-height: 1.4; }
.bs-tg-pair__steps p { margin: 0 0 0.6em; }
.bs-tg-pair__url { margin-top: 0.4em; font-size: 0.8em; opacity: 0.6; word-break: break-all; }
.bs-tg-pair__status { margin-top: 0.8em; padding: 0.5em 0.8em; border-radius: 0.4em; background: rgba(255, 255, 255, 0.1); }

/* Telegram: код подключения ещё одного ТВ */
.bs-tg-join__code { font-size: 3em; font-weight: 700; letter-spacing: .12em; text-align: center; margin: .3em 0 .4em; }

/* Поиск: QR Telegram-бота под клавиатурой */
/* поиск: набрали текст и ушли к результатам - экранная клавиатура прячется (bstg.js, searchKeypad) */
body.bs-kb-hidden .search__keypad { display: none; }
.bs-search-tg { display: flex; align-items: center; margin: 1em 0 1.2em; padding: 0.8em 1em; background: rgba(255, 255, 255, 0.06); border-radius: 0.8em; }
.bs-search-tg__qr { flex: 0 0 auto; margin-right: 1.2em; width: 7.5em; height: 7.5em; padding: 0.35em; background: #fff; border-radius: 0.4em; }
.bs-search-tg__qr svg, .bs-search-tg__qr img { width: 100%; height: 100%; display: block; }
.bs-search-tg__text { font-size: 1.15em; line-height: 1.45; opacity: 0.9; }
.bs-search-tg--off { padding: 0.6em 1em; }
.bs-search-tg--off .bs-search-tg__qr { display: none; }

/* Экран загрузки: наша карточка внизу (update.js BSBoot) — только до своего экрана загрузки Lampa, его не трогаем
 * (loader.js убирает карточку, когда появился .lp-step). Без gap и :has — старые ТВ (Tizen 2.x/3) их не знают. */
.bs-boot { position: fixed; left: 50%; bottom: 8%; z-index: 1000; min-width: 26em; max-width: 64%; padding: 1em 1.8em 1.15em;
    -webkit-transform: translateX(-50%); transform: translateX(-50%); border-radius: 1.1em; background: rgba(12, 14, 22, 0.62);
    box-shadow: 0 0.5em 2.2em rgba(0, 0, 0, 0.4); color: #fff; font-family: sans-serif; text-align: center;
    opacity: 1; -webkit-transition: opacity 0.45s; transition: opacity 0.45s; }
.bs-boot.is-gone { opacity: 0; }
.bs-boot__title { font-size: 1.4em; font-weight: 600; line-height: 1.3; }
.bs-boot__spin { display: inline-block; vertical-align: -0.12em; width: 0.85em; height: 0.85em; margin-right: 0.6em;
    border: 0.16em solid rgba(255, 255, 255, 0.25); border-top-color: #fff; border-radius: 50%;
    -webkit-animation: bs-spin 0.9s linear infinite; animation: bs-spin 0.9s linear infinite; }
.bs-boot__detail { margin-top: 0.35em; min-height: 1.25em; font-size: 1em; color: rgba(255, 255, 255, 0.62); }
.bs-boot__bar { position: relative; margin-top: 0.85em; height: 0.28em; border-radius: 0.3em; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.bs-boot__fill { height: 100%; width: 0; border-radius: 0.3em; background: #fff; -webkit-transition: width 0.3s; transition: width 0.3s; }
.bs-boot__bar.is-wait .bs-boot__fill { width: 32%; -webkit-animation: bs-wait 1.5s ease-in-out infinite; animation: bs-wait 1.5s ease-in-out infinite; }
.bs-boot.is-stop .bs-boot__spin, .bs-boot.is-stop .bs-boot__bar { display: none; }
.bs-boot.is-stop .bs-boot__title { color: #ff9a8f; }
@-webkit-keyframes bs-spin { to { -webkit-transform: rotate(360deg); } }
@keyframes bs-spin { to { transform: rotate(360deg); } }
@-webkit-keyframes bs-wait { 0% { -webkit-transform: translateX(-110%); } 100% { -webkit-transform: translateX(320%); } }
@keyframes bs-wait { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }

/* Ошибка скрипта до запуска (loader.js bsError) — карточка над карточкой загрузки, а не красный текст поверх картинки */
.bs-boot-err { position: fixed; left: 50%; bottom: 22%; z-index: 1001; min-width: 26em; max-width: 70%; padding: 0.85em 1.6em 0.95em;
    -webkit-transform: translateX(-50%); transform: translateX(-50%); border-radius: 1.1em; background: rgba(12, 14, 22, 0.82);
    box-shadow: 0 0.5em 2.2em rgba(0, 0, 0, 0.4); color: #fff; font-family: sans-serif; text-align: center; }
.bs-boot-err__title { font-size: 1.15em; font-weight: 600; color: #ff9a8f; }
.bs-boot-err__title:before { content: ''; display: inline-block; vertical-align: 0.1em; width: 0.55em; height: 0.55em; margin-right: 0.6em;
    border-radius: 50%; background: #ff7b6e; }
.bs-boot-err__text { margin-top: 0.4em; font-family: monospace; font-size: 0.85em; color: rgba(255, 255, 255, 0.62);
    white-space: pre-wrap; word-break: break-all; }
