/* ============================================================
 * mobile-touch.css - 触控交互优化（窗口13，独占）
 * 仅 <=768px 生效：44px触控区、:active反馈、左滑删除、下拉刷新、加载条。
 * ============================================================ */

/* 去除iOS点击灰色高亮 */
* { -webkit-tap-highlight-color: transparent; }

@media (max-width: 768px) {

  /* ---------- 可点击区域 >=44x44 ---------- */
  a, button, .btn, .navbar-search-input,
  [role="button"], .swipe-item, .m-tabbar-item,
  input[type="checkbox"], input[type="radio"] {
    min-width: 44px;
    min-height: 44px;
  }
  /* 纯图标按钮保证尺寸 */
  .icon-btn, .close-btn, .menu-toggle {
    width: 44px !important;
    height: 44px !important;
  }

  /* ---------- 点击反馈：透明度/缩放 ---------- */
  .btn:active, a:active, button:active {
    opacity: .7;
  }
  .btn-primary:active { transform: scale(.97); }

  /* ---------- 左滑删除 ---------- */
  .swipe-item {
    position: relative;
    overflow: hidden;
    background: #fff;
  }
  .swipe-item .swipe-del {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 72px;
    background: #e74c3c;
    color: #fff;
    border: none;
    font-size: 14px;
  }
  /* 桌面端删除按钮常显（<=768才隐藏待滑出） */
  @media (min-width: 769px) {
    .swipe-item .swipe-del { position: static; width: auto; }
  }

  /* ---------- 下拉刷新条 ---------- */
  .m-pullbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1003;
    height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f7f8fa;
    color: #888;
    font-size: 13px;
    transition: height .25s ease;
  }
  .m-pullbar .m-pull-arrow { display: inline-block; transition: transform .2s; }
  .m-pullbar.loading .m-pull-arrow { display: none; }
  .m-pullbar.loading::before {
    content: '';
    width: 16px; height: 16px;
    border: 2px solid #ddd;
    border-top-color: #6C5CE7;
    border-radius: 50%;
    animation: mspin .7s linear infinite;
  }
  @keyframes mspin { to { transform: rotate(360deg); } }

  /* ---------- 上拉加载更多 ---------- */
  .m-inf-sentinel {
    display: none;
    padding: 14px 0;
    text-align: center;
    color: #999;
    font-size: 13px;
    gap: 6px;
    align-items: center;
    justify-content: center;
  }
  .m-inf-sentinel.show { display: flex; }
  .m-inf-spinner {
    width: 16px; height: 16px;
    border: 2px solid #ddd;
    border-top-color: #6C5CE7;
    border-radius: 50%;
    animation: mspin .7s linear infinite;
  }
}
