/* Estilos para a animação de chat do WhatsApp */
.whatsapp-chat-container {
  width: 100%;
  max-width: 360px;
  height: 500px;
  background-color: #e5ddd5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 200 200'%3E%3Cdefs%3E%3Cpattern id='whatsapp-pattern' patternUnits='userSpaceOnUse' width='50' height='50'%3E%3Cpath d='M25,0 L50,25 L25,50 L0,25 Z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='%23e5ddd5'/%3E%3Crect width='100%25' height='100%25' fill='url(%23whatsapp-pattern)'/%3E%3C/svg%3E");
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

.chat-header {
  background-color: #075e54;
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #128C7E;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 18px;
}

.chat-header-info {
  flex: 1;
}

.chat-header-name {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 2px;
}

.chat-header-status {
  font-size: 12px;
  opacity: 0.8;
}

.chat-messages {
  padding: 16px;
  height: calc(100% - 120px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 200 200'%3E%3Cdefs%3E%3Cpattern id='whatsapp-pattern' patternUnits='userSpaceOnUse' width='50' height='50'%3E%3Cpath d='M25,0 L50,25 L25,50 L0,25 Z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='%23e5ddd5'/%3E%3Crect width='100%25' height='100%25' fill='url(%23whatsapp-pattern)'/%3E%3C/svg%3E");
}

.message {
  max-width: 80%;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  position: relative;
  word-wrap: break-word;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

.message-content {
  line-height: 1.4;
}

.message-time {
  font-size: 11px;
  color: #8c8c8c;
  text-align: right;
  margin-top: 4px;
}

.message.received {
  background-color: white;
  align-self: flex-start;
  border-top-left-radius: 0;
}

.message.sent {
  background-color: #dcf8c6;
  align-self: flex-end;
  border-top-right-radius: 0;
}

/* Estilo para destacar objeções */
.message.sent.objection {
  background-color: #fff3e0; /* Tom de laranja mais suave */
  border-left: none;
}

/* Estilo para destacar respostas a objeções */
.message.received.response {
  background-color: #e3f2fd; /* Tom de azul claro */
  border-left: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-input {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: #f0f0f0;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-input-field {
  flex: 1;
  background-color: white;
  border-radius: 20px;
  padding: 8px 16px;
  border: none;
  height: 40px;
  color: #333;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #128C7E;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: none;
}

/* Animação de digitando */
.typing {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: white;
  border-radius: 8px;
  max-width: 65px;
  margin-bottom: 8px;
  align-self: flex-start;
  border-top-left-radius: 0;
  animation: fadeIn 0.3s forwards;
}

/* Estilo para o indicador de digitação do usuário */
.typing.user-typing {
  background-color: #dcf8c6;
  align-self: flex-end;
  border-top-right-radius: 0;
  border-top-left-radius: 8px;
}

.typing-bubble {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #8c8c8c;
  margin: 0 2px;
  animation: typingAnimation 1.5s infinite ease-in-out;
}

.typing-bubble:nth-child(1) {
  animation-delay: 0s;
}

.typing-bubble:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-bubble:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingAnimation {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Animação de check de mensagem */
.check-mark {
  display: inline-block;
  margin-left: 4px;
  position: relative;
  top: 2px;
}

.check-mark svg {
  width: 14px;
  height: 14px;
  fill: #8c8c8c;
}

.check-mark.delivered svg {
  fill: #4fc3f7;
}

/* Responsividade */
@media (max-width: 768px) {
  .whatsapp-chat-container {
    max-width: 300px;
    height: 450px;
  }
  
  .chat-header {
    padding: 10px 14px;
  }
  
  .chat-header-avatar {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .chat-messages {
    padding: 12px;
  }
  
  .message {
    padding: 7px 10px;
    margin-bottom: 6px;
    font-size: 15px;
  }
  
  .message-time {
    font-size: 10px;
  }
  
  .typing {
    padding: 7px 10px;
    max-width: 60px;
  }
  
  .typing-bubble {
    width: 7px;
    height: 7px;
  }
  
  .chat-input {
    padding: 8px;
  }
  
  .chat-input-field {
    padding: 6px 12px;
    height: 36px;
  }
  
  .chat-send-btn {
    width: 36px;
    height: 36px;
  }
  
  .chat-send-btn svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 576px) {
  .whatsapp-chat-container {
    max-width: 280px;
    height: 400px;
  }
  
  .chat-header {
    padding: 8px 12px;
  }
  
  .chat-header-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .chat-header-name {
    font-size: 14px;
  }
  
  .chat-header-status {
    font-size: 10px;
  }
  
  .message {
    max-width: 85%;
    padding: 6px 10px;
    font-size: 14px;
    margin-bottom: 5px;
  }
  
  .message-time {
    font-size: 9px;
  }
  
  .typing {
    padding: 6px 10px;
    max-width: 55px;
  }
  
  .typing-bubble {
    width: 6px;
    height: 6px;
  }
  
  .chat-input {
    padding: 6px;
  }
  
  .chat-input-field {
    padding: 5px 10px;
    height: 32px;
    font-size: 13px;
  }
  
  .chat-send-btn {
    width: 32px;
    height: 32px;
  }
  
  .chat-send-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Ajustes para telas muito pequenas */
@media (max-width: 375px) {
  .whatsapp-chat-container {
    max-width: 260px;
    height: 380px;
  }
  
  .message {
    font-size: 13px;
  }
  
  .chat-messages {
    padding: 10px;
  }
} 