/* css/components/desktop-notice.css — Заслонка на узком экране (генератор работает только на компьютере).
   Порядок подключения всех стилей задан в layout/head.php — он важен. */
/* ===== ЗАСЛОНКА НА УЗКОМ ЭКРАНЕ (common/ui/desktop-notice.js) =====
   Генератор ниже 1000px закрывается: часть работы там физически
   недоступна (File System Access API, ZIP, встраивание метаданных), а
   полурабочий интерфейс хуже честного отказа. Закрываются ТОЛЬКО страницы
   генераторов — модуль подключается из четырёх точек входа; главная,
   About, Legal и User Guide остаются доступны на любом экране. */
/* Показывать или нет — решает МЕДИАЗАПРОС, а не JS (2026-08-28, вторая
   правка). Через слушатель resize с debounce это работало, но с заметной
   задержкой: debounce ждёт конца жеста, а главный поток страницы генератора
   в этот момент занят своим. Браузер же применяет медиазапрос мгновенно и
   бесплатно. JS только создаёт элемент и запоминает отказ.
   999.98px, а не 999px — чтобы не оставалось щели при дробном зуме. */
.desktop-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000; /* выше тултипов (9999) и модалок — под ней не должно
                      остаться ничего кликабельного */
  background: rgba(8, 12, 22, 0.97);
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

@media (max-width: 999.98px) {
  .desktop-gate { display: flex; }
  /* Класс вешается на body вместе с созданием заслонки и снимается при
     «Continue anyway»; на широком экране он висит, но ничего не делает. */
  body.has-desktop-gate { overflow: hidden; }
}

.desktop-gate-box {
  max-width: 460px;
  text-align: center;
  background: rgba(20, 28, 45, 0.95);
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-radius: 14px;
  padding: 32px 26px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.desktop-gate-icon { font-size: 44px; line-height: 1; margin-bottom: 14px; }

.desktop-gate-box h2 {
  font-size: 20px;
  color: #ffffff;
  margin: 0 0 14px;
}

.desktop-gate-box p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.desktop-gate-box strong { color: #ffffff; }

.desktop-gate-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
}

.desktop-gate-links a {
  color: var(--cyan);
  font-size: 14px;
  text-decoration: none;
}

.desktop-gate-links a:hover { text-decoration: underline; }

/* Намеренно мелкая и неяркая: выход есть (узкое окно браузера на большом
   мониторе — не телефон), но искать его надо осознанно. */
.desktop-gate-escape {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}

.desktop-gate-escape:hover { color: var(--text-muted); }

.migration-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1d4aaa;
  color: #fff;
  padding: 16px 28px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  line-height: 1.4;
  max-width: 90vw;
  z-index: 9999;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.migration-notice strong {
  font-weight: 700;
}
.migration-notice__close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}
.migration-notice__close:hover { opacity: 1; background: rgba(255, 255, 255, 0.25); }

