/* Otimizações de Performance para iOS Safari */

/* Remove delay de 300ms em taps (crítico para iOS) */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* Melhora performance de scroll no iOS */
body, html {
  -webkit-overflow-scrolling: touch;
  overflow-scrolling: touch;
  overscroll-behavior: none;
}

/* Acelera animações usando GPU do iPhone */
* {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000;
  perspective: 1000;
}

/* Remove hover states que ficam presos no iOS */
@media (hover: none) and (pointer: coarse) {
  *:hover {
    background-color: inherit !important;
    color: inherit !important;
  }
  
  button:hover,
  a:hover,
  input:hover {
    opacity: 1 !important;
  }
}

/* Otimiza inputs para iOS */
input, textarea, select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
}

/* Previne zoom indesejado em inputs no iOS */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
  font-size: 16px !important;
}

/* Melhora performance de cliques/taps */
button, a, [role="button"] {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

/* Força re-render suave */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Otimiza transições para usar GPU */
* {
  will-change: auto;
}

button, a, input {
  will-change: transform;
}

/* Remove efeitos visuais desnecessários no iOS */
* {
  -webkit-user-drag: none;
  -webkit-user-modify: read-write-plaintext-only;
}

/* Melhora performance de listas/scrolls longos */
[data-flutter-viewport] {
  contain: layout style paint;
}
