/* PWA v2 — standalone app shell */

html.pnuel-standalone body,
body.pnuel-standalone {
  padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
}

/* Compact top nav in installed app */
html.pnuel-standalone .pnuel-site-nav .pwa-hide-standalone,
body.pnuel-standalone .pnuel-site-nav .pwa-hide-standalone {
  display: none !important;
}

html.pnuel-standalone .pnuel-site-footer,
body.pnuel-standalone .pnuel-site-footer {
  display: none !important;
}

/* Lift WhatsApp above bottom nav */
html.pnuel-standalone .whatsapp-float,
body.pnuel-standalone .whatsapp-float,
html.pnuel-standalone [class*="whatsapp"],
body.pnuel-standalone .fixed.bottom-6.right-6 {
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important;
}

/* Bottom tab bar */
.pnuel-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
}

html.pnuel-standalone .pnuel-bottom-nav,
body.pnuel-standalone .pnuel-bottom-nav {
  display: block;
}

.pnuel-bottom-nav__row {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  max-width: 36rem;
  margin: 0 auto;
}

.pnuel-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.4rem 0.2rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
  border-radius: 0.75rem;
  min-width: 0;
}

.pnuel-bottom-nav__item i {
  font-size: 1.1rem;
  line-height: 1;
}

.pnuel-bottom-nav__item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.pnuel-bottom-nav__item.is-active,
.pnuel-bottom-nav__item:hover {
  color: #1B5E20;
  background: #f0fdf4;
}

/* Offline toast */
#pnuel-offline-toast {
  display: none;
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  background: #1f2937;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

#pnuel-offline-toast.is-visible {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#pnuel-offline-toast.is-online {
  background: #15803d;
}
