/* ============================================================
   Общая обвязка сайта на странице веб-клиента (remote).
   Загружается ПОСЛЕ site.css/experience.css и style.css,
   чтобы аккуратно перевести экран подключения в обычный поток
   страницы с общей шапкой и подвалом. Сессия остаётся на весь экран.
   ============================================================ */

/* тело страницы — обычный прокручиваемый документ с фоном сайта */
body {
  height: auto;
  min-height: 100vh;
  width: auto;
  overflow: hidden auto;
  display: flex;
  flex-direction: column;
  color: var(--ink, #10233f);
  background:
    radial-gradient(1100px 560px at 8% -12%, #d6f4fb 0%, transparent 55%),
    radial-gradient(820px 480px at 102% 4%, #d8f7ee 0%, transparent 52%),
    radial-gradient(700px 700px at 50% 120%, #e5f6fb 0%, transparent 60%),
    linear-gradient(180deg, #f0f9fc 0%, #eef5fb 45%, #e7f1f8 100%);
}

/* экран подключения — в обычном потоке между шапкой и подвалом */
#connectionPanel.panel {
  position: static;
  inset: auto;
  z-index: 1;
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 44px;
}
.desk-window { box-shadow: 0 18px 50px rgba(16, 35, 63, .16); }

/* просмотр удалённого экрана — поверх всего, на весь экран */
#viewerPanel.panel { position: fixed; z-index: 60; }

/* во время сессии прячем сайт-обвязку и запрещаем прокрутку */
body.inbound-direct #connectionPanel {
  display: none !important;
}
body.inbound-direct #contactsPane,
body.inbound-direct #contactsFab {
  display: none !important;
}

body:has(#viewerPanel.active) { overflow: hidden; }
body:has(#viewerPanel.active) .site-nav,
body:has(#viewerPanel.active) .site-footer,
body:has(#viewerPanel.active) .site-bg-orbs { display: none; }

/* подвал прижат к низу */
.site-footer { margin-top: auto; }

/* модалка входа и боковые панели остаются фиксированными поверх контента */
#loginModal.modal { z-index: 80; }
.side-panel { z-index: 70; }
.toast { z-index: 90; }

/* Без авторизации страница остаётся видимой и доступной для просмотра —
   не «гасим» её. Управление всё равно не разрешаем: подключение
   запрашивает вход (см. connect() и connectForm-guard в portal.js). */
body.auth-required #connectionPanel .desk-body,
body.auth-required #connectionPanel .desk-footer,
body.auth-required #contactsFab {
  pointer-events: auto;
  user-select: auto;
  filter: none;
  opacity: 1;
}
/* The remote-control surface is an application, not the gamified marketing
   journey. Hide numbered step badges/orbs and keep the login window focused. */
.site-bg-orbs,
.site-nav,
.site-footer {
    display: none !important;
}

.desk-logo-img {
    display: none !important;
}
