/* ===== 移动端全屏认证弹层（登录/注册/忘记密码共用）：与搜索弹层同一套淡入淡出模式，PC端强制隐藏兑底 ===== */
.mobile-auth-overlay {
  background: #fff;
  z-index: 106000;
}
.mobile-auth-overlay .ml-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-auth-overlay.is-open .ml-inner {
  opacity: 1;
}
.mobile-auth-overlay .ml-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  background: #fff;
  color: #666;
  cursor: pointer;
}
.mobile-auth-overlay .ml-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 28px;
}
/* 垂直居中方案（v3）：主内容包在.ml-main（margin:auto 0）——同一元素上下auto对称平分剩余空间实现真居中，内容超高时auto归0贴顶滚动。
   教训：v1单侧auto（找回密码无协议行，全空间推到标题上方→内容下坠305px）；v2 flex:1占位符先于auto margin吃光空间（flex分配优先级高于auto margin）→内容被压到底部 */
.mobile-auth-overlay .ml-main {
  margin: auto 0;
  display: flex;
  flex-direction: column;
}
.mobile-auth-overlay .ml-title {
  font-size: 30px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin: 0 0 28px;
}
.mobile-auth-overlay .ml-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  outline: none;
  background: #fff;
}
.mobile-auth-overlay .ml-field input:focus {
  border-color: var(--color-primary);
}
.mobile-auth-overlay .ml-field input::placeholder {
  color: #9ca3af;
}
/* 字段间距统一方案：错误占位p用:empty隐藏——之前min-height:18px常驻占用使带校验的字段（邮箱/密码）视觉间距比无占位符的字段（名/姓）多出22px，且按钮紧贴末字段；隐藏后全部字段统一由margin-top:16px控制节奏，错误出现时才占位 */
.mobile-auth-overlay .ml-field + .ml-field {
  margin-top: 16px;
}
.mobile-auth-overlay .ml-error {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #e02020;
}
.mobile-auth-overlay .ml-error:empty {
  display: none;
}
.mobile-auth-overlay .ml-forget {
  align-self: flex-end;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  margin: 16px 0 0;
}
.mobile-auth-overlay .ml-submit {
  width: 100%;
  padding: 14px;
  margin-top: 24px;
  border: none;
  border-radius: 4px;
  background: var(--color-primary);
  color: var(--color-text-on-primary, #fff);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}
.mobile-auth-overlay .ml-signup {
  align-self: center;
  margin-top: 22px;
  font-size: 14px;
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mobile-auth-overlay .ml-agree {
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #333;
}
.mobile-auth-overlay .ml-agree input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  margin: 0;
}
.mobile-auth-overlay .ml-agree label {
  margin: 0;
}
.mobile-auth-overlay .ml-agree a {
  color: #333;
}
.mobile-auth-overlay .ml-agree-error {
  text-align: center;
}
/* 找回密码弹层专属：验证码行（输入+发送同框）、密码可见性切换；命名前缀mrp避免与/reset_password页全局变量冲突 */
.mobile-auth-overlay .mrp-codewrap {
  display: flex;
  align-items: center;
  margin-top: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
}
.mobile-auth-overlay .mrp-codewrap:focus-within {
  border-color: var(--color-primary);
}
.mobile-auth-overlay .mrp-codewrap input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 14px;
  font-size: 14px;
  color: #333;
}
.mobile-auth-overlay .mrp-codewrap input::placeholder {
  color: #9ca3af;
}
.mobile-auth-overlay .mrp-sendbtn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--color-primary);
  cursor: pointer;
}
.mobile-auth-overlay .mrp-sendbtn:disabled {
  opacity: 0.5;
  cursor: default;
}
.mobile-auth-overlay .mrp-pwdwrap {
  position: relative;
  margin-top: 16px;
}
.mobile-auth-overlay .mrp-pwdwrap input {
  padding-right: 42px;
}
.mobile-auth-overlay .mrp-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: #6c757d;
  cursor: pointer;
}
@media (min-width: 768px) {
  .mobile-auth-overlay {
    display: none !important;
  }
}

/* ===== 移动端header用户头像：已登录时人形图标替换为黑底白字首字母圆形头像（mua-logged由mobile_auth.js注入，仅在≤767px且有token时添加） ===== */
.mua-avatar {
  display: none;
}
@media (max-width: 767px) {
  .header-brand-row .toggler1.mua-logged svg {
    display: none;
  }
  .header-brand-row .toggler1.mua-logged .mua-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
  }
}

