/**
 * SEO TOP — shell.css
 * Каркас: topbar, sidebar, layout, hamburger, brand, crosslisting
 * Подключай после design-system.css:
 * <link rel="stylesheet" href="/s/design-system.css">
 * <link rel="stylesheet" href="/s/shell.css">
 *
 * shared.js рендерит в #topbar и #sidebar — стили здесь.
 */

/* ══════════════════════════════════════════
   TOPBAR
══════════════════════════════════════════ */
.topbar {
  height: 52px;
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Гамбургер */
.hamburger {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  flex: none;
  color: var(--c-caption);
}
.hamburger:hover { background: var(--c-line); }
.hamburger .ic {
  width: 18px;
  height: 18px;
}

/* Бренд */
.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  text-decoration: none;
}
.brand-txt {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-title);
  line-height: 1;
}
.brand-sub {
  font-size: 9px;
  font-weight: 700;
  color: var(--c-brand);
  letter-spacing: .12em;
  line-height: 1;
}

/* Индикатор фонового процесса (сканирование сайта, кластеризация и т.п.).
   Скрыт по умолчанию — включается через SEOTOP.setProcessStatus(label, percent). */
.topbar-process {
  display: none;
  align-items: center;
  gap: 8px;
  flex: none;
}
.topbar-process-label {
  font-size: 12px;
  color: var(--c-caption);
  white-space: nowrap;
}
.topbar-process-bar {
  width: 90px;
}

/* Переключатель окружений — зарезервированное место в вёрстке.
   Скрыт по умолчанию, функциональности пока нет (нет самого понятия
   "окружение" в проекте) — просто не занято другим компонентом на будущее. */
.topbar-env {
  display: none;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--c-bg);
  border-radius: var(--r-pill);
  flex: none;
}
.topbar-env-btn {
  height: 24px;
  padding: 0 10px;
  border: none;
  border-radius: var(--r-pill);
  background: none;
  color: var(--c-caption);
  font-size: 11px;
  font-family: var(--font);
  font-weight: var(--fw-medium);
  cursor: pointer;
}
.topbar-env-btn.active {
  background: #fff;
  color: var(--c-title);
  box-shadow: var(--shadow-sm);
}

/* Кросс-листинг / проект */
.crosslisting {
  position: relative;
  margin-left: auto;
  border-left: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  height: 100%;
  display: flex;
  align-items: center;
}
.crosslisting .box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  cursor: pointer;
  height: 100%;
}
.crosslisting .box:hover { background: var(--c-line); }
.crosslisting .l1 {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--c-caption);
  line-height: 1;
  text-transform: uppercase;
}
.crosslisting .l2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-title);
  line-height: 1;
  margin-top: 3px;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Выпадашка кросс-листинга */
#xnav {
  display: none;
  position: absolute;
  top: 52px;
  right: 0;
  width: 220px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(31,51,73,.14);
  padding: 8px;
  z-index: 200;
}
#xnav a {
  display: block;
  padding: 7px 10px;
  text-decoration: none;
  color: var(--c-body);
  font-size: 12px;
  border-radius: 6px;
}
#xnav a:hover { background: var(--c-line); color: var(--c-brand); }

/* Колокольчик */
.bell {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  color: var(--c-caption);
  flex: none;
}
.bell:hover { background: var(--c-line); }
.bell .ic { width: 18px; height: 18px; }

/* ══════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════ */
.layout {
  display: flex;
  min-height: calc(100vh - 52px);
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.sidebar {
  width: 56px;
  background: #fff;
  border-right: 1px solid var(--c-border);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: none;
  overflow: hidden;
  transition: width .2s ease;
}

/* Развёрнутый сайдбар (гамбургер) */
.sidebar.expanded {
  width: 200px;
}

/* Иконка-ссылка в сайдбаре */
.icwrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  border-radius: 8px;
  padding: 0 9px;
  text-decoration: none;
  color: var(--c-caption);
  white-space: nowrap;
  overflow: hidden;
  flex: none;
}
.icwrap:hover {
  background: var(--c-line);
  color: var(--c-body);
}
.icwrap.active {
  background: var(--c-brand);
  color: #fff;
}
.icwrap .ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Подпись — скрыта в свёрнутом, видна в expanded */
.icwrap .lbl {
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transition: opacity .15s;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar.expanded .icwrap .lbl {
  opacity: 1;
}

/* ══════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════ */
.main {
  flex: 1;
  padding: 16px 20px 40px;
  background: var(--c-bg);
  min-width: 0;
}

/* ══════════════════════════════════════════
   УТИЛИТЫ КАРКАСА
══════════════════════════════════════════ */

/* Breadcrumb страницы */
.page-breadcrumb {
  font-size: 12px;
  color: var(--c-caption);
  margin-bottom: 6px;
}
.page-breadcrumb a {
  color: var(--c-caption);
  text-decoration: none;
}
.page-breadcrumb a:hover { color: var(--c-brand); }

/* Заголовок страницы (H1) */
.page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--c-title);
  margin-bottom: 14px;
}

/* Строка с датой справа */
.page-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.page-date {
  font-size: 12px;
  color: var(--c-caption);
}

/* Заголовок карточки — всегда капс */
.ds-card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-title);
  margin-bottom: 14px;
}
