/* Correções para responsividade mobile dos botões CTA */

/* Reset e estilos base para todos os botões */
button {
  /* Forçar largura responsiva */
  max-width: calc(100vw - 2rem) !important;
  width: auto !important;
  min-width: auto !important;
  box-sizing: border-box !important;
  
  /* Padding responsivo */
  padding: 0.75rem 1rem !important;
  
  /* Texto responsivo */
  font-size: 1rem !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  
  /* Layout */
  display: block !important;
  margin: 0.5rem auto !important;
  text-align: center !important;
  
  /* Garantir que não haja overflow */
  overflow: visible !important;
  text-overflow: clip !important;
}

/* Media queries para diferentes tamanhos de tela */
@media (max-width: 768px) {
  button {
    /* Em tablets e mobile, reduzir ainda mais o padding */
    padding: 0.875rem 1.25rem !important;
    font-size: 1rem !important;
    max-width: calc(100vw - 2rem) !important;
  }
}

@media (max-width: 480px) {
  button {
    /* Em telas muito pequenas, ajustar ainda mais */
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    max-width: calc(100vw - 1.5rem) !important;
    
    /* Permitir quebra de linha se necessário */
    white-space: normal !important;
    line-height: 1.3 !important;
    min-height: 3rem !important;
  }
}

@media (max-width: 375px) {
  button {
    /* Para iPhone SE e telas similares */
    padding: 0.625rem 0.875rem !important;
    font-size: 0.85rem !important;
    max-width: calc(100vw - 1rem) !important;
  }
}

/* Correções específicas para containers dos botões */
div:has(button),
.button-container,
section:has(button),
[class*="container"]:has(button) {
  padding: 0 1rem !important;
  max-width: 100% !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* Garantir que o container principal não cause overflow */
body, html {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

/* Correções para elementos que podem estar causando overflow */
* {
  box-sizing: border-box !important;
}

/* Ajustes específicos para o layout do site */
.container, 
.max-w-4xl, 
.max-w-6xl,
[class*="max-w"],
[class*="container"] {
  max-width: 100% !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  box-sizing: border-box !important;
}

/* Correções específicas para React/Tailwind classes */
.px-4, .px-6, .px-8, .px-12, .px-16 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: calc(100vw - 2rem) !important;
}

/* Forçar reset de estilos inline que podem estar causando problemas */
button[style] {
  width: auto !important;
  max-width: calc(100vw - 2rem) !important;
  padding: 0.75rem 1rem !important;
}
