/* CSS específico para compatibilidade iOS - Resolver "acesso não autorizado" */

/* Configurações gerais para iOS Safari */
* {
    -webkit-touch-callout: default !important;
    -webkit-user-select: text !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
    -webkit-appearance: none !important;
}

/* Permitir seleção de texto no iOS */
body, html, div, p, span, a, h1, h2, h3, h4, h5, h6 {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
}

/* Configurações específicas para formulários iOS */
input, textarea, select, button {
    -webkit-appearance: none !important;
    -webkit-border-radius: 0 !important;
    border-radius: 4px !important;
    -webkit-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
}

/* Permitir zoom no iOS */
meta[name="viewport"] {
    content: "width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes" !important;
}

/* Configurações para WebKit iOS */
@supports (-webkit-touch-callout: none) {
    /* Específico para iOS Safari */
    
    /* Permitir menu de contexto */
    * {
        -webkit-touch-callout: default !important;
    }
    
    /* Configurações de scroll suave */
    html {
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Configurações de input para iOS */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        -webkit-appearance: none !important;
        -webkit-border-radius: 0 !important;
        border-radius: 4px !important;
        background-color: white !important;
        border: 1px solid #ccc !important;
    }
    
    /* Botões iOS */
    button, input[type="submit"], input[type="button"] {
        -webkit-appearance: none !important;
        border-radius: 4px !important;
        cursor: pointer !important;
    }
}

/* Configurações específicas para iPhone */
@media only screen and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 2) {
    /* iPhone específico */
    
    body {
        -webkit-text-size-adjust: 100% !important;
        -ms-text-size-adjust: 100% !important;
    }
    
    /* Permitir seleção em iPhone */
    * {
        -webkit-user-select: text !important;
        -webkit-touch-callout: default !important;
    }
    
    /* Configurações de viewport para iPhone */
    html {
        -webkit-text-size-adjust: none !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* Configurações para iPad */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
    /* iPad específico */
    
    * {
        -webkit-user-select: text !important;
        -webkit-touch-callout: default !important;
    }
}

/* Remover restrições que podem causar "acesso não autorizado" */
html, body {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Configurações de segurança flexíveis para iOS */
iframe {
    border: none !important;
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
}

/* Configurações de fonte para iOS */
body, html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Configurações de link para iOS */
a {
    -webkit-touch-callout: default !important;
    -webkit-user-select: text !important;
    text-decoration: none !important;
    color: inherit !important;
}

a:hover, a:focus, a:active {
    outline: none !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
}

/* Configurações de imagem para iOS */
img {
    -webkit-touch-callout: default !important;
    -webkit-user-select: text !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Configurações de vídeo para iOS */
video {
    -webkit-playsinline: true !important;
    playsinline: true !important;
    controls: true !important;
}

/* Configurações específicas para resolver problemas de autorização */
.container, .wrapper, .content, main, section, article, div {
    -webkit-user-select: text !important;
    -webkit-touch-callout: default !important;
    pointer-events: auto !important;
}

/* Configurações de menu para iOS */
nav, .nav, .menu, .navigation {
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    pointer-events: auto !important;
}

nav a, .nav a, .menu a, .navigation a {
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
}

/* Configurações de formulário específicas para iOS */
form {
    -webkit-user-select: text !important;
    -webkit-touch-callout: default !important;
}

/* Configurações de botão específicas para iOS */
button:hover, button:focus, button:active {
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
    outline: none !important;
}

/* Configurações para evitar problemas de autorização em iOS */
* {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    will-change: auto !important;
}

/* Configurações de performance para iOS */
.gpu-accelerated {
    -webkit-transform: translate3d(0,0,0) !important;
    transform: translate3d(0,0,0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

/* Configurações de acessibilidade para iOS */
[role="button"], [role="link"], [role="menuitem"] {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
}

/* Configurações específicas para WebView iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    /* WebView específico */
    
    html {
        -webkit-text-size-adjust: 100% !important;
    }
    
    body {
        -webkit-overflow-scrolling: touch !important;
        overflow: auto !important;
    }
}

/* Configurações para resolver "acesso não autorizado" específico */
html {
    -webkit-user-select: text !important;
    -webkit-touch-callout: default !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
}

/* Configurações de cache para iOS */
.no-cache {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
}

/* Configurações finais para compatibilidade total iOS */
* {
    box-sizing: border-box !important;
    -webkit-box-sizing: border-box !important;
    -moz-box-sizing: border-box !important;
}

