/* TabBar —— 底部频道栏（Figma 1887:1271）。
   高 58 = padding 3 × 2 + 项高 52；5 项各 75 宽。
   标签用 caption 档（12/20），选中 #009538、未选中 #959D98（设计稿字面值）。

   生产环境由小程序 app.json 的 tabBar 承担，本组件用于原型与 HTML 侧。 */

.mzh-tab-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--tab-bar-height);
  padding: var(--tab-bar-padding-y) 0;
  background: var(--tab-bar-bg);
  /* 上圆角 30（设计稿实测一致）：缺口处露出的是页面灰底 */
  border-top-left-radius: var(--tab-bar-radius-top);
  border-top-right-radius: var(--tab-bar-radius-top);
}

/* 轻提示：只在「该频道页面还没做」时出现。
   绝对定位，不参与布局，也不影响几何校验。 */
.mzh-tab-bar__toast {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + var(--tab-bar-toast-offset));
  /* left/right:0 + margin:auto + fit-content 居中：不需要百分比，也不需要 translate */
  width: fit-content;
  margin: 0 auto;
  z-index: var(--tab-bar-toast-z);
  padding: var(--tab-bar-toast-pad-y) var(--tab-bar-toast-pad-x);
  border-radius: var(--tab-bar-toast-radius);
  background: var(--tab-bar-toast-bg);
  color: var(--tab-bar-toast-fg);
  font-size: var(--typography-caption-font-size);
  line-height: var(--typography-caption-line-height);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mzh-tab-bar__toast--show {
  opacity: 1;
}

.mzh-tab-bar__item {
  /* 等分：375 下 375/5 = 75 ✓ 与设计稿一致；窄屏（360）也不会溢出 */
  flex: 1 1 0;
  min-width: 0;
  height: var(--tab-bar-item-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.mzh-tab-bar__icon {
  flex: none;
  width: var(--tab-bar-icon-size);
  height: var(--tab-bar-icon-size);
  object-fit: contain;
}

.mzh-tab-bar__label {
  flex: none;
  font-size: var(--typography-caption-font-size);
  line-height: var(--typography-caption-line-height);
  color: var(--tab-bar-fg);
}

.mzh-tab-bar__item--active .mzh-tab-bar__label {
  color: var(--tab-bar-fg-active);
}
