/* 商拓邦 移动端公共组件样式：遮罩/toast/modal/popup/action-sheet/loading/城市选择/二维码弹层 */

/* ===== 遮罩 ===== */
.m_mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: none;
}
.m_mask.show { display: block; }

/* ===== toast ===== */
.m_toast {
  position: fixed;
  z-index: 2000;
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(17,17,17,.82);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: none;
}
.m_toast.show { display: block; }
.m_toast .iconfont { display: block; font-size: 34px; margin-bottom: 6px; }
.m_toast.success .iconfont { color: var(--brand); }

/* ===== loading ===== */
.m_loading {
  position: fixed;
  z-index: 2001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(17,17,17,.75);
  border-radius: 8px;
  padding: 16px 20px;
  color: #fff;
  font-size: 13px;
  display: none;
  align-items: center;
}
.m_loading.show { display: flex; }
.m_loading .m_spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  margin-right: 8px;
  animation: mspin .8s linear infinite;
}
@keyframes mspin { to { transform: rotate(360deg); } }

/* ===== modal（居中对话框） ===== */
.m_modal {
  position: fixed;
  z-index: 1500;
  width: 80%;
  max-width: 320px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}
.m_modal.show { display: block; }
.m_modal .m_modal_hd { padding: 20px 20px 8px; text-align: center; font-size: 16px; font-weight: 600; }
.m_modal .m_modal_bd { padding: 8px 20px 20px; text-align: center; color: var(--text-2); font-size: 14px; line-height: 1.6; max-height: 40vh; overflow-y: auto; word-break: break-word; }
.m_modal .m_modal_bd .big_price { color: #FF0000; font-weight: 600; }
.m_modal .m_modal_ft { display: flex; border-top: 1px solid #eee; }
.m_modal .m_modal_btn {
  flex: 1;
  height: 48px;
  line-height: 48px;
  text-align: center;
  font-size: 16px;
  background: #fff;
  border: 0;
}
.m_modal .m_modal_btn + .m_modal_btn { border-left: 1px solid #eee; }
.m_modal .m_modal_btn.primary { color: var(--brand); font-weight: 600; }
.m_modal .m_modal_btn.default { color: #333; }

/* ===== 底部 popup / action-sheet ===== */
.m_popup {
  position: fixed;
  z-index: 1500;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 12px 12px 0 0;
  max-height: 80vh;
  display: none;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .25s ease;
  padding-bottom: env(safe-area-inset-bottom);
}
.m_popup.show { display: flex; transform: translateY(0); }
.m_popup .m_popup_hd {
  height: 48px;
  line-height: 48px;
  text-align: center;
  font-size: 15px;
  position: relative;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.m_popup .m_popup_close {
  position: absolute;
  right: 0;
  top: 0;
  width: 48px;
  height: 48px;
  text-align: center;
  line-height: 48px;
  font-size: 18px;
  color: var(--text-3);
}
.m_popup .m_popup_bd { flex: 1; overflow-y: auto; padding: 12px 16px; }
.m_popup .m_popup_ft { flex-shrink: 0; padding: 10px 16px; border-top: 1px solid var(--line); }

.action_sheet .as_list { max-height: 50vh; overflow-y: auto; }
.action_sheet .as_item {
  height: 52px;
  line-height: 52px;
  text-align: center;
  font-size: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.action_sheet .as_item.primary { color: var(--brand); }
.action_sheet .as_item.danger { color: #f4645f; }
.action_sheet .as_cancel { height: 52px; line-height: 52px; text-align: center; font-size: 16px; background: #fff; border-radius: 12px 12px 0 0; margin-top: 6px; }
.as_wrap { padding-bottom: env(safe-area-inset-bottom); }

/* ===== 筛选抽屉（找群） ===== */
.filter_popup .m_popup_bd .f_group { margin-bottom: 16px; }
.filter_popup .f_title { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.filter_popup .f_tags span {
  display: inline-block;
  padding: 7px 14px;
  margin: 0 10px 10px 0;
  background: #f2f3f5;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-2);
}
.filter_popup .f_tags span.on { background: var(--brand); color: #fff; }
.filter_popup .f_btns { display: flex; gap: 10px; }
.filter_popup .f_btns .luckbtn { width: 50%; }

/* ===== 城市选择器 ===== */
.city_popup .city_body { display: flex; height: 52vh; }
.city_popup .city_provinces { width: 96px; background: #f7f8fa; overflow-y: auto; flex-shrink: 0; }
.city_popup .city_provinces .cp_item { padding: 13px 8px; font-size: 13px; text-align: center; color: var(--text-2); }
.city_popup .city_provinces .cp_item.on { background: #fff; color: var(--brand); font-weight: 600; position: relative; }
.city_popup .city_provinces .cp_item.on::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 16px;
  background: var(--brand);
  border-radius: 0 2px 2px 0;
}
.city_popup .city_cities { flex: 1; overflow-y: auto; padding: 6px 0; }
.city_popup .city_cities .cc_item { padding: 11px 16px; font-size: 14px; color: var(--text); }
.city_popup .city_cities .cc_item.on { color: var(--brand); }

/* ===== 二维码/海报弹层 ===== */
.qrcode_popup .m_popup_bd { text-align: center; padding: 20px; }
.qrcode_popup .qr_img { width: 220px; height: 220px; object-fit: cover; border: 1px solid #eee; border-radius: 6px; }
/* 长图海报：完整展示不裁切 */
.qrcode_popup .qr_img_poster { width: auto; max-width: 100%; height: auto; max-height: 60vh; object-fit: contain; }
.qrcode_popup .qr_msg { margin-top: 10px; font-size: 13px; color: var(--text-2); letter-spacing: 1px; }
.qrcode_popup .qr_tip { margin-top: 8px; font-size: 12px; color: var(--text-3); }

/* ===== 金币不足引导弹窗 ===== */
.gold_lack_modal .m_modal_bd { padding-top: 4px; }
.gold_lack_modal .gl_title { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.gold_lack_modal .gl_desc { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.gold_lack_modal .gl_btns { display: flex; gap: 10px; }
.gold_lack_modal .gl_btns .luckbtn { flex: 1; }

/* ===== 空态（大号，用于非卡片场景） ===== */
.m_empty { text-align: center; color: var(--text-4); font-size: 13px; padding: 40px 0; }
.m_empty img { width: 100px; margin-bottom: 8px; }

/* ===== 列表加载更多 ===== */
.m_loadmore { text-align: center; color: var(--text-4); font-size: 12px; padding: 16px 0; }

/* ===== 搜索框（顶部/页内） ===== */
.search_bar { background: #fff; padding: 8px 12px; }
.search_bar .search_box {
  background: #f7f8fa;
  height: 36px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  padding: 0 14px;
}
.search_bar .search_box .iconfont { color: var(--text-3); margin-right: 6px; font-size: 15px; }
.search_bar .search_box input { flex: 1; border: 0; background: transparent; outline: none; font-size: 14px; }
.search_bar .search_box button { border: 0; background: transparent; color: var(--brand); font-size: 14px; padding-left: 8px; }
.hot_words { padding: 14px 12px; }
.hot_words .hw_title { font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
.hot_words .hw_tags span {
  display: inline-block;
  background: #fff;
  border-radius: 14px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-2);
  margin: 0 10px 10px 0;
}
