/**
 * TabBar 公共组件样式
 * - 固定图标容器尺寸，消除点击时的位移/跳动
 * - 统一 active 状态，仅颜色变化无尺寸变化
 * - 平滑过渡动画
 */

/* ====== TabBar 容器 ====== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ====== TabBar 项 - 关键：固定尺寸防跳动 ====== */
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* 固定高度，防止 active 时高度变化 */
  height: 50px;
  padding: 6px 0 4px;
  font-size: 10px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
  position: relative;
}

/* Active 状态 - 仅改变颜色，不改变任何尺寸 */
.tabbar-item.active {
  color: #22c55e;
}

/* 点击反馈：轻微缩放，无位移 */
.tabbar-item:active {
  opacity: 0.7;
}

/* ====== 图标容器 - 关键：固定宽高，内容居中 ====== */
.tabbar-icon {
  /* 固定尺寸！这是防止跳动的核心 */
  width: 24px;
  height: 22px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;

  /* SVG 图标固定尺寸 */
}
.tabbar-icon .ip-icon {
  width: 22px;
  height: 22px;
}

/* ====== 文字标签 ====== */
.tabbar-label {
  font-size: 10px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Active 标签加粗 */
.tabbar-item.active .tabbar-label {
  font-weight: 600;
}
