.pdd-upload-task-center {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1450;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.pdd-upload-task-center[hidden],
.pdd-upload-task-center-panel[hidden],
.pdd-upload-task-center-active-count[hidden] {
  display: none !important;
}

.pdd-upload-task-center-toggle,
.pdd-upload-task-center-panel {
  pointer-events: auto;
}

.pdd-upload-task-center-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #e02e24;
  box-shadow: 0 12px 30px rgba(145, 30, 24, 0.3);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pdd-upload-task-center-toggle svg {
  width: 18px;
  height: 18px;
}

.pdd-upload-task-center-toggle strong {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #e02e24;
  background: #fff;
  font-size: 12px;
}

.pdd-upload-task-center-panel {
  width: min(390px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 100px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #eadfdd;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(59, 33, 30, 0.2);
}

.pdd-upload-task-center-panel > header {
  min-height: 62px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f0e7e5;
  background: linear-gradient(180deg, #fffafa 0%, #fff 100%);
}

.pdd-upload-task-center-panel > header > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pdd-upload-task-center-panel > header strong {
  color: #2d2524;
  font-size: 15px;
}

.pdd-upload-task-center-panel > header span {
  color: #8a7470;
  font-size: 12px;
}

.pdd-upload-task-center-body {
  min-height: 90px;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  background: #f8f6f5;
}

.pdd-upload-task-center-panel > footer {
  padding: 10px 12px;
  border-top: 1px solid #f0e7e5;
  background: #fff;
}

.pdd-upload-task-center-panel > footer:empty {
  display: none;
}

.pdd-upload-task-center-panel > footer .secondary-button {
  width: 100%;
  justify-content: center;
}

.pdd-upload-task-center-item {
  padding: 11px 12px;
  display: grid;
  gap: 8px;
  border: 1px solid #e9e2e0;
  border-radius: 12px;
  background: #fff;
}

.pdd-upload-task-center-item.success {
  border-color: #cde9d5;
}

.pdd-upload-task-center-item.failed {
  border-color: #f1c8c4;
}

.pdd-upload-task-center-item.warning {
  border-color: #f0d99b;
}

.pdd-upload-task-center-item-head,
.pdd-upload-task-center-counts,
.pdd-upload-task-center-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pdd-upload-task-center-item-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pdd-upload-task-center-item-head strong {
  max-width: 220px;
  overflow: hidden;
  color: #312826;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdd-upload-task-center-item-head > div > span {
  color: #8b7773;
  font-size: 11px;
}

.pdd-upload-task-center-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #756460;
  font-size: 12px;
  font-weight: 700;
}

.pdd-upload-task-center-status svg {
  width: 14px;
  height: 14px;
}

.pdd-upload-task-center-status.success {
  color: #21833a;
}

.pdd-upload-task-center-status.failed {
  color: #c6382d;
}

.pdd-upload-task-center-status.warning {
  color: #9a6b00;
}

.pdd-upload-task-center-status.info {
  color: #2469a8;
}

.pdd-upload-task-center-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8e6;
}

.pdd-upload-task-center-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #e02e24;
  transition: width 180ms ease;
}

.pdd-upload-task-center-item.success .pdd-upload-task-center-progress > span {
  background: #35a853;
}

.pdd-upload-task-center-counts {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: #806d69;
  font-size: 11px;
}

.pdd-upload-task-center-counts strong {
  margin-left: auto;
  color: #443936;
}

.pdd-upload-task-center-error {
  margin: 0;
  padding: 7px 8px;
  border-radius: 8px;
  color: #9b332c;
  background: #fff3f2;
  font-size: 11px;
  line-height: 1.45;
}

.pdd-upload-task-center-item-actions {
  justify-content: flex-end;
}

.pdd-upload-task-center-empty {
  min-height: 90px;
  display: grid;
  place-items: center;
  color: #8b7773;
  font-size: 13px;
  text-align: center;
}

.pdd-upload-task-center-empty.is-error {
  color: #b2372e;
}

@media (max-width: 720px) {
  .pdd-upload-task-center {
    right: 12px;
    bottom: 12px;
  }

  .pdd-upload-task-center-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 84px);
  }
}
