.publish-checklist {
  width: min(100%, 760px);
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.publish-checklist li {
  display: grid;
  grid-template-columns: 76px minmax(150px, 0.7fr) minmax(200px, 1fr);
  align-items: center;
  min-height: 68px;
  gap: 18px;
  border-bottom: 1px solid var(--border);
}

.publish-checklist span,
.publish-checklist small {
  color: var(--text-secondary);
  font-size: 12px;
}

.publish-checklist li[data-pass="true"] span {
  color: var(--success);
}

.publish-checklist strong {
  font-size: 14px;
}

.publish-context-blocker,
.publish-batch-created {
  display: grid;
  width: min(100%, 760px);
  gap: 6px;
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--border-strong);
  background: var(--surface);
}

.publish-context-blocker {
  border-left-color: var(--danger);
}

.publish-batch-created {
  border-left-color: var(--success);
}

.publish-context-blocker strong,
.publish-batch-created strong {
  font-size: 14px;
}

.publish-context-blocker p,
.publish-batch-created p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.publish-context-blocker a {
  width: fit-content;
  color: var(--accent);
  font-size: 13px;
  font-weight: 620;
}

.publish-batch-panel {
  display: grid;
  width: min(100%, 760px);
  gap: 14px;
  margin-top: 22px;
  padding: 18px 0 2px;
  border-top: 1px solid var(--border);
}

.publish-batch-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.publish-batch-heading h3,
.publish-batch-heading p,
.publish-batch-item p,
.publish-batch-notice,
.publish-batch-error,
.publish-batch-empty {
  margin: 0;
}

.publish-batch-heading h3 {
  font-size: 16px;
  font-weight: 680;
}

.publish-batch-heading p,
.publish-batch-empty {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.publish-batch-status,
.publish-batch-item-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 620;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.publish-batch-status--completed,
.publish-batch-status--cancelled,
.publish-batch-item[data-status="confirmed"] .publish-batch-item-status,
.publish-batch-item[data-status="cancelled"] .publish-batch-item-status {
  border-color: color-mix(in srgb, var(--success) 42%, var(--border));
  color: var(--success);
}

.publish-batch-status--completed_with_errors,
.publish-batch-item[data-status="failed"] .publish-batch-item-status,
.publish-batch-item[data-status="blocked"] .publish-batch-item-status {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--border));
  color: var(--danger);
}

.publish-batch-status--queued,
.publish-batch-status--running,
.publish-batch-status--submitted,
.publish-batch-item[data-status="queued"] .publish-batch-item-status,
.publish-batch-item[data-status="running"] .publish-batch-item-status,
.publish-batch-item[data-status="submitted"] .publish-batch-item-status {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  color: var(--accent);
}

.publish-batch-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.publish-batch-summary > div {
  min-width: 0;
  padding: 11px 12px 11px 0;
}

.publish-batch-summary dt {
  color: var(--text-tertiary);
  font-size: 11px;
}

.publish-batch-summary dd {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-batch-items {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.publish-batch-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 14px;
  min-height: 54px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.publish-batch-item > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.publish-batch-item strong,
.publish-batch-item small,
.publish-batch-item p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-batch-item strong {
  font-size: 13px;
  font-weight: 650;
}

.publish-batch-item small,
.publish-batch-item p {
  color: var(--text-secondary);
  font-size: 11px;
}

.publish-batch-item p {
  grid-column: 1 / -1;
  color: var(--danger);
}

.publish-batch-item-recovery {
  grid-column: 1 / -1;
  width: fit-content;
  color: var(--accent);
  font-size: 12px;
  font-weight: 620;
}

.publish-batch-notice,
.publish-batch-error,
.publish-batch-empty {
  padding: 10px 12px;
  border-left: 3px solid var(--border-strong);
  background: var(--surface);
}

.publish-batch-notice {
  border-left-color: var(--accent);
  color: var(--text-secondary);
  font-size: 12px;
}

.publish-batch-error {
  border-left-color: var(--danger);
  color: var(--text);
  font-size: 13px;
}

.publish-batch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.publish-batch-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 620;
}

.publish-batch-actions [data-publish-batch-retry] {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  color: var(--accent);
}

.publish-batch-actions [data-publish-batch-cancel-open] {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--border));
  color: var(--danger);
}

.publish-batch-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.product-action-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 76px;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  background: var(--canvas);
}

.product-action-bar > span {
  max-width: 48ch;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: right;
}

.product-primary-action {
  display: grid;
  min-width: 190px;
  min-height: 44px;
  padding: 0 18px;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.product-primary-action:active {
  transform: translateY(1px);
}

.product-primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

:is(#publishConfirm, #generateConfirm, #publishBatchCancelConfirm) {
  width: min(100% - 32px, 420px);
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

:is(#publishConfirm, #generateConfirm, #publishBatchCancelConfirm)::backdrop {
  background: rgba(0, 0, 0, 0.56);
}

:is(#publishConfirm, #generateConfirm, #publishBatchCancelConfirm) form {
  padding: 24px;
}

:is(#publishConfirm, #generateConfirm, #publishBatchCancelConfirm) h3,
:is(#publishConfirm, #generateConfirm, #publishBatchCancelConfirm) p {
  margin: 0;
}

:is(#publishConfirm, #generateConfirm, #publishBatchCancelConfirm) p {
  margin-top: 7px;
  color: var(--text-secondary);
}

:is(#publishConfirm, #generateConfirm, #publishBatchCancelConfirm) label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  font-size: 13px;
}

:is(#publishConfirm, #generateConfirm, #publishBatchCancelConfirm) menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
}

:is(#publishConfirm, #generateConfirm, #publishBatchCancelConfirm) button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  cursor: pointer;
}

:is(#publishConfirm, #generateConfirm, #publishBatchCancelConfirm) :is([data-publish-submit], [data-generate-submit]) {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-contrast);
}

:is(#publishConfirm, #generateConfirm, #publishBatchCancelConfirm) button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.product-loading {
  display: grid;
  width: min(100% - 64px, 900px);
  margin: 30px auto;
  gap: 16px;
}

.product-loading div,
.product-loading span {
  display: block;
  height: 56px;
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.product-loading div {
  height: 280px;
}

.product-loading span:last-child {
  width: 68%;
}
