/* Browser-specific compatibility fixes */

/* Samsung Internet specific fixes */
.samsung-internet {
  /* Ensure viewport units work correctly */
  --vh: 1vh;
}

.samsung-internet .MuiDialog-paper {
  /* More conservative heights for Samsung Internet */
  max-height: 90vh !important;
  margin: 8px !important;
}

/* Fallback for browsers that don't support sticky positioning */
@supports not (position: sticky) {
  .MuiDialogTitle-root[style*="position: sticky"],
  .MuiDialogActions-root[style*="position: sticky"] {
    position: fixed !important;
    width: calc(100% - 16px) !important;
    left: 8px !important;
    z-index: 1300 !important;
  }
  
  .MuiDialogTitle-root[style*="position: sticky"] {
    top: 0 !important;
  }
  
  .MuiDialogActions-root[style*="position: sticky"] {
    bottom: 0 !important;
  }
}

/* Ensure proper touch scrolling on Samsung Internet */
.samsung-internet .MuiDialogContent-root {
  -webkit-overflow-scrolling: touch;
  overflow-scrolling: touch;
}

/* Fix for viewport calculation issues */
@media screen and (max-width: 768px) {
  .samsung-internet .MuiDialog-paper {
    height: 90vh !important;
    max-height: 90vh !important;
    width: 98vw !important;
    max-width: 98vw !important;
  }
}
