/**
 * app-layout.css — унифицированная структура приложения
 * app-shell: header | main_content (скролл) | nav-footer.
 * Сетка: header в потоке сверху, main под ним, footer внизу.
 * Когда header получает .fixed (position: fixed при скролле), резервируем место через padding-top у main.
 */

html {
  height: 100%;
  overflow: hidden;
}

body {
  height: 100%;
  overflow: hidden;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
}

.app-shell > header {
  flex: 0 0 auto;
  min-height: var(--LUVIO-header-height, 64px);
}

.app-shell .main_content {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Когда header фиксирован при скролле — резервируем место, чтобы контент не уходил под header */
.app-shell.header-is-fixed .main_content {
  padding-top: var(--LUVIO-header-height, 64px);
}

/* footer внутри shell — в потоке (переопределяем position:fixed из style.css) */
.app-shell > .footer-nav {
  flex: 0 0 auto;
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  max-width: 100%;
}

/* landing: без header и footer, main на весь экран */
.app-shell:not(:has(header)) .main_content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* auth / onboarding-intro: header и nav в DOM, скрыты */
.app-shell--auth > header,
.app-shell--auth > .footer-nav,
.app-shell--onboarding-intro > header,
.app-shell--onboarding-intro > .footer-nav {
  display: none;
}

/* auth: на мобильных показываем header (логотип) */
@media (max-width: 991px) {
  .app-shell--auth > header {
    display: flex;
  }
}

/* auth/otp: main_content — flex, скролл только внутри .site_content.auth-page */
.app-shell--auth .main_content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 0;
  overflow: hidden;
}

/* site_content.auth-page: всё ограничено внутри этого блока, скролл только здесь */
.app-shell--auth .main_content .site_content.auth-page {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* site_content: по высоте по максимуму, overflow → скролл в main */
.app-shell .main_content .site_content {
  min-height: 100%;
  box-sizing: border-box;
}

/* Спец. страницы: без скролла, контент на всю высоту (home-simple, chat) */
.app-shell:has(.site_content.home-simple) .main_content,
.app-shell:has(.site_content.chat-screen) .main_content {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-shell:has(.site_content.home-simple) .site_content.home-simple,
.app-shell:has(.site_content.chat-screen) .site_content.chat-screen {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Cookie banner (GDPR): fixed at bottom, shown when no consent saved */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.cookie-banner.cookie-banner--visible {
  display: block;
}
.cookie-banner-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.cookie-banner-text {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}
.cookie-banner-text a {
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.cookie-banner-actions .skip-btn,
.cookie-banner-actions .next-btn {
  padding: 0.5rem 1rem;
}
