/* Safe area for iPhone notch and Dynamic Island */
body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body.btf-public-profile-page {
  display: block !important;
  padding: 0 !important;
  height: auto !important;
  max-height: none !important;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-y: auto;
}

/* Disable text selection app-wide for native feel */
* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Allow text selection inside input fields and textareas only */
input, textarea, [contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}

/* Remove tap highlight */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Prevent scroll bounce on iOS */
html, body {
  overscroll-behavior: none;
  overflow-x: hidden;
}

body.btf-public-profile-page,
body.btf-public-profile-page .btf-public-profile-shell {
  overscroll-behavior-y: auto;
}

/* Full height on iOS */
html {
  height: -webkit-fill-available;
}

html.btf-public-profile-document {
  height: auto !important;
  max-height: none !important;
  min-height: 100% !important;
  overflow-y: auto !important;
}

body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

body.btf-public-profile-page .btf-public-profile-shell {
  min-height: 100dvh;
  width: 100%;
  overflow: visible;
}

body.btf-public-gate-page {
  height: auto !important;
  max-height: none !important;
  min-height: 100dvh;
  overflow-y: auto;
}

.btf-public-gate-main {
  min-height: 100dvh;
  padding-bottom: max(2.5rem, calc(env(safe-area-inset-bottom) + 1.5rem));
}
