/* 订单顶部沿用用户中心的白色通栏，搜索展开时保持外部尺寸不变。 */
.user-order-load-more { display: block; margin: 12px auto 24px; padding: 10px 18px; border: 0; background: transparent; color: #82758e; font: inherit; font-size: 12px; }
body.user-order-page {
  --order-topbar-top: 0px;
  --order-topbar-height: 58px;
  --order-topbar-control-size: 34px;
  /* iPhone 独立 App 顶部下拉时不要让页面产生橡皮筋回弹。 */
  overscroll-behavior-y: none !important;
  overscroll-behavior-x: none !important;
  touch-action: pan-y;
}

/* 固定顶部不受框架裁切影响，避免移动端边缘回弹时被遮住。 */
body.front-frame-page > .front-app-frame.user-order-page,
body.front-frame-page > .front-app-frame.user-order-page > .front-app-content,
body.front-frame-page > .front-app-frame.user-order-page > .front-app-content > .front-page-layer {
  overflow: visible !important;
}

body.user-order-page .user-page-shell,
body.front-frame-page > .front-app-frame.user-order-page .user-page-shell {
  width: min(410px, calc(100vw - 20px)) !important;
  padding-top: calc(var(--order-topbar-top) + var(--order-topbar-height) + 8px) !important;
}

body.user-order-page #orderSearchForm {
  position: fixed !important;
  top: var(--order-topbar-top) !important;
  left: 50% !important;
  right: auto !important;
  z-index: 1250 !important;
  display: grid !important;
  grid-template-columns: var(--order-topbar-control-size) minmax(0, 1fr) var(--order-topbar-control-size) !important;
  align-items: center !important;
  width: min(430px, 100vw) !important;
  max-width: none !important;
  height: var(--order-topbar-height) !important;
  min-height: var(--order-topbar-height) !important;
  margin: 0 !important;
  padding: 10px 18px 8px !important;
  box-sizing: border-box !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: translateX(-50%) !important;
}

body.user-order-page #orderSearchForm::after {
  display: none !important;
}

body.user-subpage .user-order-topbar > a,
body.user-subpage .user-order-topbar .user-order-top-actions,
body.user-subpage .user-order-topbar .user-order-top-actions button {
  position: relative;
  z-index: 2;
  display: grid !important;
  place-items: center;
  width: var(--order-topbar-control-size) !important;
  height: var(--order-topbar-control-size) !important;
  min-width: var(--order-topbar-control-size) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #2a2e35 !important;
}

body.user-subpage .user-order-topbar .user-order-top-actions {
  justify-self: end;
}
body.user-order-page #toggleOrderSearch {
  border: 1px solid #e2e5ea !important;
  background: #fff !important;
}

body.user-subpage .user-order-topbar .user-order-search-svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

body.user-subpage .user-order-title-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 34px;
  overflow: hidden;
}

body.user-subpage .user-order-title-slot > h1 {
  position: relative !important;
  left: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  overflow: hidden;
  color: #272b32 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: none !important;
  transition: opacity .22s ease, transform .22s ease;
}

body.user-subpage .user-order-search-field {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transform: scaleX(.84);
  transform-origin: center;
  transition: max-width .28s cubic-bezier(.22, .7, .2, 1), opacity .18s ease, transform .28s cubic-bezier(.22, .7, .2, 1), border-color .2s ease, background-color .2s ease;
}

body.user-subpage .user-order-search-field > input {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 0 9px 0 0;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  color: #30343a;
  font: inherit;
  font-size: 12px;
}

body.user-subpage .user-order-search-field > input:focus,
body.user-subpage .user-order-search-field > input:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.user-subpage .user-order-search-field > input::placeholder {
  color: #a0a5ad;
}

body.user-subpage .user-order-topbar.search-open .user-order-title-slot > h1 {
  opacity: 0;
  transform: translateX(-7px) scale(.96) !important;
}

body.user-subpage .user-order-topbar.search-open .user-order-search-field {
  max-width: 100%;
  padding: 0 10px;
  border-color: transparent;
  background: rgba(245, 247, 249, .84);
  box-shadow: none;
  opacity: 1;
  pointer-events: auto;
  transform: scaleX(1);
}

body.user-subpage .user-order-topbar.search-open .user-order-top-actions button {
  color: #8a5cf6 !important;
  background: rgba(138, 92, 246, .08) !important;
}

/* 五个标题固定均分，滚动时停留在顶部下方，只保留选中横条。 */
body.user-order-page #userOrderTabs {
  position: sticky !important;
  top: calc(var(--order-topbar-top) + var(--order-topbar-height)) !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch !important;
  gap: 0 !important;
  width: 100% !important;
  min-height: 46px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  overflow: hidden !important;
  scrollbar-width: none;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.user-subpage .user-order-tabs::-webkit-scrollbar {
  display: none;
}

body.user-subpage .user-order-tabs > button {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 45px !important;
  padding: 0 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #9298a1 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  transform: none !important;
  transition: color .2s ease;
}

body.user-subpage .user-order-tabs > button:hover,
body.user-subpage .user-order-tabs > button:focus-visible {
  background: transparent !important;
  color: #5d6470 !important;
  outline: none;
}

body.user-subpage .user-order-tabs > button.active {
  background: transparent !important;
  color: #8a5cf6 !important;
  box-shadow: none !important;
}

body.user-subpage .user-order-tabs > button.active::after {
  display: none !important;
}

body.user-subpage .user-order-tab-indicator {
  position: absolute;
  right: auto;
  bottom: 2px;
  left: 0;
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: #8a5cf6;
  pointer-events: none;
  transform: translateX(0);
  transition: transform .28s cubic-bezier(.22, .7, .2, 1), width .2s ease;
}

/* 旧搜索表单若由缓存脚本残留，不再单独占据页面空间。 */
body.user-subpage > .user-page-search,
body.front-frame-page > .front-app-frame.user-subpage .user-page-search {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  body.user-subpage .user-order-title-slot > h1,
  body.user-subpage .user-order-search-field,
  body.user-subpage .user-order-tab-indicator {
    transition: none !important;
  }
}

/* 空订单只显示提示内容，不再绘制独立的白色卡片。 */
body.user-order-page #userOrderList > .user-empty-state {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

