.creative-history-list {
  --creative-history-addition-bg: color-mix(in srgb, var(--color-success) 18%, var(--surface-section));
  --creative-history-addition-text: color-mix(in srgb, var(--color-success) 65%, var(--text-primary));
  --creative-history-deletion-bg: color-mix(in srgb, var(--color-danger) 18%, var(--surface-section));
  --creative-history-deletion-text: color-mix(in srgb, var(--color-danger) 65%, var(--text-primary));

  display: grid;
  gap: 12px;
  padding: 12px;
}

.creative-history-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
}

.creative-history-header,
.creative-history-stats {
  display: flex;
  align-items: center;
  gap: 6px;
}

.creative-history-summary {
  margin: 8px 0 4px;
}

.creative-history-stats {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.creative-history-stats ins {
  color: var(--creative-history-addition-text);
  text-decoration: none;
}

.creative-history-stats del {
  color: var(--creative-history-deletion-text);
  text-decoration: none;
}

.creative-history-diff {
  margin-top: 8px;
}

.creative-history-split {
  table-layout: fixed;
  width: 100%;
}

.creative-history-split :is(th, td) {
  overflow-wrap: anywhere;
  padding: 2px 6px;
  text-align: left;
  vertical-align: top;
  white-space: pre-wrap;
  width: 50%;
}

.creative-history-split th {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
}

.creative-history-split .diff-changed td:first-child {
  background: var(--creative-history-deletion-bg);
  color: var(--text-primary);
}

.creative-history-split .diff-changed td:last-child {
  background: var(--creative-history-addition-bg);
  color: var(--text-primary);
}

.creative-history-split .diff-gap td {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-align: center;
  width: auto;
}

.creative-history-revert {
  margin-top: 10px;
}
