/* Install helper (assets/js/pwa.js, spec 022): Android «Εγκατάσταση εφαρμογής» button and the iOS «Προσθήκη στην αρχική οθόνη» sheet.
   Self-contained (system font, own colours) so it looks the same in every draft and in the CMS site. Contrast: cream #F7F2E8 and
   amber #C8A052 on ink #14120E are both well above 4.5:1. Targets are at least 44px.
   Placement: bottom-LEFT (the proposal switcher .pbar is bottom-right). While the phone order bar of the shop is up
   (body.shop-bar-on + --shop-bar-h, both set by shop.js) everything sits ABOVE it, so the pay button is never covered. */
.pwa-install, .pwa-sheet {
  --pwa-lift: 0px;
  position: fixed; z-index: 95; box-sizing: border-box;
  font: 400 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: 0;
  color: #F7F2E8; background: #14120E;
}
.pwa-install *, .pwa-sheet * { box-sizing: border-box; }
body.shop-bar-on .pwa-install, body.shop-bar-on .pwa-sheet { --pwa-lift: var(--shop-bar-h, 72px); }
.pwa-install[hidden], .pwa-sheet[hidden] { display: none; }

/* ---------- Android / desktop Chromium: install button ---------- */
.pwa-install {
  left: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px) + var(--pwa-lift));
  display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .55rem 1.1rem .55rem .9rem;
  border: 1px solid rgba(247, 242, 232, .45); border-radius: 999px; box-shadow: 0 6px 24px rgba(0, 0, 0, .32);
  font-weight: 600; cursor: pointer;
}
.pwa-install svg { width: 1.2rem; height: 1.2rem; flex: none; color: #C8A052; }
.pwa-install:hover { background: #2A251C; }
.pwa-install:focus-visible, .pwa-sheet button:focus-visible { outline: 3px solid #C8A052; outline-offset: 3px; }

/* ---------- iOS: bottom sheet ---------- */
.pwa-sheet {
  left: 0; right: 0; bottom: calc(var(--pwa-lift)); width: min(34rem, 100%); margin-inline: auto;
  padding: 1.1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border: 1px solid rgba(247, 242, 232, .2); border-bottom: 0; border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .4); z-index: 96;
}
body.shop-bar-on .pwa-sheet { border-bottom: 1px solid rgba(247, 242, 232, .2); border-radius: 1.25rem; bottom: calc(var(--shop-bar-h, 72px) + 8px); }
.pwa-sheet__title { margin: 0 0 .25rem; font-family: inherit; font-weight: 600; font-size: 1.15rem; line-height: 1.3; color: inherit; }
.pwa-sheet__text { margin: 0 0 .8rem; color: #C6BDAC; }
.pwa-sheet__steps { list-style: none; margin: 0 0 .9rem; padding: 0; display: grid; gap: .6rem; counter-reset: pwa-step; }
.pwa-sheet__steps li { display: flex; align-items: center; gap: .75rem; min-height: 44px; counter-increment: pwa-step; }
.pwa-sheet__steps li::before {
  content: counter(pwa-step); flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center;
  background: #C8A052; color: #14120E; font-weight: 700; font-size: .95rem;
}
.pwa-sheet__steps svg { display: inline-block; width: 1.35rem; height: 1.35rem; vertical-align: -.3em; margin-inline: .15rem; color: #C8A052; }
.pwa-sheet__dismiss {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: .5rem 1.2rem;
  border: 1px solid rgba(247, 242, 232, .45); border-radius: 999px; background: transparent; color: #F7F2E8;
  font: inherit; font-weight: 600; cursor: pointer;
}
.pwa-sheet__dismiss:hover { background: #2A251C; }

@media (prefers-reduced-motion: no-preference) {
  .pwa-sheet { animation: pwa-rise .35s ease-out both; }
  .pwa-install { animation: pwa-fade .3s ease-out both; }
  .pwa-install, .pwa-sheet__dismiss { transition: background-color .2s; }
}
@keyframes pwa-rise { from { transform: translateY(100%); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pwa-fade { from { opacity: 0; } to { opacity: 1; } }

/* never inside the installed app, never on paper */
@media (display-mode: standalone), (display-mode: fullscreen), print { .pwa-install, .pwa-sheet { display: none !important; } }
