/* Local recovery remains a compact, nonmodal offer beside the current page. */
.outlo-editor-backup {
  --backup-control-size: 36px;
  position: fixed;
  z-index: 1200;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  width: min(360px, calc(100% - 40px));
  padding: 14px;
  border: 1px solid #dfe3ec;
  border-radius: 12px;
  background: #fff;
  color: #252c3e;
  box-shadow: 0 8px 28px rgb(35 41 75 / 10%);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}
.outlo-editor-backup[hidden],
.outlo-editor-backup [hidden],
.editor-backup-status[hidden],
.editor-backup-recovery[hidden] { display: none !important; }
body:has(#eventDialog[open], #eventCreateOverlayDialog[open], dialog.rs-management-dialog[open]) .outlo-editor-backup { display: none !important; }
.outlo-editor-backup__header { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0 0 8px; padding-right: 30px; }
.outlo-editor-backup__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; background: #f0edff; color: #5141dc; font-size: 18px; }
.outlo-editor-backup__icon svg { width: 20px; height: 20px; }
.outlo-editor-backup__heading { min-width: 0; margin: 0; color: #252c3e; font-size: 19px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.outlo-editor-backup__copy { min-width: 0; }
.outlo-editor-backup__title { margin: 0 0 3px; color: #434c60; font-size: 14px; font-weight: 550; line-height: 1.35; overflow-wrap: anywhere; }
.outlo-editor-backup__organizer { margin: 0 0 5px; color: #626c7c; font-size: 12px; overflow-wrap: anywhere; }
.outlo-editor-backup__organizer-name { color: #343e53; font-weight: 550; }
.outlo-editor-backup__date,
.outlo-editor-backup__local { margin: 0; color: #646d7e; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.outlo-editor-backup__local { margin-top: 0; }
.outlo-editor-backup__picker { display: grid; gap: 4px; min-width: 0; margin: 10px 0 0; }
.outlo-editor-backup__picker-label { color: #626c7c; font-size: 12px; font-weight: 500; }
.outlo-editor-backup__select { box-sizing: border-box; display: block; width: 100%; max-width: 100%; min-width: 0; min-height: var(--backup-control-size); margin: 0; padding: 8px 30px 8px 10px; border: 1px solid #dce1eb; border-radius: 8px; background: #fff; color: #343e53; font: inherit; font-size: 13px; }
.outlo-editor-backup__note { margin: 9px 0 0; padding: 8px 10px; border-radius: 8px; background: #fff8e8; color: #805b14; font-size: 12px; overflow-wrap: anywhere; }
.outlo-editor-backup.is-uncertain .outlo-editor-backup__heading { color: #805b14; }
.outlo-editor-backup.is-uncertain .outlo-editor-backup__icon { color: #805b14; background: #fff5db; }
.outlo-editor-backup__actions { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto var(--backup-control-size); align-items: stretch; gap: 6px; margin-top: 10px; }
.outlo-editor-backup.is-uncertain .outlo-editor-backup__actions { grid-template-columns: minmax(0,1fr) auto; }
.outlo-editor-backup :where(.outlo-editor-backup__actions,.outlo-editor-backup__confirmation) button {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: auto; max-width: 100%; min-width: 0; min-height: var(--backup-control-size); margin: 0;
  padding: 6px 10px; border: 1px solid #dce1eb; border-radius: 8px;
  background: #fff; color: #515e73; font: inherit; font-size: 12px; font-weight: 500; line-height: 1.4; cursor: pointer;
}
.outlo-editor-backup .outlo-editor-backup__resume { width: 100%; border-color: #5642df; background: #5642df; color: #fff; box-shadow: none; white-space: normal; text-align: center; }
.outlo-editor-backup .outlo-editor-backup__resume:hover:not(:disabled) { border-color: #4936cb; background: #4936cb; }
.outlo-editor-backup .outlo-editor-backup__later { border-color: transparent; background: transparent; color: #626c7c; }
.outlo-editor-backup .outlo-editor-backup__more { flex: 0 0 var(--backup-control-size); width: var(--backup-control-size); margin-left: auto; padding: 8px; border-color: transparent; background: transparent; color: #626c7c; font-size: 19px; }
.outlo-editor-backup__more svg { width: 18px; height: 18px; }
.outlo-editor-backup :is(.outlo-editor-backup__later,.outlo-editor-backup__more):hover:not(:disabled),
.outlo-editor-backup .outlo-editor-backup__more[aria-expanded="true"] { background: #f2f4f8; color: #343e53; }
.outlo-editor-backup__menu { position: absolute; z-index: 2; right: 0; bottom: calc(var(--backup-control-size) + 6px); box-sizing: border-box; max-width: 100%; padding: 5px; border: 1px solid #dce1eb; border-radius: 10px; background: #fff; box-shadow: 0 5px 18px rgb(35 41 75 / 13%); }
.outlo-editor-backup .outlo-editor-backup__delete-option { width: 100%; justify-content: flex-start; border-color: transparent; background: transparent; color: #9e263b; text-align: left; }
.outlo-editor-backup .outlo-editor-backup__delete-option:hover:not(:disabled) { background: #fff2f3; }
.outlo-editor-backup__confirmation { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e3e6ed; }
.outlo-editor-backup__confirmation-copy { margin: 0 0 12px; color: #515e73; font-size: 13px; overflow-wrap: anywhere; }
.outlo-editor-backup .outlo-editor-backup__discard { color: #9e263b; border-color: #e7cbd0; margin-right: 6px; }
.outlo-editor-backup .outlo-editor-backup__discard:hover:not(:disabled) { background: #fff2f3; border-color: #d9a8b2; }
.outlo-editor-backup .outlo-editor-backup__cancel:hover:not(:disabled) { background: #f2f4f8; }
.outlo-editor-backup button:disabled { opacity: .55; cursor: not-allowed; }
.outlo-editor-backup__close.outlo-close { position: absolute; inset: 10px 8px auto auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; min-width: 32px; height: 32px; min-height: 32px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #687285; font-size: 24px; font-weight: 400; line-height: 1; cursor: pointer; }
.outlo-editor-backup__close.outlo-close:hover { background: #f2f4f8; color: #343e53; }
.outlo-editor-backup :is(button, select):focus-visible { outline: 3px solid #a5b4fc; outline-offset: 3px; }

.editor-backup-recovery button {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid #d8d5eb;
  border-radius: 9px;
  background: #fff;
  color: #514979;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}
.editor-backup-recovery button.primary,
.editor-backup-recovery #editorBackupRestore {
  border-color: transparent;
  background: var(--outlo-action-fill, linear-gradient(135deg, #7c3aed, #4f46e5 55%, #2563eb)) no-repeat border-box;
  color: #fff;
  box-shadow: 0 3px 8px rgb(79 70 229 / 16%);
}
.editor-backup-recovery button:hover:not(:disabled) { border-color: #a5b4fc; }
.editor-backup-recovery button:disabled { opacity: .55; cursor: not-allowed; }
.editor-backup-recovery :is(button, a, select):focus-visible { outline: 3px solid #a5b4fc; outline-offset: 3px; }

/* Shared by the native editor and editor frames. These are browser backups,
   so their status is separate from the event's server publication state. */
.editor-backup-status { margin: 8px 0; color: #6b6683; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
#eventDialog.event-editor .editor-backup-status { flex: 0 0 auto; margin: 0; padding: 6px 28px 7px; }
.editor-backup-status.is-error,
.editor-backup-status[data-state="error"],
.editor-backup-status[data-state="unavailable"] { color: #9a3412; }
.editor-backup-status.is-saved,
.editor-backup-status[data-state="saved"] { color: #4f46e5; }
.editor-backup-recovery { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; box-sizing: border-box; min-width: 0; max-height: min(32dvh, 220px); margin: 10px 0 12px; padding: 12px 14px; overflow: auto; border: 1px solid #c7d2fe; border-radius: 12px; background: #f5f6ff; color: #37305c; font-size: 13px; line-height: 1.45; }
#eventDialog.event-editor .editor-backup-recovery { flex: 0 0 auto; margin-inline: 28px; }
.editor-backup-recovery > :is(h2, h3, strong, p),
.editor-backup-recovery__copy { grid-column: 1; min-width: 0; overflow-wrap: anywhere; }
.editor-backup-recovery :is(h2, h3, strong) { margin: 0; color: #4338ca; font-size: 14px; line-height: 1.35; }
.editor-backup-recovery p { margin: 0; }
.editor-backup-recovery__actions { display: flex; grid-column: 2; grid-row: 1 / span 3; flex-wrap: wrap; align-items: center; gap: 8px; }

@media (max-width: 640px) {
  .outlo-editor-backup { --backup-control-size: 44px; right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); width: min(340px, calc(100% - 20px)); padding: 12px; border-radius: 12px; }
  .outlo-editor-backup__header { min-height: 32px; margin-bottom: 8px; padding-right: 34px; }
  .outlo-editor-backup__heading { font-size: 19px; }
  .outlo-editor-backup__title { font-size: 14px; }
  .outlo-editor-backup__actions { gap: 6px; margin-top: 10px; }
  .outlo-editor-backup__select { font-size: 16px; }
  .outlo-editor-backup__close.outlo-close { inset: 6px 4px auto auto; width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  .editor-backup-recovery { grid-template-columns: minmax(0, 1fr); gap: 6px; max-height: min(30dvh, 210px); margin-block: 8px 10px; padding: 10px 12px; font-size: 12px; }
  .editor-backup-recovery :is(h2, h3, strong) { font-size: 13px; }
  .editor-backup-recovery__actions { grid-column: 1; grid-row: auto; gap: 6px; }
  #eventDialog.event-editor .editor-backup-recovery button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
}
@media (max-width: 600px) {
  #eventDialog.event-editor .editor-backup-status { padding: 5px 16px 6px; font-size: 11px; }
  #eventDialog.event-editor .editor-backup-recovery { margin-inline: 16px; }
}
/* On the map, the lower edge belongs to the filter sheet and the left edge
   contains zoom/location controls. The recovery card uses the free upper right. */
@media (max-width: 1120px) {
  .map-page .outlo-editor-backup { top: calc(var(--topbar-height, 62px) + 12px); right: max(10px, env(safe-area-inset-right)); bottom: auto; width: min(340px, calc(100% - 82px)); max-height: calc(100dvh - var(--topbar-height, 62px) - 110px); overflow: auto; }
}
@media (max-width: 360px) {
  .map-page .outlo-editor-backup { padding: 12px; }
}
@media (max-width: 420px) {
  .outlo-editor-backup .outlo-editor-backup__confirmation button { margin-bottom: 6px; }
}
@media (pointer: coarse) {
  .outlo-editor-backup { --backup-control-size: 44px; }
  .outlo-editor-backup__header { padding-right: 40px; }
  .outlo-editor-backup__close.outlo-close { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
}
/* Backups are available only through the organizer's deliberate recovery entry. */
#organizerBackupListButton[hidden]{display:none!important}#organizerBackupListButton{white-space:normal;text-align:left}#organizerBackupListButton:disabled{opacity:.6;cursor:default}
