/* Нижняя панель кабинета партнёра (tabbar.js). Только до 860 px: на компьютере меню сбоку. */
.tabbar { display: none; }

@media (max-width: 860px) {
  body.has-tabbar { --tabbar-h: calc(56px + env(safe-area-inset-bottom, 0px)); padding-bottom: var(--tabbar-h); }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; align-items: stretch; justify-content: space-around;
    height: var(--tabbar-h, 56px);
    padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
    border-top: 1px solid var(--border, #dfe6e0);
  }
  .tabbar[hidden] { display: none; }
  .tabbar-item {
    flex: 1 1 0; min-width: 0; max-width: 140px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    color: var(--muted, #5f6b63); text-decoration: none;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }
  .tabbar-item[hidden] { display: none; }
  .tabbar-ico {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 28px; border-radius: 14px; transition: background .15s;
  }
  .tabbar-label { font-size: .66rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
  .tabbar-item.is-active { color: var(--green-dark, #1b5e20); }
  .tabbar-item.is-active .tabbar-ico { background: var(--green-light, #e8f5e9); }
  .tabbar-item:focus-visible { outline: none; }
  .tabbar-item:focus-visible .tabbar-ico { box-shadow: var(--focus, 0 0 0 3px rgba(46, 125, 50, .28)); }

  /* Кнопка «Кабинет» в шапке отдельных страниц дублирует панель */
  body.has-tabbar #hdrCabinet { display: none; }
  /* Кнопки «Кабинет» больше нет — заголовку страницы хватает места */
  body.has-tabbar .topbar-name { display: block; }
  /* «Структура»: холст во всю высоту не должен уходить под панель */
  body.has-tabbar .net-shell { height: calc(100vh - var(--tabbar-h)); height: calc(100dvh - var(--tabbar-h)); }
  /* Всплывающие сообщения и панель выбора покупок — над панелью */
  body.has-tabbar .toast-host { bottom: calc(var(--tabbar-h) + 10px); }
  body.has-tabbar .glo-bulk { bottom: calc(var(--tabbar-h) + 10px); }
}

@media print { .tabbar { display: none !important; } }
