.done-button,
.backup-button,
.replace-backup-button,
.cancel-import-button,
.reset-data-button,
.cancel-reset-button,
.history-delete-button,
.history-cancel-button,
.history-expand-button,
.save-button,
.delete-button,
.cancel-delete-button,
.manual-position-actions button,
.history-panel summary,
.manage-panel summary,
.backup-panel summary {
  transition: transform 120ms ease, background-color 150ms ease, color 150ms ease,
    border-color 150ms ease, opacity 150ms ease;
}

.done-button:active,
.backup-button:active,
.replace-backup-button:active,
.cancel-import-button:active,
.reset-data-button:active,
.cancel-reset-button:active,
.history-delete-button:active,
.history-cancel-button:active,
.history-expand-button:active,
.manual-position-actions button:active {
  transform: scale(0.975);
}

.last-done {
  animation: value-refresh 260ms ease-out both;
}

.history-entry {
  animation: feedback-rise 180ms ease-out both;
}

.history-panel[open] > :not(summary),
.manage-panel[open] > :not(summary),
.backup-panel[open] > :not(summary),
.import-confirmation,
.reset-confirmation,
.backup-status,
.backup-error,
.data-safety-status {
  animation: feedback-rise 180ms ease-out both;
}

.data-safety-status {
  position: relative;
  margin: 0.8rem 0 0;
  padding-left: 1.45rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.data-safety-status::before {
  content: "✓";
  position: absolute;
  left: 0.15rem;
  top: 0;
  font-weight: 800;
}

@keyframes feedback-rise {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes value-refresh {
  from {
    opacity: 0.45;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .done-button,
  .backup-button,
  .replace-backup-button,
  .cancel-import-button,
  .reset-data-button,
  .cancel-reset-button,
  .history-delete-button,
  .history-cancel-button,
  .history-expand-button,
  .save-button,
  .delete-button,
  .cancel-delete-button,
  .manual-position-actions button,
  .history-panel summary,
  .manage-panel summary,
  .backup-panel summary {
    transition: none;
  }

  .done-button:active,
  .backup-button:active,
  .replace-backup-button:active,
  .cancel-import-button:active,
  .reset-data-button:active,
  .cancel-reset-button:active,
  .history-delete-button:active,
  .history-cancel-button:active,
  .history-expand-button:active,
  .manual-position-actions button:active {
    transform: none;
  }

  .last-done,
  .history-entry,
  .history-panel[open] > :not(summary),
  .manage-panel[open] > :not(summary),
  .backup-panel[open] > :not(summary),
  .import-confirmation,
  .reset-confirmation,
  .backup-status,
  .backup-error,
  .data-safety-status {
    animation: none;
  }
}
