/* ======== VARIÁVEIS DO TEMA ASSIS ======== */
:root {
  --primary-color: #0a4a1e;  /*#020617;  /*#4D73FF; /* HEAD e FOOTER */
  --accent-color: #5CE1F8;  /* Dourado suave para destaques */
  --instalar: #ffeb3b;      /*botão instalar */
  --audio: #25d366;    /*botão de gravar e enviar audio */
  --enviar: #021026;        /* botão de enviar mensagem */
  --bg-color: #F8FAFC;      /* Cor de fundo de fallback */
  --user-msg-bg: #2eb855; /*#0a4a1e; /*#C9A16D;   /* Balão do usuário  */
  --user-text: #ffffffff;     /*texto do usuário */
  --bot-msg-bg: #fffdf0;    /* Balão do bot (Branco) */
  --bot-text: #000000;      /* texto do bot */
  --input-bg: #FFFFFF;      /*campo de escrever as msg */
  --font-main: 'Montserrat', sans-serif;
}

/* ======== GERAL (TRAVA DE TELA & FUNDO) ======== */
body {
  margin: 0;
  font-family: var(--font-main);
  background-color: #F8FAFC;    /*#fffdf0; */

  
  /* --- ESTRUTURA FIXA (APP-LIKE) --- */
  display: flex;
  flex-direction: column;
  height: 100dvh; /* Altura exata da viewport dinâmica */
  overflow: hidden; /* Impede que a página inteira role */
  position: relative;
}

/* ======== EFEITO DE FUMAÇA ANIMADA (OVERLAY) ======== */
/* Cria uma camada sobre o fundo para a animação da fumaça */
body::before {
  content: '';
  position: fixed; /* Fica fixo na tela */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
 
}


/* ======== CABEÇALHO (FIXO) ======== */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);

  /* --- FIXAÇÃO --- */
  flex-shrink: 0; /* Impede que o cabeçalho encolha */
  position: relative;
  z-index: 100; /* Fica acima da fumaça e do chat */
}

header img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  margin-right: 12px;
  border: 2px solid #E2E8F0;  /*#2F5CFF;  /*var(--accent-color);*/
  object-fit: cover;
}

header h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  flex: 1;
  letter-spacing: 0.5px;
}

/* ======== BOTÃO INSTALAR APP ======== */
#installBtn {
  background-color: transparent;
  color: var(--instalar);
  border: 1px solid var(--accent-color);
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  display: none;
}

#installBtn:hover {
  background-color: var(--instalar);
  color: var(--primary-color);
}

/* ======== CHAT (ÁREA DE ROLAGEM) ======== */
#chat {
  /* --- ESTRUTURA DE ROLAGEM --- */
  flex: 1; /* Ocupa todo o espaço disponível */
  overflow-y: auto; /* Apenas esta área rola */
  padding: 20px;
  display: flex;
  flex-direction: column;

  /* --- FUNDO E VISUAL --- */
  background-color: transparent; /* Transparente para ver o fundo e a fumaça */
  position: relative;
  z-index: 50; /* Acima da fumaça (z-index: 0), abaixo do header (z-index: 100) */

  opacity: 1;
  gap: 12px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* Rolagem suave no iOS */
}

.mensagem {
  max-width: 80%;
  padding: 12px 16px;
  margin: 0;
  border-radius: 18px;
  word-wrap: break-word;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  position: relative;
}

.usuario {
  align-self: flex-end;
  background-color: var(--user-msg-bg);
  color: var(--user-text);
  border-bottom-right-radius: 4px;
}

.bot {
  align-self: flex-start;
  background-color: var(--bot-msg-bg);
  color: var(--bot-text);
  border-bottom-left-radius: 4px;
  border: 1px solid #e0e0e0;
}

/* Links dentro das mensagens */
.mensagem a {
  color: inherit;
  font-weight: bold;
  text-decoration: underline;
}

/* ======== INPUT AREA (FIXO) ======== */
#input-area {
  display: flex;
  padding: 15px;
  background-color: var(--primary-color);
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);

  /* --- FIXAÇÃO --- */
  flex-shrink: 0; /* Impede que a barra de input suma */
  position: relative;
  z-index: 100; /* Fica acima da fumaça e do chat */
}

#mensagem {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 16px;
  background-color: var(--input-bg);
  outline: none;
  font-family: var(--font-main);
  transition: border 0.3s;
}

#mensagem:focus {
  border-color: var(--primary-color);
}

#enviar {
  background-color: var(--enviar);
  color: white;
  border: 2px solid #4ade80;   /* none; */
  border-radius: 100%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(27, 77, 62, 0.3);
  transition: transform 0.2s;
}

#enviar:active {
  transform: scale(0.95);
}

/* ======== BOTÕES RÁPIDOS ======== */
.quick-reply {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 8px 16px;
  border-radius: 20px;
  margin: 5px 4px 5px 0;
  display: inline-block;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.quick-reply:hover {
  background-color: var(--primary-color);
  color: white;
}

/* ======== BOTÃO ÁUDIO ======== */
#audioBtn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-color: var(--audio);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

#audioBtn.gravando {
    background-color: var(--audio);
    animation: pulse 1.5s infinite;
}

#audioBtn img {
  width: 22px;
  height: 22px;
  opacity: 0.7;
}

#sendAudioBtn {
  display: none;
  background-color: var(--audio);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  padding: 0;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Animação Pulse do Áudio */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/*NOVOS BOTÕES DO CHATBOT */

/* ======== BOTÕES DE RESPOSTA RÁPIDA ======== */
.botoes-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  padding: 0 10px;
  justify-content: flex-start;
}

.quick-reply {
  background-color: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  font-family: var(--font-main);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.quick-reply:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(77, 115, 255, 0.3);
}

.quick-reply:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}