/* error-dialog.css — the shared error modal (js/error-dialog.js).
   Shared design asset (synced into each app's tree by packages/shared/sync.sh —
   edit HERE, never the app copies). Colours and fonts come only from
   design-tokens.css: red (--color-danger*) means a fault; orange stays "look at
   this" and is not used here. */
.fed-backdrop {
  position: fixed; inset: 0;
  z-index: 2147483100;   /* above every app layer (settings 10000+, ios-import 30000, JB boot 2147483000): an error must never open unseen */
  display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--color-backdrop-heavy);
}
.fed-box {
  box-sizing: border-box; width: 100%; max-width: 520px; max-height: 100%;
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 20px 16px;
  background: var(--color-bg-panel-elevated); color: var(--color-warm-text);
  border: 1px solid var(--color-border-panel); border-top: 4px solid var(--color-danger);
  border-radius: 14px;
  font-family: var(--font);
}
.fed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fed-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--color-danger-text); }
.fed-pager { font-size: 12px; color: var(--color-warm-text-soft); white-space: nowrap; }
.fed-message { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.fed-detail {
  margin: 0; padding: 10px 12px; min-height: 2.5em; max-height: 40vh; overflow: auto;
  font-family: var(--font); font-size: 12.5px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--color-bg-dark); color: var(--color-warm-text);
  border: 1px solid var(--color-border-panel); border-radius: 8px;
  -webkit-user-select: text; user-select: text; -webkit-touch-callout: default;
}
.fed-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.fed-btn {
  -webkit-appearance: none; appearance: none;
  font-family: var(--font); font-size: 14px; font-weight: 700;
  min-height: 40px; padding: 8px 18px; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--color-warm-text); border: 1px solid var(--color-border-panel);
}
.fed-btn:focus-visible { outline: 2px solid var(--color-danger-text); outline-offset: 2px; }
.fed-btn--primary { background: var(--color-danger); border-color: var(--color-danger); color: var(--color-text-on-accent); }
.fed-btn--primary:active { background: var(--color-danger-dark); }
.fed-btn--quiet { border-color: transparent; color: var(--color-warm-text-soft); margin-right: auto; }
.fed-btn--done { color: var(--color-green-light); border-color: var(--color-green-light); }
.fed-btn[hidden], .fed-pager[hidden] { display: none; }