/* ===== 移动端用户中心弹层：底部上滑面板（顶部留10%露页面），遮罩淡入+面板上滑，桌面端强制隐藏兑底 ===== */
.mua-sheet {
  position: fixed;
  inset: 0;
  z-index: 106000;
  display: none;
}
.mua-sheet .mua-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mua-sheet .mua-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 10%;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.mua-sheet.is-open .mua-sheet-mask {
  opacity: 1;
}
.mua-sheet.is-open .mua-sheet-panel {
  transform: translateY(0);
}
.mua-sheet .mua-sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  background: #fff;
  color: #666;
  cursor: pointer;
}
/* 单一滚动容器：body吃满剩余高度，内部纯文档流（抽屉布局惯例） */
.mua-sheet .mua-sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 44px 24px 28px;
}
.mua-sheet .mua-sheet-user {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mua-sheet .mua-sheet-avatar {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}
.mua-sheet .mua-sheet-email {
  margin: 16px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  word-break: break-all;
}
.mua-sheet .mua-sheet-status {
  margin: 6px 0 0;
  font-size: 13px;
  color: #9ca3af;
}
.mua-sheet .mua-sheet-nav {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mua-sheet .mua-sheet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 15px;
  color: #1a1a1a;
  text-decoration: none;
}
.mua-sheet .mua-sheet-item svg {
  flex-shrink: 0;
  color: #666;
}
.mua-sheet .mua-sheet-logout {
  width: 100%;
  margin-top: 12px;
  padding: 15px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  color: #1a1a1a;
  text-align: center;
  cursor: pointer;
}
@media (min-width: 768px) {
  .mua-sheet {
    display: none !important;
  }
}

/* ===== 移动端订单筛选（mof-）：搜索行改造 + 底部筛选弹层（JS 见 mobile_auth.js mof 模块） ===== */
/* 弹层骨架仿 mua-sheet：遮罩淡入 + 面板 translateY 滑上；固定 62% 屏高（原型半屏偏上） */
.mof-sheet {
  position: fixed;
  inset: 0;
  z-index: 106000; /* 与认证弹层同级，购物车抽屉(105000)之上 */
  display: none;
}
.mof-sheet .mof-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mof-sheet .mof-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.mof-sheet.is-open .mof-mask {
  opacity: 1;
}
.mof-sheet.is-open .mof-panel {
  transform: translateY(0);
}
/* 原型图3：标题行与选项区之间有 1px 分隔线 */
.mof-sheet .mof-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid #eee;
}
.mof-sheet .mof-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}
.mof-sheet .mof-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  background: #fff;
  color: #999;
  cursor: pointer;
}
/* 单一滚动容器惯例：body 吃满剩余高度，内部纯文档流 */
.mof-sheet .mof-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 20px 20px;
}
/* 原型 label：深色加粗常规大小写（"Order Status"），非浅灰大写字距样式 */
.mof-sheet .mof-label {
  margin: 12px 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}
/* 原型 chips：3 列等宽网格、白底 1px 描边、小圆角 */
.mof-sheet .mof-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mof-sheet .mof-chip {
  height: 44px;
  padding: 0 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
/* 选中态对齐原型图3 ALL：主题色描边 + 主题色文字 + 8% 主题色浅底（跟随主题） */
.mof-sheet .mof-chip.is-active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}
.mof-sheet .mof-footer {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid #eee;
}
.mof-sheet .mof-reset,
.mof-sheet .mof-apply {
  flex: 1;
  height: 46px;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
}
.mof-sheet .mof-reset {
  background: #fff;
  border: 1px solid #ddd;
  color: #1a1a1a;
}
.mof-sheet .mof-apply {
  background: var(--color-primary);
  border: none;
  color: #fff;
}
/* PC 端兑底：弹层与注入的 Filter 按钮任何情况下不显示 */
@media (min-width: 768px) {
  .mof-sheet,
  #mofFilterBtn {
    display: none !important;
  }
}
/* 移动端搜索行：隐藏下拉框与搜索按钮，输入框直角+放大镜图标，Filter 按钮图标文字竖排 */
@media (max-width: 767px) {
  .orders .order-search {
    align-items: center;
    flex-wrap: nowrap;
  }
  .orders .order-search .inlineblock-nav1 {
    display: none;
  }
  /* width:auto 破除 orders.liquid 可能存在的固定宽，保证按钮不被挤出 overflow:hidden 容器 */
  .orders .order-search .inlineblock-nav2 {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
  .orders .order-search .serach-box {
    display: flex;
    width: 100%;
    min-width: 0;
  }
  .orders .order-search .serach-box button {
    display: none;
  }
  /* 原型：直角、白底浅灰描边、左侧放大镜图标（orders.liquid 的左圆角/padding 带 !important，此处反覆盖） */
  .orders .order-search .serach-box .form-control {
    border-radius: 0;
    border: 1px solid #ddd;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 16px 16px;
    padding-left: 36px;
    height: 40px;
    min-width: 0;
  }
  /* 原型：漏斗图标在上、文字在下竖排 */
  .mof-filter-btn {
    flex-shrink: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 52px;
    padding: 4px 0;
    border: none;
    background: transparent;
    color: #1a1a1a;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
  }
}
