/* Amplitude Guides & Surveys — force Outfit font */
[class*="engagement"] * {
  font-family: 'Outfit', sans-serif !important;
}

/* Amplitude checklist step titles — bold */
.r-1x266ce {
  font-family: 'Outfit' !important;
  font-weight: 700 !important;
}

/* PWA Layout - Fixed Header and Footer */
#root {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* Portal tab bar: max(env, 8px) preserves the original 8px on desktop,
   uses actual safe area on iPhone PWA (env=34px on iPhone 16 Pro) */
[data-testid="portal-tabbar"] {
  padding-bottom: max(env(safe-area-inset-bottom), 8px) !important;
}

/* Pro app tab bar in standalone (home screen) mode:
   CSS media query is the primary fix — more reliable than JS isStandalone detection.
   Targets Level 1 container (parent of role=tablist). `:has()` supported iOS 15.4+ */
@media (display-mode: standalone) {
  div:has(> [role="tablist"]) {
    height: calc(55px + max(env(safe-area-inset-bottom), 34px)) !important;
    padding-bottom: max(env(safe-area-inset-bottom), 34px) !important;
  }
}
