/* ============================================================================
 * mobile-base.css —— t772m 手机端基座（出入库 / 人资共用一份 index.html）
 *
 * 目的：不重写页面，只在窄屏补三件最容易「挤 / 点不到 / 看不全」的事：
 *   ① 弹窗：小屏改为「顶部对齐 + 内部滚动」，避免高弹窗内容被裁掉、按钮点不到
 *   ② 表格内按钮：不再被全局 44px 最小高度撑成"大胖行"
 *   ③ 人资 15 个子页签：单行横向滚动，不再折成三四行挤在一起
 * 引导模式（#gm-root）自己有一套独立样式，这里所有选择器都不落在它里面。
 * ==========================================================================*/

/* ---------- ③ 人资子页签：单行横向滚动（平板竖屏/大屏手机也适用） ---------- */
@media (max-width: 768px) {
  .flex.flex-wrap.gap-1.bg-slate-100.p-1.rounded-lg {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .flex.flex-wrap.gap-1.bg-slate-100.p-1.rounded-lg::-webkit-scrollbar { display: none; }
  .flex.flex-wrap.gap-1.bg-slate-100.p-1.rounded-lg > button {
    flex-shrink: 0 !important;
  }
}

@media (max-width: 560px) {
  /* ---------- ① 弹窗：顶部对齐 + 可滚动 ---------- */
  [id$="-modal"],
  #fxe,
  #ops-wiz,
  #rc-pop {
    align-items: flex-start !important;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  [id$="-modal"] > div,
  #fxe > div,
  #ops-wiz > div,
  #rc-pop > div {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    max-height: calc(100vh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* ---------- ② 表格里的按钮不要被全局 44px 撑高 ---------- */
  table button,
  table .btn {
    min-height: 34px !important;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  /* ---------- 其它窄屏小修 ---------- */
  header .max-w-7xl { padding-left: 10px !important; padding-right: 10px !important; }
  header h1 { font-size: 15px !important; }
  .overflow-x-auto { -webkit-overflow-scrolling: touch; }
}
