/**
 * Bonville Lead Tracker - Estilos
 */

/* Botão flutuante WhatsApp */
.bonville-whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: all 0.3s ease;
  animation: bonville-pulse 2s infinite;
}

.bonville-whatsapp-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.bonville-whatsapp-button svg {
  width: 32px;
  height: 32px;
}

/* Animação de pulso */
@keyframes bonville-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Modal */
.bonville-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  animation: bonville-fadeIn 0.3s ease;
}

@keyframes bonville-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Conteúdo do modal */
.bonville-modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 450px;
  width: 90%;
  position: relative;
  animation: bonville-slideUp 0.3s ease;
}

@keyframes bonville-slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Header do modal */
.bonville-modal-header {
  margin-bottom: 25px;
  text-align: center;
}

.bonville-modal-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.bonville-modal-header p {
  margin: 0;
  color: #666;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Botão fechar */
.bonville-close-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  transition: color 0.2s;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bonville-close-btn:hover {
  color: #333;
}

/* Formulário */
#bonville-form {
  display: block;
}

.bonville-form-group {
  margin-bottom: 18px;
}

.bonville-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.bonville-form-group input,
.bonville-form-group select {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #fff;
}

.bonville-form-group input:focus,
.bonville-form-group select:focus {
  outline: none;
  border-color: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.bonville-form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  padding-right: 35px;
}

/* Botão de envio */
.bonville-submit-btn {
  width: 100%;
  padding: 13px;
  background-color: #25d366;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin-top: 8px;
}

.bonville-submit-btn:hover {
  background-color: #20ba58;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.bonville-submit-btn:active {
  transform: translateY(0);
}

.bonville-submit-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Loading */
.bonville-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.bonville-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #25d366;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: bonville-spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes bonville-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.bonville-loading p {
  color: #666;
  font-size: 14px;
}

/* Erro */
.bonville-error {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  text-align: center;
}

.bonville-error p {
  color: #c33;
  font-size: 14px;
  margin-bottom: 20px;
  background-color: #fee;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #fcc;
}

.bonville-retry-btn {
  background-color: #667eea;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.bonville-retry-btn:hover {
  background-color: #5568d3;
  transform: translateY(-2px);
}

/* Responsivo */
@media (max-width: 480px) {
  .bonville-whatsapp-button {
    width: 55px;
    height: 55px;
    bottom: 15px;
    right: 15px;
  }

  .bonville-whatsapp-button svg {
    width: 28px;
    height: 28px;
  }

  .bonville-modal-content {
    max-width: 95%;
    padding: 20px;
  }

  .bonville-modal-header h2 {
    font-size: 20px;
  }

  .bonville-modal-header p {
    font-size: 13px;
  }

  .bonville-form-group {
    margin-bottom: 15px;
  }

  .bonville-form-group label {
    font-size: 13px;
  }

  .bonville-form-group input,
  .bonville-form-group select {
    font-size: 16px; /* Evita zoom automático no iOS */
    padding: 12px;
  }

  .bonville-submit-btn {
    font-size: 15px;
    padding: 12px;
  }
}


/* ===== FORMULÁRIO EM ETAPAS ===== */

/* Barra de Progresso */
.bonville-progress-bar {
  padding: 20px;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.bonville-progress-fill {
  height: 4px;
  background: linear-gradient(90deg, #25d366, #128c7e);
  border-radius: 2px;
  margin-bottom: 15px;
  width: 33.33%;
  transition: width 0.3s ease;
}

.bonville-progress-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.bonville-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.bonville-step-active {
  opacity: 1;
}

.bonville-step-number {
  width: 32px;
  height: 32px;
  background: #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #999;
  font-size: 14px;
}

.bonville-step-active .bonville-step-number {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
}

.bonville-step-label {
  font-size: 12px;
  color: #666;
  text-align: center;
}

.bonville-step-active .bonville-step-label {
  color: #333;
  font-weight: 600;
}

/* Etapas do Formulário */
.bonville-form-step {
  display: none;
}

.bonville-form-step-active {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bonville-form-step h3 {
  font-size: 18px;
  color: #333;
  margin: 0 0 20px 0;
}

/* Botões de Navegação */
.bonville-form-buttons {
  display: flex;
  gap: 10px;
  margin-top: 25px;
  justify-content: flex-end;
}

.bonville-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  flex: 1;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.bonville-btn-primary {
  background: #25d366;
  color: white;
}

.bonville-btn-primary:hover {
  background: #20ba58;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.bonville-btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.bonville-btn-secondary:hover {
  background: #e0e0e0;
}

.bonville-btn-success {
  background: #25d366;
  color: white;
}

.bonville-btn-success:hover {
  background: #20ba58;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.bonville-btn:active {
  transform: translateY(0);
}

/* Resumo */
.bonville-resumo {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
}

.bonville-resumo-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bonville-resumo-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: white;
  border-radius: 6px;
  border-left: 4px solid #25d366;
}

.bonville-resumo-label {
  font-weight: 600;
  color: #666;
}

.bonville-resumo-value {
  color: #333;
  font-weight: 500;
}

/* Mensagens */
.bonville-mensagem {
  margin-top: 15px;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}

.bonville-mensagem-visible {
  display: block;
}

.bonville-mensagem-info {
  background: #e3f2fd;
  color: #1976d2;
  border-left: 4px solid #1976d2;
}

.bonville-mensagem-success {
  background: #e8f5e9;
  color: #388e3c;
  border-left: 4px solid #388e3c;
}

.bonville-mensagem-error {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid #c62828;
}

/* Responsivo para etapas */
@media (max-width: 768px) {
  .bonville-progress-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .bonville-form-buttons {
    flex-direction: column;
  }

  .bonville-btn {
    width: 100%;
  }

  .bonville-step-label {
    font-size: 11px;
  }

  .bonville-step-number {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .bonville-modal-header h2 {
    font-size: 18px;
  }

  .bonville-form-step h3 {
    font-size: 16px;
  }

  .bonville-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .bonville-progress-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }

  .bonville-step-label {
    font-size: 10px;
  }
}
