/* FreshDrop — PWA install UI (banner, iPhone guide, footer button) */
.pwa-banner {
  position: fixed; z-index: 1050; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 12px;
  width: min(calc(100% - 24px), 520px);
  padding: 12px 10px 12px 12px;
  color: var(--text); background: var(--white, #fff);
  border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, calc(100% + 40px)); opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.25s;
}
.pwa-banner.is-in { transform: translate(-50%, 0); opacity: 1; }
.pwa-banner img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.pwa-banner-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.pwa-banner-text strong { color: var(--ink); font-size: 0.9375rem; }
.pwa-banner-text span { color: var(--muted); font-size: 0.8125rem; }

.pwa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  min-height: 42px; padding: 0 16px;
  color: var(--white, #fff); background: var(--primary);
  border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 0.9375rem;
  transition: background 0.15s, transform 0.15s;
}
.pwa-btn:hover { background: var(--primary-hover); }
.pwa-btn:active { transform: scale(0.97); }
.pwa-btn-block { width: 100%; min-height: 50px; margin-top: 18px; }
.pwa-x {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; padding: 0;
  color: var(--muted); background: transparent; border: 0; border-radius: 50%; cursor: pointer;
}
.pwa-x:hover { background: var(--surface); color: var(--ink); }

.pwa-sheet-wrap { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end; justify-content: center; }
.pwa-backdrop { position: absolute; inset: 0; background: rgb(8 24 28 / 0.5); animation: pwa-fade 0.2s both; }
.pwa-sheet {
  position: relative; width: min(100%, 480px);
  padding: 28px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  background: var(--bg, #fff); border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-lg); text-align: center;
  animation: pwa-up 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.pwa-sheet-wrap.is-closing .pwa-sheet { animation: pwa-down 0.2s ease-in both; }
.pwa-sheet-wrap.is-closing .pwa-backdrop { animation: pwa-fade 0.2s reverse both; }
.pwa-sheet .pwa-x { position: absolute; top: 12px; right: 12px; }
.pwa-sheet-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 16px; box-shadow: var(--shadow-md); }
.pwa-sheet h2 { font-size: 1.375rem; margin-bottom: 4px; }
.pwa-warn { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--warning-soft); color: var(--warning); font-size: 0.875rem; }
.pwa-steps { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; text-align: left; }
.pwa-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9375rem; }
.pwa-steps li > span {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px;
  border-radius: 10px; background: var(--primary-soft); color: var(--primary-ink); font-weight: 800;
}
.pwa-steps svg { display: inline-block; vertical-align: -3px; color: var(--primary); }
@keyframes pwa-fade { from { opacity: 0; } }
@keyframes pwa-up { from { transform: translateY(100%); } }
@keyframes pwa-down { to { transform: translateY(100%); } }

.pwa-footer-btn button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 0;
  color: inherit; background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}

/* Kapag naka-install (app mode): iwasan matakpan ng notch / home bar */
html.is-standalone body { padding-bottom: env(safe-area-inset-bottom, 0px); }
html.fd-admin .pwa-banner { display: none; }

@media (prefers-reduced-motion: reduce) {
  .pwa-banner, .pwa-sheet, .pwa-backdrop { transition: none; animation: none; }
}
