.eisi-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.eisi-popup .popup-content {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  /* largura máxima em %; altura ajusta de acordo com conteúdo */
  width: 60%;
  max-width: 800px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  transition: width 0.3s ease;
  max-height: 90vh; /* Limita altura máxima */
  overflow-y: auto; /* Permite scroll se necessário */
  padding: 0; /* Remove qualquer padding */
}

/* Container da imagem com controle de altura */
.image-container {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* imagens - controle básico sem sobrescrever display */
.desktop-image, .mobile-image {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 8px 8px 0 0; /* Mantém bordas arredondadas no topo */
}

/* imagens */
.desktop-image { display: block; }
.mobile-image  { display: none; }
@media (max-width: 768px) {
  .desktop-image { display: none; }
  .mobile-image  { display: block; }
}

/* botão fechar */
.eisi-popup #eisi-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  border: 2px solid #ddd;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.eisi-popup #eisi-popup-close:hover {
  background: #fff;
  transform: scale(1.1);
}

/* botão na imagem */
.popup-overlay-button {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  text-decoration: none;
  font-size: 12px;
}

/* botão abrir */
#eisi-popup-open-button {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 10000;
}

.button-eisi-popup span {
  display: inline-block;
  line-height: 1.6;
  font-family: "Quicksand-Light", sans-serif;
  background: transparent;
  padding: 5px 22px;
  border-radius: 90px 90px;
}

form#eisi-fpc-form {
  padding: 20px 50px 0px 40px;
}

.eisi-fpc-response {
    padding: 20px; 
    text-align: center;
}

.title1 {
  color: #1a7b34;
} 

.title2 {
  margin: 0px;
} 

.title3{
  color: #c31414;
}

div#eisi-fpc-response {
    text-align: center; 
}

/* Responsividade melhorada para mobile */
@media (max-width: 768px) {
  .eisi-popup .popup-content {
    /* Ajusta largura para mobile com margens adequadas */
    width: calc(100% - 30px) !important;
    margin: 15px auto !important;
    /* Limita altura para caber na viewport */
    max-height: calc(100vh - 30px);
    overflow-y: auto;
  }
  
  /* Melhora posicionamento do botão fechar no mobile */
  .eisi-popup #eisi-popup-close {
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.95);
  }
  
  /* Controla altura da imagem no mobile */
  .desktop-image, .mobile-image {
    max-height: 50vh; /* Limita altura da imagem */
    object-fit: contain; /* Mantém proporção */
  }
  
  /* Ajusta padding do formulário no mobile */
  form#eisi-fpc-form {
    padding: 15px 20px 0px 20px;
  }
  
  /* Melhora botão overlay no mobile */
  .popup-overlay-button {
    font-size: 11px;
    bottom: 8px;
  }
}

/* Para telas muito pequenas (smartphones pequenos) */
@media (max-width: 480px) {
  .eisi-popup .popup-content {
    width: calc(100% - 20px) !important;
    margin: 10px auto !important;
    max-height: calc(100vh - 20px);
  }
  
  /* Imagem ainda menor em telas muito pequenas */
  .desktop-image, .mobile-image {
    max-height: 40vh;
  }
  
  /* Formulário mais compacto */
  form#eisi-fpc-form {
    padding: 10px 15px 0px 15px;
  }
  
  /* Ajusta tamanho dos inputs */
  #eisi-fpc-form input {
    margin: 3px 0;
    padding: 8px;
    font-size: 14px;
  }
  
  /* Botão menor */
  .popup-overlay-button {
    font-size: 10px;
    padding: 4px 8px;
  }
}