body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

* {
  box-sizing: border-box;
  /* Fix for iOS Safari touch events */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Ensure all interactive elements are clickable on iOS */
button,
a,
[role="button"],
input[type="button"],
input[type="submit"],
.TouchableOpacity,
.TouchableHighlight,
.TouchableWithoutFeedback,
div[class*="Pressable"],
div[class*="Touchable"] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Fix for React Native Web Pressable/TouchableOpacity on iOS */
[data-pressable],
[data-touchable] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#root {
  height: 100vh;
  width: 100vw;
  /* Fix for iOS Safari */
  -webkit-overflow-scrolling: touch;
  overflow-scrolling: touch;
}

/* Force touch event initialization on iOS Safari */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari specific fixes */
  * {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
  
  /* Ensure all Pressable/TouchableOpacity elements work on first load */
  div[style*="cursor: pointer"],
  div[style*="cursor:pointer"],
  button,
  a,
  [role="button"],
  div[onclick],
  div[data-testid*="pressable"],
  div[data-testid*="touchable"] {
    touch-action: manipulation !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    pointer-events: auto !important;
  }
  
  /* Force all divs with pointer cursor to be interactive */
  div {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
}
