/**
 * R2 — F7 main tabs layout on home page.
 * ROOT-TABS-SANDBOX-STOP — click-only div.tabs only.
 */

#f7-app-root .f7-main-tabs-page {
  padding: 0 !important;
  padding-bottom: 0 !important;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

body.f7-profile-tab-active #f7-app-root .f7-main-tabs-page {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px) !important;
  position: relative;
  z-index: 540;
  isolation: isolate;
}

body.f7-profile-tab-active #f7-app-root .f7-main-tabs > #tab-settings.tab-active {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

/* ── Official F7 click-only root tabs (div.tabs + div.tab) ── */
#f7-app-root div.f7-main-tabs {
  width: 100%;
  height: 100%;
  min-height: 0;
}

#f7-app-root div.f7-main-tabs > .tab {
  display: none;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

#f7-app-root div.f7-main-tabs > .tab.tab-active {
  display: flex !important;
}

#f7-app-root div.f7-main-tabs > .tab.tab-panel {
  display: none !important;
}

#f7-app-root div.f7-main-tabs > .tab.tab-panel.tab-active {
  display: flex !important;
}

#f7-app-root div.f7-main-tabs > .tab.tab-panel.active:not(.tab-active) {
  display: none !important;
}

#f7-app-root .f7-main-tabs > .f7-tab-mount {
  display: none !important;
}

#f7-app-root #tab-feed,
#f7-app-root #tab-queue,
#f7-app-root #tab-group,
#f7-app-root #tab-chat,
#f7-app-root #tab-dm,
#f7-app-root #tab-settings {
  min-height: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* CHAT-HUB-F7-J2 — chat hub list inside #tab-dm (layout only) */
#f7-app-root #tab-dm .f7-chat-hub-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

#f7-app-root #tab-dm .f7-chat-hub-pinned {
  flex-shrink: 0;
}

#f7-app-root #tab-dm .f7-chat-hub-dm-divider {
  flex-shrink: 0;
  height: 1px;
  margin: 4px var(--tab-hdr-px, 16px) 2px;
  background: rgba(255, 255, 255, 0.1);
}

#f7-app-root #tab-dm .f7-chat-hub-common-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 106, 0, 0.18);
  border: 1px solid rgba(255, 106, 0, 0.28);
  box-sizing: border-box;
}

#f7-app-root #tab-dm .f7-chat-hub-common-row .item-title {
  font-weight: 800;
}

#f7-app-root #tab-dm .f7-chat-hub-dm-empty {
  padding: 14px 16px 8px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 600;
}

#f7-app-root #tab-queue .f7-queue-tab-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 2px 16px;
  min-height: 0;
}

#f7-app-root #tab-queue .f7-queue-tab-shell__title {
  margin: 0;
  font-size: var(--tab-hdr-fs, 20px);
  font-weight: var(--tab-hdr-fw, 800);
  color: var(--t1, #fff);
  line-height: 1.2;
}

#f7-app-root #tab-queue .f7-queue-tab-shell__hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.48);
  font-weight: 600;
}

#f7-app-root #tab-queue .f7-queue-tab-shell__subhint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.32);
  font-weight: 500;
}
