/* Beta bottom nav: Чаты / Настройки / Создать — одинаково на телефоне и ПК */

#chats-bottom-pill,
.chats-bottom-pill,
.chats-bottom-pill.mobile-only,
html.mobile-chat-pc-look #chats-bottom-pill,
body.mobile-chat-pc-look #chats-bottom-pill,
body.mobile-chat-pc-look .chats-bottom-pill.mobile-only,
html.xam-pc-layout #chats-bottom-pill,
html.xam-session-pending #chats-bottom-pill {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(-50%) !important;
  width: min(320px, calc(100% - 36px)) !important;
  max-width: none !important;
  height: auto !important;
  min-height: 64px !important;
  padding: 8px 10px !important;
  border-radius: 999px !important;
  background: #141416 !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 2px !important;
  z-index: 30 !important;
}

/* ПК: панель внизу сайдбара со списком чатов */
@media (min-width: 769px) {
  .sidebar #chats-bottom-pill,
  .messenger-container > .sidebar #chats-bottom-pill,
  html.xam-pc-layout #main-screen .messenger-container > .sidebar #chats-bottom-pill {
    display: flex !important;
    bottom: 16px !important;
    width: min(300px, calc(100% - 28px)) !important;
    z-index: 40 !important;
  }
}

.chats-bottom-pill-btn {
  flex: 1 1 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 52px !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #9e9e9e !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 6px 4px !important;
  position: relative !important;
  z-index: 2 !important;
}

.chats-bottom-pill-btn:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

.chats-bottom-pill-icon {
  display: inline-flex !important;
  width: 26px !important;
  height: 26px !important;
  align-items: center !important;
  justify-content: center !important;
}

.chats-bottom-pill-icon svg {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
}

.chats-bottom-pill-label {
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  color: inherit !important;
}

.chats-bottom-pill-btn.is-active::before,
.create-bottom-pill-btn.is-active::before {
  content: none !important;
  display: none !important;
}

.chats-bottom-pill-btn.is-active {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--xam-ui-accent, #8774E1) !important;
}

.chats-bottom-pill-btn.is-active .chats-bottom-pill-label {
  color: var(--xam-ui-accent, #8774E1) !important;
}

.chats-bottom-pill-btn .chats-bottom-pill-icon-path {
  fill: currentColor !important;
}

.chats-bottom-pill-btn.is-active .chats-bottom-pill-icon-path {
  fill: url(#xam-nav-selected-grad) !important;
}

.chats-bottom-pill-btn:not(.is-active) .chats-bottom-pill-icon-path--soft {
  opacity: 0.45 !important;
}

/* Скрыть старую FAB (Flow + карандаш) везде */
.sidebar-compose-fab-wrap,
.sidebar-compose-fab-wrap.desktop-only,
html.mobile-chat-pc-look .sidebar-compose-fab-wrap,
body.mobile-chat-pc-look .sidebar-compose-fab-wrap,
html.xam-pc-layout .sidebar-compose-fab-wrap,
.sidebar-compose-duo {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Место под панель в списке */
.sidebar .sidebar-main-stack,
.sidebar-chats-row,
#chats-list.chats-list--drum,
.sidebar #chats-list {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
}

/* В настройках сайдбара панель можно спрятать */
.sidebar.sidebar--settings-open #chats-bottom-pill {
  display: none !important;
}

.messenger-container > .sidebar,
html.xam-pc-layout #main-screen .messenger-container > .sidebar {
  position: relative !important;
}


#chats-bottom-pill,
.chats-bottom-pill,
body.mobile-chat-pc-look #chats-bottom-pill,
html.xam-pc-layout #chats-bottom-pill {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25) !important;
  filter: none !important;
}
