/* Safe Area & dynamic viewport utilities */

:root {
  /* Dynamic viewport height unit (1% of visual viewport height) */
  --vh: 1vh;
  /* Additional bottom offset when soft navigation bar overlaps (Android/WebView approximated) */
  --soft-nav-offset: 0px;
}

/*
  Body safe padding:
  - Base bottom spacing for fixed bottom nav (Tailwind pb-16 = 4rem)
  - Safe area inset (iOS/Safari/WebView)
  - Soft navigation bar overlap (Android WebView approximation)
*/
.safe-area-bottom {
  padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px) + var(--soft-nav-offset, 0px));
}

/* Full-height utility to avoid 100vh issues on mobile (URL bar, overlays) */
.full-height {
  min-height: calc(var(--vh, 1vh) * 100);
}

/* Fixed bottom navigation should include safe area padding so it's fully visible */
.safe-bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Sticky bottom actions/buttons should respect the safe area */
.sticky-safe-bottom {
  position: sticky;
  bottom: env(safe-area-inset-bottom, 0px);
}