/* Peeli Goli App – install banner + app-mode bottom navigation */

:root {
  --pgpwa-yellow: #FFC107;
  --pgpwa-ink: #212529;
  --pgpwa-muted: #6c757d;
  --pgpwa-nav-h: 62px;
}

/* ---------- Install banner ---------- */
.pgpwa-install {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 14px;
  background: #fff;
  color: var(--pgpwa-ink);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  font: 14px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  transform: translateY(140%);
  transition: transform .35s ease;
}
.pgpwa-install.is-visible { transform: translateY(0); }
.pgpwa-install__icon { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.pgpwa-install__text { flex: 1; min-width: 0; }
.pgpwa-install__text strong { display: block; font-size: 15px; }
.pgpwa-install__text span { color: var(--pgpwa-muted); font-size: 13px; }
.pgpwa-install__btn {
  flex: none;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--pgpwa-yellow);
  color: var(--pgpwa-ink);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.pgpwa-install__close {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--pgpwa-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Bottom navigation (only inside the installed app) ---------- */
.pgpwa-nav { display: none; }

.pgpwa-standalone .pgpwa-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99998;
  display: flex;
  height: calc(var(--pgpwa-nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .05);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.pgpwa-nav__item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--pgpwa-muted) !important;
  text-decoration: none !important;
  font-size: 11px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.pgpwa-nav__item svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pgpwa-nav__item.is-active { color: var(--pgpwa-ink) !important; }
.pgpwa-nav__item.is-active svg { fill: var(--pgpwa-yellow); }
.pgpwa-nav__badge {
  position: absolute;
  top: 6px;
  left: 50%;
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

/* Keep page content and floating buttons clear of the nav bar */
.pgpwa-standalone body { padding-bottom: calc(var(--pgpwa-nav-h) + env(safe-area-inset-bottom)) !important; }
.pgpwa-standalone .joinchat,
.pgpwa-standalone [class*="whatsapp"][style*="fixed"],
.pgpwa-standalone .scrollToTop,
.pgpwa-standalone #scroll-top { bottom: calc(var(--pgpwa-nav-h) + 16px + env(safe-area-inset-bottom)) !important; }

/* The theme's own mobile bottom menu would duplicate ours */
.pgpwa-standalone .mobile-bottom-menu,
.pgpwa-standalone .klb-mobile-bottom { display: none !important; }

@media (min-width: 1024px) {
  .pgpwa-standalone .pgpwa-nav { display: none; }
  .pgpwa-standalone body { padding-bottom: 0 !important; }
}
