/* iOS PWA Standalone Mode Styles */
@supports (padding: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Hide scrollbar in standalone mode but keep functionality */
@supports (overscroll-behavior: none) {
  html {
    overscroll-behavior: none;
  }
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Improve tap highlight color */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Disable selection in PWA */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Enable selection only for text elements */
input, textarea {
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

/* PWA splash screen background */
@media (display-mode: standalone) {
  body {
    min-height: 100vh;
  }
  
  /* Hide browser UI elements */
  html {
    overflow: hidden;
  }
  
  body {
    overflow: auto;
  }
}

/* Status bar styling for iOS */
@supports (top: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
  }
}

/* Disable pull-to-refresh in PWA */
@supports (overscroll-behavior: none) {
  html,
  body {
    overscroll-behavior: none;
  }
}

/* Improve touch response */
button, a, input, select, textarea {
  touch-action: manipulation;
}
