.change-log-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 200ms ease;
    z-index: 100;
    pointer-events: none;
}
.change-log-backdrop.open {
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.change-log-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 100%;
    max-width: 480px;
    background: var(--surface-1);
    color: var(--surface-9);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 200ms ease;
    z-index: 101;
    display: flex;
    flex-direction: column;
}
.change-log-drawer.open { transform: translateX(0); }

.change-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--surface-3);
}
.change-log-header h2 { margin: 0; font-size: 1.1rem; }
.change-log-header .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 1.25rem;
}

.change-log-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.change-log-entry {
    padding: 0.75rem;
    border-bottom: 1px solid var(--surface-2);
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    row-gap: 0.25rem;
}
.change-log-entry .icon {
    grid-row: 1 / span 3;
    align-self: start;
    color: var(--brand-2);
    font-size: 1rem;
    padding-top: 0.15rem;
}
.change-log-entry .primary  { font-weight: 500; }
.change-log-entry .secondary { font-size: 0.85rem; color: var(--surface-6); }
.change-log-entry .actions  { display: flex; gap: 0.5rem; margin-top: 0.25rem; }
.change-log-entry .actions button {
    cursor: pointer;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--surface-3);
    background: var(--surface-2);
    border-radius: 4px;
}
/*
 * Approve and Revert mirror the .error-message panel pattern — soft
 * tinted background, accent border, dark text — but in green for
 * approval and red for revert. Quieter than saturated buttons,
 * suits moderation actions that should feel deliberate, not flashy.
 */
.change-log-entry .actions .approve-btn {
    background: var(--approval-bg);
    border-color: var(--approval-border);
    color: var(--approval-text);
}
.change-log-entry .actions .revert-btn {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}
/*
 * Unreviewed entries get a left-edge accent in the approval-border hue
 * so moderators can scan the list for outstanding work. Targeted via
 * :has(.actions) because unreviewed rows are the only branch in
 * _renderActions that emits <div class="actions"> — see
 * ChangeLogDrawer.js:263-295. --accent-width is a rule-local variable
 * so the border width and the compensating padding-left subtraction
 * stay in sync from a single source.
 */
.change-log-entry:has(.actions) {
    --accent-width: 5px;
    border-left: var(--accent-width) solid var(--approval-border);
    padding-left: calc(0.75rem - var(--accent-width));
}
.change-log-entry .status-pill {
    font-size: 0.85rem;
    color: var(--surface-6);
    margin-top: 0.25rem;
}

.change-log-empty {
    padding: 2rem;
    text-align: center;
    color: var(--surface-6);
}

/* Changelog button + unreviewed-count badge.
   Button is the positioning context so the badge can overlay top-right. */
.changelog-btn {
    position: relative;
}

.changelog-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--approval);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    min-width: 1.1rem;
    padding: 2px 5px;
    border-radius: 999px;
    text-align: center;
    pointer-events: none;
}
