/* SPA shell overrides — full-bleed фон как у calendar/welcome (enotik layout). */

html, body {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body#theme-section,
body.theme-dark,
body.theme-light {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Контент-колонка уже ограничена .screen-shell; app всегда full-bleed */
#app.app.app--full-width {
  max-width: none;
  width: 100%;
  /* Безопасные отступы дают сами страницы / screen-main — не дублируем */
  padding-top: 0;
  padding-right: 0;
  padding-left: 0;
}

#shell-page-gradient.page-gradient,
#app.app--full-width > .page-gradient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#page-root.screen-content {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

#page-root .screen-shell {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-width: var(--shell-content-max);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Страницы кладут свой корень прямо в .screen-shell */
#page-root .screen-shell > .content,
#page-root .screen-shell > .scroll-area,
#page-root .screen-shell > #practice-root,
#page-root .screen-shell > .wizard-step {
  flex: 1 1 0;
  min-height: 0;
}

#page-root.is-swap {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

/* Иконки tab-bar: страховка от flash при SPA CSS-swap */
.tab-icon img,
#tab-bar img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-height: 26px !important;
  max-width: 40px !important;
}
.tab-item[data-tab="practice"] .tab-icon img {
  max-height: 31px !important;
}

.tab-bar--bleed {
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

/* Tab items в той же ширине, что и контент вкладок */
#app .tab-bar--bleed .tab-bar-inner {
  max-width: var(--shell-content-max);
}

/* Старые page-*.css могут задавать max-width на .app — не даём сузить фон */
.theme-dark .app.app--full-width,
.theme-light .app.app--full-width {
  max-width: none;
  width: 100%;
}

/* Градиенты из page CSS, если попали внутрь partial — прячем (фон у shell) */
#page-root .page-gradient {
  display: none !important;
}

[hidden] { display: none !important; }
