* {
  box-sizing: border-box;
  font-family: Inter, system-ui, Arial, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #f4f6fb;
}

/* APP FULL SCREEN */
.app {
  width: 100vw;
  height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  background: #ffffff;
  flex-shrink: 0;
}

.avatar {
  width: 42px;
  height: 42px;
  background: #6c5ce7;
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: bold;
  background-image: url('https://huntsales.com.br/images/hero-home.avif');
  background-size: cover;   /* cobre toda a área do círculo */
  background-position: center;
  background-repeat: no-repeat;
}

.info span {
  font-size: 12px;
  color: #4caf50;
}

/* CHAT (SCROLL ÁREA CENTRAL) */
.chat {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f9fafc;
}

/* DATA */
.date-divider {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin: 12px 0;
}

/* MESSAGES */
.message {
  display: flex;
  margin-bottom: 10px;
}

.message.bot {
  justify-content: flex-start;
}

.message.user {
  justify-content: flex-end;
}

.bubble {
  max-width: min(75%, 520px);
  padding: 10px 12px;
  border-radius: 12px;
  position: relative;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.bot .bubble {
  background: #eef1f7;
  color: #333;
  border-bottom-left-radius: 4px;
}

.user .bubble {
  background: #6c5ce7;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.time {
  display: block;
  text-align: right;
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
}

/* INPUT FIXO EMBAIXO */
.chat-input {
  display: flex;
  padding: 12px;
  gap: 10px;
  border-top: 1px solid #eee;
  background: #ffffff;
  flex-shrink: 0;
}

.chat-input textarea {
  flex: 1;               /* ocupa o espaço disponível */
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  resize: none;          /* impede redimensionamento manual */
  overflow-y: auto;      /* scroll vertical quando passar do limite */
  max-height: 160px;     /* limite de crescimento */
  font-family: inherit;  /* mantém a mesma fonte do input antigo */
}


.chat-input button {
  background: #6c5ce7;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

/* MOBILE AJUSTES */
@media (max-width: 600px) {
  .chat {
    padding: 12px;
  }

  .bubble {
    max-width: 85%;
  }
}

/* OBJEÇÕES (BOTÕES) */
.objections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.objections button {
  background: #ffffff;
  border: 1px solid #6c5ce7;
  color: #6c5ce7;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.objections button:hover {
  background: #6c5ce7;
  color: #ffffff;
}

.objections button:active {
  transform: scale(0.97);
}

.markdown p {
  margin: 0 0 6px;
}

.markdown ul {
  padding-left: 18px;
  margin: 6px 0;
}

.markdown li {
  margin-bottom: 4px;
}

.markdown strong {
  font-weight: 600;
}

.markdown code {
  background: #eaeaf0;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
}

.markdown pre {
  background: #1e1e2e;
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 12px;
}

.loading-text {
  font-style: italic;
  opacity: 0.8;
}

.dots::after {
  content: "";
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

.message.bot.warning .bubble {
  border: 2px solid #ff4d4f;
  background: #fff1f0;
}

.warning-bubble {
  color: #a8071a;
}

.approval-message {
  margin: 8px 0;
  padding: 6px;
  background: #fff;
  border-left: 4px solid #ff4d4f;
  font-style: italic;
}

.approval-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn-yes {
  background: #52c41a;
  color: white;
}

.btn-no {
  background: #ff4d4f;
  color: white;
}
