/* ── Changelog panel ──────────────────────────────────────────────────────── */

.oai-changelog {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.oai-changelog__details {
  /* nothing extra */
}

.oai-changelog__summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.oai-changelog__summary::-webkit-details-marker {
  display: none;
}

.oai-changelog__summary::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.15s;
  font-size: 0.75rem;
  color: #9ca3af;
}

.oai-changelog__details[open] .oai-changelog__summary::before {
  transform: rotate(90deg);
}

.oai-changelog__summary:hover {
  color: #374151;
}

/* ── Entry list ───────────────────────────────────────────────────────────── */

.oai-changelog__list {
  margin-top: 1rem;
  position: relative;
  padding-left: 1rem;
}

/* Vertical connector */
.oai-changelog__list::before {
  content: '';
  position: absolute;
  left: 0.35rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: #e5e7eb;
}

/* ── Single entry ─────────────────────────────────────────────────────────── */

.oai-cl-entry {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  position: relative;
}

.oai-cl-entry__dot {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #9ca3af;
  border: 2px solid #fff;
  outline: 1px solid #d1d5db;
  margin-top: 0.35rem;
  position: relative;
  z-index: 1;
}

.oai-cl-entry__body {
  flex: 1;
  min-width: 0;
}

.oai-cl-entry__meta {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.3rem;
}

.oai-cl-entry__date {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}

.oai-cl-entry__time {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */

.oai-cl-entry__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}

.oai-cl-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.oai-cl-badge--green  { background: #dcfce7; color: #15803d; }
.oai-cl-badge--blue   { background: #dbeafe; color: #1d4ed8; }
.oai-cl-badge--amber  { background: #fef3c7; color: #92400e; }
.oai-cl-badge--red    { background: #fee2e2; color: #b91c1c; }
.oai-cl-badge--violet { background: #ede9fe; color: #6d28d9; }
.oai-cl-badge--cyan   { background: #cffafe; color: #0e7490; }
.oai-cl-badge--slate  { background: #f1f5f9; color: #475569; }

/* ── Expandable diff ──────────────────────────────────────────────────────── */

.oai-cl-entry__detail {
  margin-top: 0.25rem;
}

.oai-cl-entry__detail > summary {
  font-size: 0.75rem;
  color: #9ca3af;
  cursor: pointer;
  list-style: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.oai-cl-entry__detail > summary::-webkit-details-marker {
  display: none;
}

.oai-cl-entry__detail > summary:hover {
  color: #6b7280;
}

.oai-cl-diff {
  margin-top: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

.oai-cl-diff--added   { background: #f0fdf4; border-left: 2px solid #4ade80; color: #166534; }
.oai-cl-diff--removed { background: #fef2f2; border-left: 2px solid #f87171; color: #991b1b; text-decoration: line-through; opacity: 0.75; }

/* ── Sourced provenance ───────────────────────────────────────────────────── */
.oai-cl-source {
  margin-top: 0.45rem;
  padding: 0.45rem 0.6rem;
  background: #f5f3ff;
  border-left: 2px solid #7c3aed;
  border-radius: 4px;
}

.oai-cl-source__note {
  font-size: 0.8125rem;
  color: #1f2937;
  margin-bottom: 0.2rem;
}

.oai-cl-source__cite {
  font-size: 0.75rem;
  color: #4b5563;
}

.oai-cl-source__cite a {
  color: #6d28d9;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.oai-cl-source__date {
  color: #6b7280;
}
