/* The history view extends the shared archive dialog and table. */
.project-history-dialog { width: min(1040px, calc(100vw - 32px)); }
.history-entry { border-bottom: 1px solid var(--line); }
.history-entry > summary { display: flex; align-items: center; gap: 12px; padding: 14px 2px; cursor: pointer; color: var(--fg-2); }
.history-entry > summary::before { content: '›'; flex: 0 0 12px; color: var(--mut); font-size: 19px; }
.history-entry[open] > summary::before { transform: rotate(90deg); }
.history-entry > summary::-webkit-details-marker { display: none; }
.history-entry-title { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 5px; overflow-wrap: anywhere; }
.history-entry-title strong { font-size: 14px; font-weight: 600; }
.history-entry-title > span, .history-change-count { color: var(--mut); font-size: 12px; }
.history-change-count { flex: 0 0 auto; }
.history-diff-wrap { margin: 0 0 14px; }
.history-diff-table { table-layout: fixed; }
.history-diff-table th:first-child { width: 18%; }
.history-diff-table th, .history-diff-table td { min-width: 0 !important; overflow-wrap: anywhere; }
.history-diff-table pre { max-height: 260px; margin: 0; overflow: auto; font: inherit; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-before { background: var(--bg); }
.history-after { background: var(--bg); }
@media (max-width: 700px) {
  .project-history-dialog { width: calc(100vw - 20px); padding: 16px 12px; }
  .history-entry > summary { gap: 7px; }
  .history-diff-table th:first-child { width: 22%; }
  .history-diff-table th, .history-diff-table td { padding: 8px; font-size: 12px; }
}
