/* Eden PWA: install prompt, update notice, offline banner. */
.pwa-pill, .pwa-toast, .pwa-sheet, .pwa-offline { font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }

.pwa-pill {
  position: fixed; z-index: 1300; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: .55rem;
  background: #0d3320; color: #fff; border: none; border-radius: 999px;
  padding: .55rem .6rem .55rem .9rem; font-size: .85rem; font-weight: 500;
  box-shadow: 0 6px 20px rgba(13,51,32,.28); cursor: pointer;
  transform: translateY(140%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.pwa-pill.show { transform: none; }
.pwa-pill img { width: 22px; height: 22px; border-radius: 5px; background: #fff; padding: 2px; }
.pwa-pill .pwa-x {
  all: unset; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  color: rgba(255,255,255,.65); font-size: 1rem; line-height: 1;
}
.pwa-pill .pwa-x:hover { background: rgba(255,255,255,.12); color: #fff; }
.pwa-pill:focus-visible, .pwa-pill .pwa-x:focus-visible, .pwa-toast button:focus-visible { outline: 2px solid #c4903c; outline-offset: 2px; }

.pwa-toast {
  position: fixed; z-index: 1300; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translate(-50%, 160%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  display: flex; align-items: center; gap: .8rem; max-width: calc(100vw - 2rem);
  background: #1a1208; color: #fff; border-radius: 10px; padding: .6rem .7rem .6rem 1rem; font-size: .85rem;
  box-shadow: 0 8px 24px rgba(26,18,8,.3);
}
.pwa-toast.show { transform: translate(-50%, 0); }
.pwa-toast button { border: none; border-radius: 6px; padding: .35rem .8rem; font: inherit; font-weight: 500; cursor: pointer; }
.pwa-toast .pwa-go { background: #c4903c; color: #fff; }
.pwa-toast .pwa-later { background: transparent; color: rgba(255,255,255,.6); }

.pwa-sheet-bg { position: fixed; inset: 0; z-index: 1350; background: rgba(26,18,8,.45); opacity: 0; transition: opacity .2s; }
.pwa-sheet-bg.show { opacity: 1; }
.pwa-sheet {
  position: fixed; z-index: 1360; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 480px;
  background: #fff; color: #1a1208; border-radius: 16px 16px 0 0;
  padding: 1.4rem 1.4rem max(1.4rem, env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.pwa-sheet.show { transform: none; }
.pwa-sheet h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; color: #0d3320; font-size: 1.2rem; margin: 0 0 .9rem; display: flex; align-items: center; gap: .6rem; }
.pwa-sheet h3 img { width: 36px; height: 36px; border-radius: 8px; border: 1px solid #e2d9cc; }
.pwa-sheet ol { margin: 0 0 1rem 1.1rem; padding: 0; font-size: .92rem; line-height: 1.7; }
.pwa-sheet .pwa-share { display: inline-block; vertical-align: -3px; width: 18px; height: 18px; }
.pwa-sheet button { width: 100%; border: none; border-radius: 8px; padding: .65rem; background: #0d3320; color: #fff; font: inherit; font-weight: 500; cursor: pointer; }

.pwa-offline {
  position: fixed; z-index: 1290; left: 0; right: 0; top: 0;
  padding: calc(.35rem + env(safe-area-inset-top)) 1rem .35rem;
  background: #7c2020; color: #fff; text-align: center; font-size: .8rem;
  transform: translateY(-100%); transition: transform .25s ease;
}
.pwa-offline.show { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .pwa-pill, .pwa-toast, .pwa-sheet, .pwa-sheet-bg, .pwa-offline { transition: none; }
}
@media print { .pwa-pill, .pwa-toast, .pwa-sheet, .pwa-sheet-bg, .pwa-offline { display: none !important; } }

/* Right-to-left languages: mirror the floating controls. */
[dir="rtl"] .pwa-pill { right: auto; left: max(1rem, env(safe-area-inset-left)); }
