/**
 * 社区 · 横向顶栏（步骤 1–13、17）
 *
 * 页面分区（自上而下 / 左到右）：
 * - .snapshot-zone-global-header  顶栏 52px
 * - .snapshot-zone-left-sidebar     左侧边栏 70px
 * - .snapshot-zone-right-pane       右侧内容区（导航轨 + .container）
 */

.snapshot-community-redesign {
  --snapshot-global-header-h: 52px;
  --snapshot-global-sidebar-w: 70px;
}

.snapshot-community-redesign #community {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 右侧内容区：二级/三级导航 + 帖子内容 */
.snapshot-community-redesign #community > .snapshot-community-right-pane {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.snapshot-community-redesign #community > .snapshot-community-right-pane > .container {
  width: 100% !important;
  max-width: 100% !important;
}

.snapshot-community-redesign .header .header-control {
  padding-right: var(--snapshot-header-control-padding-right, 27px) !important;
  box-sizing: border-box !important;
}

.snapshot-community-redesign #community .subHeader.snapshot-subheader-hidden,
.snapshot-community-redesign #community .subHeader .subHeader-fixedTop {
  display: none !important;
}

/* 防止旧顶栏误吸顶后与横向导航重叠 */
.snapshot-community-redesign #community .subHeader-fixedTop.snapshot-stuck-sub:not(.snapshot-community-hnav) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.snapshot-community-redesign #community .main {
  flex-direction: column !important;
  gap: 0 !important;
  width: 100% !important;
}

.snapshot-community-redesign #community .sidebar-container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  flex: none !important;
  box-sizing: border-box !important;
}

.snapshot-community-redesign #community .snapshot-community-nav-rail {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  box-sizing: border-box !important;
}

.snapshot-community-redesign #community .snapshot-stuck-rail {
  position: fixed !important;
  z-index: 40 !important;
  max-width: calc(100vw - 78px) !important;
  padding-right: 8px !important;
  box-sizing: border-box !important;
  background: var(--bg-dark-color) !important;
}

.snapshot-community-redesign #community .snapshot-stuck-rail .snapshot-community-hnav,
.snapshot-community-redesign #community .snapshot-stuck-rail .entry-head {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.snapshot-community-redesign #community .sidebar,
.snapshot-community-redesign #community .sidebar.snapshot-community-sidebar-h {
  width: 100% !important;
  max-width: 100% !important;
  flex-direction: row !important;
  align-items: stretch !important;
}

.snapshot-community-redesign #community .sidebar .el-affix,
.snapshot-community-redesign #community .sidebar .el-affix--fixed,
.snapshot-community-redesign #community .entry .el-affix,
.snapshot-community-redesign #community .entry .el-affix--fixed {
  position: static !important;
  transform: none !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  z-index: auto !important;
}

.snapshot-community-redesign #community .sidebar .tabView,
.snapshot-community-redesign #community .sidebar .tabView.snapshot-community-tabView-h {
  width: 100% !important;
  max-width: 100% !important;
  height: fit-content !important;
  align-self: flex-start !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.snapshot-community-redesign .layout-content-right-container.is-maxWidth:has(#community) {
  overflow-x: visible !important;
  box-sizing: border-box !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav,
.snapshot-community-redesign #community .snapshot-stuck-sub.snapshot-community-hnav {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: fit-content !important;
  align-self: flex-start !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: var(--bg-dark-color) !important;
  overflow: visible !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

.snapshot-community-redesign #community .snapshot-stuck-sub.snapshot-community-hnav {
  max-width: calc(100vw - 78px) !important;
  padding-right: 8px !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav .subHeader-fixedTop-left {
  display: contents !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav .header-title {
  grid-column: 1 !important;
  grid-row: 1 !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  flex-shrink: 0 !important;
  margin: 0 20px 0 0 !important;
  border: none !important;
  align-self: center !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav .header-title img {
  width: 24px !important;
  height: 24px !important;
  margin-top: 2px !important;
  opacity: 0 !important;
  flex-shrink: 0 !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav .header-title::after {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  width: 24px !important;
  height: 24px !important;
  margin-top: 1px !important;
  transform: translateY(-50%) !important;
  background: var(--gradient-text-color) !important;
  -webkit-mask-image: url(/pages/communityCenter/assets/icon-community-light.57b0f808.svg) !important;
  mask-image: url(/pages/communityCenter/assets/icon-community-light.57b0f808.svg) !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  pointer-events: none !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav .header-title span {
  font-size: 16px !important;
  font-weight: 500 !important;
  background: var(--gradient-text-color) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  white-space: nowrap !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav .tab-list.tab-flex {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: flex !important;
  flex: 1 1 0 !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav .tab-flex .tab-item {
  width: auto !important;
  min-width: 0 !important;
  padding: 6px 12px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-size: 14px !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav-actions {
  grid-column: 3 !important;
  grid-row: 1 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  min-width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
  justify-self: end !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav-search {
  flex: 0 1 auto !important;
  min-width: 0 !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav-search .el-input {
  width: clamp(100px, 14vw, 168px) !important;
  max-width: 168px !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav-sort .dropdown-fliter {
  height: 36px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  font-size: 13px !important;
}

.snapshot-community-redesign #community .snapshot-community-hnav-likes {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  height: 36px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  border-radius: 20px !important;
  border: 1px solid var(--assisting-gary-color) !important;
  background: var(--assisting-gary-color) !important;
  color: #fff !important;
  font-size: 13px !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

.snapshot-community-redesign #community .entry-head,
.snapshot-community-redesign #community .entry-head.snapshot-community-entry-head {
  justify-content: flex-start !important;
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 40px !important;
  box-sizing: border-box !important;
}

.snapshot-community-redesign #community .entry-head.snapshot-community-entry-head .entry-head-wrapper,
.snapshot-community-redesign #community .entry-head.snapshot-community-entry-head .entry-tabView {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.snapshot-community-redesign #community .entry-head-wrapper .tab-arrow {
  display: none !important;
}

.snapshot-community-redesign #community .main-right {
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 768px) {
  .snapshot-community-redesign #community .snapshot-community-hnav {
    column-gap: 10px !important;
  }

  .snapshot-community-redesign #community .snapshot-community-hnav .header-title {
    width: 100% !important;
    margin-right: 0 !important;
    padding-bottom: 4px !important;
  }

  .snapshot-community-redesign #community .snapshot-community-hnav-actions {
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  .snapshot-community-redesign #community .snapshot-community-hnav-search .el-input {
    width: 100% !important;
    max-width: none !important;
  }
}
