/* ============================================================
 * 企业微信标准 H5 布局（WeUI for Work）
 * - 全屏铺满，不再模拟 375×812 手机画板
 * - 顶部导航栏 / 右上角菜单由企业微信客户端原生提供：隐藏自绘状态栏与胶囊
 * - 保留底部 tabbar（H5 应用自己的页签），采用 WeUI 风格
 * ============================================================ */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #ededed;                 /* WeUI 标准页面底色 */
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body.prod .app-main.prod-main {
  display: block;
  width: 100%;
  min-height: 100vh;
  padding: 0;
  box-sizing: border-box;
}

body.prod .stage.prod-stage {
  width: 100%;
  max-width: none;
}

/* 手机画板外壳在企微 H5 中不存在：铺满屏幕 */
body.prod .phone {
  width: 100%;
  max-width: none;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

/* 隐藏原型遗留：桌面舞台条、假状态栏、假胶囊、假导航栏、安全条 */
body.prod .stage-bar,
body.prod .statusbar,
body.prod .capsule,
body.prod .safe-bar { display: none !important; }

/* 顶部导航：企业微信原生接管。普通浏览器里保留可见以便无企微环境验收，
   但在企微内由 JS 打标隐藏（见 12-wecom.js 的 html class）。 */
body.prod .navbar {
  height: 44px;
  line-height: 44px;
  background: #fff;
  position: relative;
}
html.in-wecom body.prod .navbar { display: none !important; }

/* 内容区：占满导航与页签之间的空间 */
body.prod .screen {
  position: relative;
  height: calc(100vh - 44px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
html.in-wecom body.prod .screen {
  height: 100vh;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* 底部页签：WeUI 风格 */
body.prod .tabbar.weui-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50px;
  background: #fff;
  border-top: 1px solid #d9d9d9;
  display: flex;
  z-index: 100;
}
body.prod .tabbar[hidden] { display: none !important; }
body.prod .tabbar .tabitem {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: #7a7a7a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
body.prod .tabbar .tabitem.weui-bar__item_on { color: #06ad56; }
body.prod .tabbar .tabitem.mid .midic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #06ad56;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -18px;
}

/* WeUI 按钮主色对齐企业微信绿 */
body.prod .btn.pri { background: #06ad56; border-color: #06ad56; }
