/* Restore-from-backup dialog (shares step/summary/review styles with the batch importer) */
#restore-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 1010;
  align-items: center;
  justify-content: center;
}
#restore-modal-overlay.open { display: flex; }

#restore-modal {
  background: var(--modal-bg);
  border-radius: 12px;
  width: 680px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--modal-border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

#restore-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--modal-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#restore-modal-header h2 { font-size: 16px; color: var(--modal-title); }
#restore-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--modal-close);
  line-height: 1;
}
#restore-modal-close:hover { color: var(--modal-close-hover); }

#restore-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
#restore-modal-body label { font-size: 13px; color: var(--modal-label); }
#restore-file-input { display: none; }
#restore-preview { display: flex; flex-direction: column; gap: 12px; }
#restore-preview[hidden] { display: none; }

#restore-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--modal-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
#restore-modal-error { font-size: 13px; color: var(--modal-error); flex: 1; }
#restore-apply-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.restore-options { border: 1px solid var(--modal-border); border-radius: 8px; padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.restore-options legend { font-size: 12px; font-weight: 600; color: var(--modal-label); padding: 0 6px; }
.restore-radio { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; line-height: 1.4; }
.restore-radio input { margin-top: 3px; }
.restore-policy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-left: 22px; }

.restore-action {
  flex: 0 0 auto;
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--modal-secondary-bg);
  color: var(--modal-secondary);
}
.restore-action-add, .restore-action-keep-both { color: #10b981; }
.restore-action-overwrite { color: #f59e0b; }
.restore-action-remove { color: #ef4444; }
