/*
 * design-system/components/app-header.css
 * Editorial Calm — AppHeader. ТЗ 4.10.
 *
 * Единый хедер на всех экранах кроме главной (на главной — упрощённый
 * вариант без хлебных крошек).
 *
 * Структура:
 *   [logo] · [breadcrumbs] · [search] · [pulse · profile]
 *   sticky top:0, z-index --z-sticky, height 64px,
 *   border-bottom 1px solid --rule
 *
 * Использование (через partial templates/components/_app_header.html):
 *   {% include "components/_app_header.html" with city=city, role=role %}
 */

[data-theme="editorial"] .ed-app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: 64px;
  padding: 0 var(--s-6);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

/* Логотип-вордмарк слева */
[data-theme="editorial"] .ed-app-header__logo {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
[data-theme="editorial"] .ed-app-header__logo:focus-visible {
  outline: 0;
  box-shadow: var(--shadow-focus);
  border-radius: var(--r-2);
}

/* Хлебные крошки в центре-слева */
[data-theme="editorial"] .ed-app-header__crumbs {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-3);
  flex: 0 1 auto;
  min-width: 0;
}
[data-theme="editorial"] .ed-app-header__crumbs a {
  color: var(--ink-3);
  text-decoration: none;
}
[data-theme="editorial"] .ed-app-header__crumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
[data-theme="editorial"] .ed-app-header__crumbs strong {
  font-weight: 500;
  color: var(--ink);
}
[data-theme="editorial"] .ed-app-header__crumbs__sep {
  opacity: 0.4;
  user-select: none;
}

/* Spacer для распределения */
[data-theme="editorial"] .ed-app-header__spacer { flex: 1; }

/* Правая зона: поиск + меню */
[data-theme="editorial"] .ed-app-header__right {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

[data-theme="editorial"] .ed-app-header__menu-item {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 36px;
  padding: 0 var(--s-3);
  background: transparent;
  border: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--r-2);
  transition: color var(--motion-fast) var(--ease),
              background-color var(--motion-fast) var(--ease);
}
[data-theme="editorial"] .ed-app-header__menu-item:hover { color: var(--ink); background: var(--paper-2); }
[data-theme="editorial"] .ed-app-header__menu-item:focus-visible { outline: 0; box-shadow: var(--shadow-focus); }
[data-theme="editorial"] .ed-app-header__menu-item svg {
  width: 16px; height: 16px; stroke-width: 1.5;
}

/* Адаптация — на узких экранах прячем breadcrumbs */
@media (max-width: 767px) {
  [data-theme="editorial"] .ed-app-header { padding: 0 var(--s-4); gap: var(--s-3); }
  [data-theme="editorial"] .ed-app-header__crumbs { display: none; }
  [data-theme="editorial"] .ed-search-trigger { min-width: 0; }
  [data-theme="editorial"] .ed-search-trigger > span { display: none; }
}
