/* Спільні хедер і футер kyivska-22.
   Один файл на весь застосунок: і меню замовлення (/), і текстове меню
   (/menu/) підключають саме його, тож логотип, кнопки й типографіка
   скрізь однакові. Дані (назва, логотип) — з налаштувань. */

:root {
  --brand-h: 68px;
  /* Прозоро: хедер і футер показують фон самої сторінки, тож на
     вітальному екрані не читаються окремими смугами. Читабельність над
     контентом, що проїжджає під ними, дає розмиття, а не заливка. */
  --brand-bar: transparent;
  --brand-line: transparent;
  --brand-text: #f2f6fb;
  --brand-muted: rgba(242, 246, 251, 0.62);
  --brand-btn-line: rgba(255, 255, 255, 0.16);
}
[data-theme="light"] {
  --brand-bar: transparent;
  --brand-line: transparent;
  --brand-text: #0f172a;
  --brand-muted: rgba(15, 23, 42, 0.6);
  --brand-btn-line: rgba(15, 23, 42, 0.16);
}

/* Саме fixed, а не sticky: липкий елемент лишається в потоці й на деяких
   сторінках усе одно їде вгору разом зі скролом. Фіксований хедер завжди
   стоїть на місці, а місце під нього звільняє відступ у body нижче. */
/* Кнопки хедера — без прямокутного відблиску на дотик */
.brand-header a,
.brand-header button,
.brand-footer a { -webkit-tap-highlight-color: transparent; }

.brand-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  height: var(--brand-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  background: var(--brand-bar);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border-bottom: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--brand-text);
  min-width: 0;
}
.brand-logo img {
  height: 54px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  display: block;
}
.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Власний логотип містить назву — текст поруч ховаємо, щоб не двоїлося */
.brand-header.has-logo .brand-name { display: none; }

.brand-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* Кругла кнопка з іконкою — той самий розмір, що й у застосунку */
.brand-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--brand-btn-line);
  color: var(--brand-text);
  font-size: 17px;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}
.brand-icon-btn .ic { width: 19px; height: 19px; }
.brand-icon-btn:active { transform: scale(0.94); }
.brand-icon-btn:focus-visible {
  outline: 2px solid rgba(6, 182, 212, 0.75);
  outline-offset: 2px;
}

/* Іконки-маски: дублюємо мінімум із app.css, щоб хедер працював і на
   сторінках, де app.css не підключений (наприклад, текстове меню). */
.brand-header .ic,
.brand-footer .ic {
  display: inline-block;
  background-color: currentColor;
  flex: none;
  -webkit-mask: var(--ic) center / contain no-repeat;
          mask: var(--ic) center / contain no-repeat;
}
.ic-home { --ic: url(/assets/icons/home.svg); }
.ic-sun  { --ic: url(/assets/icons/sun.svg); }
.ic-moon { --ic: url(/assets/icons/moon.svg); }

.brand-footer {
  position: relative;
  z-index: 2;
  /* Без зовнішнього відступу: разом із внутрішнім він давав над телефоном
     смугу порожнечі заввишки 52 px, яка читалася зайвим блоком. */
  margin-top: 0;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--brand-bar);
  border-top: none;
  color: var(--brand-muted);
  font-size: 13px;
}
.brand-footer-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.5;
}
.brand-contacts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.brand-phone {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-text);
  text-decoration: none;
  border: none;
  letter-spacing: 0.02em;
}
.brand-address {
  font-size: 13px;
  color: var(--brand-muted);
  text-decoration: none;
  border: none;
}
.brand-credit { font-size: 12.5px; }

.brand-footer a {
  color: var(--brand-text);
  opacity: 0.85;
  text-decoration: none;
  border-bottom: 1px solid var(--brand-btn-line);
  padding-bottom: 1px;
}
.brand-footer a:hover { opacity: 1; }

/* Місце під фіксований хедер */
body { padding-top: var(--brand-h); }

@media (max-width: 400px) {
  .brand-logo img { height: 46px; max-width: 160px; }
  .brand-nav { gap: 6px; }
}
