/* 拼多多上传管理：紧凑订单卡片与横向筛选 */

.pdd-upload-filter-panel {
  padding: 8px 18px 12px;
  overflow: visible;
  border-radius: 8px;
}

.pdd-upload-quick-filters {
  display: grid;
}

.pdd-upload-filter-choice-row,
.pdd-upload-search-row {
  min-height: 40px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f0;
}

.pdd-upload-filter-choice-label {
  padding-top: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pdd-upload-filter-choice-options {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 22px;
  overflow: hidden;
}

.pdd-upload-filter-choice-options.is-collapsible {
  max-height: 30px;
}

.pdd-upload-filter-choice-options.is-expanded {
  max-height: none;
}

.pdd-upload-filter-choice {
  position: relative;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4b5563;
  font-size: 12px;
  white-space: nowrap;
}

.pdd-upload-filter-choice:hover {
  color: var(--primary);
}

.pdd-upload-filter-choice.is-active {
  color: var(--primary);
  font-weight: 700;
}

.pdd-upload-filter-choice.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
}

.pdd-upload-filter-expand {
  min-height: 28px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.pdd-upload-filter-expand .inline-icon {
  transform: rotate(90deg);
  transition: transform 0.16s ease;
}

.pdd-upload-filter-expand.is-expanded .inline-icon {
  transform: rotate(-90deg);
}

.pdd-upload-search-row {
  grid-template-columns: 76px minmax(240px, 360px) minmax(180px, 260px) auto auto;
  align-items: center;
  padding-top: 8px;
  border-bottom: 0;
}

.pdd-upload-search-row > .pdd-upload-filter-choice-label {
  padding-top: 0;
}

.pdd-upload-search-field {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.pdd-upload-search-field > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.pdd-upload-search-field input {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12px;
}

.pdd-upload-date-filter {
  position: relative;
}

.pdd-upload-date-filter > summary {
  min-height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: #4b5563;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  white-space: nowrap;
}

.pdd-upload-date-filter > summary::-webkit-details-marker {
  display: none;
}

.pdd-upload-date-filter-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 35;
  min-width: 280px;
  padding: 12px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.pdd-upload-date-filter-popover label {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.pdd-upload-date-filter-popover input {
  min-height: 32px;
  padding: 0 8px;
  font-family: inherit;
  font-size: 12px;
}

.pdd-upload-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdd-upload-filter-actions .primary-button,
.pdd-upload-filter-actions .secondary-button {
  min-height: 32px;
  font-size: 12px;
}

.pdd-upload-panel {
  overflow: visible;
  border-radius: 8px;
}

.pdd-upload-panel-header {
  min-height: 58px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.pdd-upload-heading-line,
.pdd-upload-page-actions,
.pdd-upload-card-heading,
.pdd-upload-card-shop,
.pdd-upload-card-metrics,
.pdd-upload-card-platform,
.pdd-upload-card-actions,
.pdd-upload-card-task > div,
.pdd-upload-detail-actions,
.pdd-upload-photo-actions,
.pdd-upload-sn-title,
.pdd-upload-sn-meta,
.pdd-upload-photo-title {
  display: flex;
  align-items: center;
}

.pdd-upload-heading-line {
  gap: 10px;
  flex-wrap: wrap;
}

.pdd-upload-total {
  padding: 3px 8px;
  border-radius: 999px;
  color: #595959;
  background: #f5f5f5;
  font-size: 12px;
}

.pdd-upload-status-sync-hint {
  color: #667085;
  font-size: 11px;
}

.pdd-upload-status-sync-hint[data-phase="QUEUING"],
.pdd-upload-status-sync-hint[data-phase="RUNNING"] {
  color: #ad6800;
}

.pdd-upload-status-sync-hint[data-phase="FAILED"] {
  color: #cf1322;
}

.pdd-upload-status-sync-hint[data-phase="FRESH"] {
  color: #237804;
}

.pdd-upload-page-actions {
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.pdd-upload-select-page {
  min-height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: #4b5563;
  font-size: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.pdd-upload-page-actions > .secondary-button,
.pdd-upload-page-actions > .pdd-upload-action-menu,
.pdd-upload-page-actions > .pagination-inline {
  flex: 0 0 auto;
}

.pdd-upload-page-menu,
.pdd-upload-action-menu {
  position: relative;
}

.pdd-upload-batch-bar {
  position: sticky;
  top: 76px;
  z-index: 12;
  min-height: 48px;
  margin: 8px 14px 0;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #ffccc7;
  border-radius: 6px;
  background: #fff2f0;
  box-shadow: 0 6px 16px rgba(207, 19, 34, 0.08);
}

.pdd-upload-batch-bar[hidden] {
  display: none;
}

.pdd-upload-batch-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}

.pdd-upload-batch-copy > .inline-icon {
  width: 18px;
  height: 18px;
}

.pdd-upload-batch-copy strong {
  font-size: 13px;
}
