* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f4f9;
  background-image: url('../img/chatbot-whatsapp-gratis.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
  padding: 1rem;      /* garante respiro nas laterais */
}

.chat-container {
  background: white;
  width: 400px;
  max-width: 95vw;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  height: 600px;
}

.chat-header {
  padding: 20px;
  background: #007bff;
  color: white;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  text-align: center;
}

.chat-main {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #e9ecef;
}

.chat-message {
  margin-bottom: 15px;
  max-width: 70%;
  padding: 10px 15px;
  border-radius: 15px;
  word-wrap: break-word;
}

.chat-message.user {
  background: #007bff;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chat-message.bot {
  background: #dee2e6;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.chat-form {
  display: flex;
  border-top: 1px solid #ddd;
}

#chat-input {
  flex: 1;
  padding: 15px;
  border: none;
  font-size: 1rem;
  border-bottom-left-radius: 8px;
}

#chat-input:focus {
  outline: none;
}

.chat-form button {
  background: #007bff;
  color: white;
  border: none;
  padding: 0 20px;
  cursor: pointer;
  font-size: 1rem;
  border-bottom-right-radius: 8px;
  transition: background 0.3s ease;
}

.chat-form button:hover {
  background: #0056b3;
}

@media (max-width: 600px) {
  body {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    background-size: cover;
    background-attachment: fixed;
  }

.chat-container {
  background: white;
  width: 400px;
  height: 600px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

  .chat-header {
    padding: 15px;
    font-size: 1.2rem;
  }

  .chat-main {
    padding: 15px;
    font-size: 0.95rem;
  }

  #chat-input {
    padding: 12px;
    font-size: 0.95rem;
  }

  .chat-form button {
    padding: 0 15px;
    font-size: 0.95rem;
  }

  .chat-message {
    font-size: 0.9rem;
    padding: 8px 12px;
  }
}

@media (max-width: 600px) {
  .chat-container {
    width: 90vw;   /* 90% da largura da tela */
    height: 90vh;  /* 90% da altura da tela */
  }

  body {
    padding: 1rem;              /* Espaço nas bordas */
    align-items: center;
    justify-content: center;
  }
}
