/*!
 * 旧工作台公共分页样式（配 shared-pager.js）
 *
 * 设计规格：_review/pagination-refactor-plan-20261117.md §2/§3。
 *
 * 两个必须遵守的约束：
 *   1. 本文件**不允许**出现 body[data-platform="ozon"] 前缀。三个独立页面
 *      （ozon-traffic.html / ozon-product-ledger.html / ozon-local-pricing.html）
 *      的 body 没有该属性（该属性由 ozon.js 在 ozon.html 里运行时设置），
 *      带前缀的规则在这些页面完全不生效。
 *   2. 不使用 position:fixed。分页贴底由 .ozon-list-shell 的第三行（grid）实现，
 *      列表在第 2 行内部滚动；iframes 内 fixed 会相对 iframe 定位并遮挡内容。
 *
 * 尺寸基准：按钮高 28px、圆角 6px、激活态实心蓝 #2563eb、字重 800。
 * 旧实现有 24/26/27/28/30/36px 六档按钮高度、三种激活态，本文件取统一基准。
 */

/* ===========================================================================
 * 列表外壳：工具条 / 滚动列表 / 贴底分页 三行
 * 复用 ozon.html 里已投产的同一套约定（.ozon-upload-test-history-card，约 14052 行），
 * 不发明新的布局机制。
 * ========================================================================= */

.ozon-list-shell {
  display: grid;
  /* 第 2 行为 minmax(0, 1fr)：允许收缩到 0，否则内容会把整行顶破、页面重新出现滚动条 */
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  height: clamp(430px, calc(100vh - var(--ozon-list-shell-offset, 128px)), 980px);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* 第 1 行（可选工具条）：只保证不被压缩变形 */
.ozon-list-shell > .ozon-list-toolbar {
  min-width: 0;
}

/* 第 2 行：唯一允许纵向滚动的区域 */
.ozon-list-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

/* 表头吸顶：只作用于滚动区内的表头，不影响其它表格 */
.ozon-list-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--ozon-list-th-bg, #fff);
  box-shadow: inset 0 -1px 0 #e5edf7;
}

/* 视口过矮时退化为普通文档流，避免列表被压成一条缝、内容看不见 */
@media (max-height: 560px) {
  .ozon-list-shell {
    height: auto;
    overflow: visible;
  }
  .ozon-list-scroll {
    max-height: 60vh;
  }
}

/* ===========================================================================
 * 分页条
 * ========================================================================= */

.ozon-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  background: #fff;
  /* 向上的投影 = "悬浮在列表之上"的观感，替代 fixed 定位 */
  box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.06);
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}

.ozon-pager-total {
  font-weight: 700;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.ozon-pager-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.ozon-pager-size {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
  color: #475569;
  white-space: nowrap;
}

.ozon-pager-size select {
  height: 28px;
  padding: 0 6px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ozon-pager-size select:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.ozon-pager-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
}

.ozon-pager-btn:hover:not(:disabled) {
  border-color: #2563eb;
  color: #2563eb;
}

.ozon-pager-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.ozon-pager-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ozon-pager-num.is-active,
.ozon-pager-num.is-active:hover {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.ozon-pager-gap {
  min-width: 16px;
  text-align: center;
  color: #94a3b8;
  user-select: none;
}

.ozon-pager-position {
  padding: 0 2px;
  color: #334155;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 请求进行中：整体降饱和，避免用户以为可以连点 */
.ozon-pager.is-busy .ozon-pager-total,
.ozon-pager.is-busy .ozon-pager-position {
  color: #94a3b8;
}

/* 营销明细页脚：旧页脚是深色通栏，装不进公共分页条的白底卡片；
   这里只去掉底色/边框/内边距，让分页条自己带的白底和投影显示出来。 */
.ozon-promo-modal-footer.ozon-promo-footer-plain {
  background: transparent !important;
  border-top: 0 !important;
  padding: 6px 0 0 !important;
  justify-content: flex-end !important;
}
