/* Iteration 10 C: the outbox note ("3 actions waiting to send"), the update bar,
   "Update needed" and the "What changed" card (public/app/ui/outbox-ui.js, ui/updates.js).
   These live on <body>, outside #app, so they stay put while screens change. */

.obx-pill {
  position: fixed; z-index: 60; left: max(12px, env(safe-area-inset-left)); bottom: calc(12px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px;
  border: 1px solid var(--line, rgb(0 0 0 / .12)); border-radius: 999px; background: var(--bg-elevated, #fff); color: var(--label, #111);
  box-shadow: var(--shadow-float, 0 8px 24px rgb(0 0 0 / .18)); font: 600 var(--t-subhead, 15px)/1.2 var(--font, sans-serif); cursor: pointer;
}
.obx-pill[hidden] { display: none; }
.obx-pill .ico { width: 20px; height: 20px; color: var(--warning-text, #8a5a00); }
.obx-pill[data-tone="critical"] .ico { color: var(--critical-text, #b42318); }
.obx-pill[data-busy="true"] .ico { animation: obx-pulse 1.2s ease-in-out infinite; }
body:has(.shell[data-chrome="floor"]) .obx-pill { min-height: 56px; padding: 0 20px 0 16px; font-size: var(--t-body, 17px); }
@media (max-width: 767.98px) { body:has(.shell[data-chrome="app"]) .obx-pill { bottom: calc(var(--tabbar-h, 56px) + 10px + env(safe-area-inset-bottom)); } }
@keyframes obx-pulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .obx-pill[data-busy="true"] .ico { animation: none; } }

.obx-list { display: grid; gap: 14px; }
.obx-list h3 { margin: 4px 0 0; font-size: var(--t-headline, 17px); font-weight: 600; }
.obx-list p { margin: 0; color: var(--text-2, #555); font-size: var(--t-subhead, 15px); }
.obx-rows { list-style: none; margin: 0; padding: 0; border-radius: var(--r-group, 12px); background: var(--bg-card, #fff); overflow: hidden; }
.obx-rows li { display: grid; gap: 2px; padding: 12px 16px; border-top: 1px solid var(--separator, rgb(0 0 0 / .08)); }
.obx-rows li:first-child { border-top: 0; }
.obx-rows b { font-weight: 600; }
.obx-rows small { color: var(--text-2, #555); font-size: var(--t-footnote, 13px); }
.obx-rows .obx-why { color: var(--critical-text, #b42318); }
.obx-note { padding: 10px 14px; border-radius: 10px; background: var(--warning-soft, #fff4d6); color: var(--warning-text, #6b4500); }
.obx-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.obx-actions .btn { min-height: 48px; }

.upd-bar {
  position: fixed; z-index: 61; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; max-width: min(calc(100% - 24px), 560px); min-height: 52px; padding: 6px 6px 6px 16px;
  border-radius: 12px; background: #17181B; color: #F4F4F5; box-shadow: 0 12px 32px rgb(0 0 0 / .28); font: 500 var(--t-subhead, 15px)/1.3 var(--font, sans-serif);
}
.upd-bar[hidden] { display: none; }
.upd-bar > span { flex: 1; min-width: 0; }
.upd-bar .btn { min-height: 44px; background: rgb(255 255 255 / .12); color: #fff; border-color: transparent; box-shadow: none; }
body:has(.obx-pill:not([hidden])) .upd-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (max-width: 767.98px) { body:has(.shell[data-chrome="app"]) .upd-bar { bottom: calc(var(--tabbar-h, 56px) + 10px + env(safe-area-inset-bottom)); } }

.upd-needed {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  background: var(--bg, #f7f7f5); color: var(--label, #111); font-family: var(--font, sans-serif);
}
.upd-needed > div { display: grid; gap: 14px; max-width: 440px; text-align: center; justify-items: center; }
.upd-needed h1 { margin: 0; font-size: var(--t-title2, 22px); font-weight: 600; }
.upd-needed p { margin: 0; color: var(--text-2, #555); }
.upd-needed .ico { width: 40px; height: 40px; color: var(--accent, #2a6df4); }
.upd-needed .btn { min-height: 56px; min-width: 200px; }

.upd-note {
  position: fixed; z-index: 62; right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid; gap: 10px; width: min(calc(100% - 24px), 400px); padding: 16px; border-radius: 14px;
  background: var(--bg-elevated, #fff); color: var(--label, #111); box-shadow: var(--shadow-pop, 0 16px 40px rgb(0 0 0 / .22));
  border: 1px solid var(--line, rgb(0 0 0 / .1)); font-family: var(--font, sans-serif);
}
.upd-note h2 { margin: 0; font-size: var(--t-headline, 17px); font-weight: 600; }
.upd-note ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: var(--t-subhead, 15px); }
.upd-note .btn { justify-self: end; min-height: 44px; }
