/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #191A2C;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* TOPO */
header.topo {
  background-color: #191A2C;
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.logo-menor {
  max-width: 300px;
  height: auto;
}

/* CONTEÚDO */
main.conteudo {
  padding: 40px 20px;
  max-width: 665px;
  margin: auto;
  position: relative;
}

main.conteudo::before,
main.conteudo::after {
  content: '';
  display: block;
  height: 2px;
  width: 100px;
  margin: 20px auto;
  background: linear-gradient(to right, #d4af37, #b8860b);
  border-radius: 1px;
}

/* CHATBOT */
.chatbot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 25%;
  height: 75%;
  max-width: 400px;
  background: #f4f4f7;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
}

.chatbot.mostrar {
  display: flex;
  animation: surgir 0.5s ease-out forwards;
}

@keyframes surgir {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* AVISO INICIAL */
.chat-aviso {
  background: linear-gradient(to right, #d4af37, #b8860b);
  color: #191A2C;
  padding: 20px;
  text-align: center;
  flex: 1;
}

.chat-aviso p {
  margin-bottom: 10px;
  font-weight: bold;
}

.chat-aviso label {
  font-size: 0.9em;
  display: block;
  margin-top: 10px;
}

.chat-aviso a {
  color: #191A2C;
  font-weight: bold;
  text-decoration: underline;
}

.chat-aviso button {
  margin-top: 15px;
  padding: 10px 20px;
  background: #191A2C;
  color: #d4af37;
  border: 1px solid #d4af37;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.chat-aviso button:hover {
  background: #d4af37;
  color: #191A2C;
}

/* ÁREA DO CHAT */
.chat-area {
  display: flex;
  flex-direction: column;
  height: 100%;
}


.chat-mensagens {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mensagem {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 0.95rem;
  line-height: 1.4;
  position: relative;
  animation: fadeIn 0.3s ease;
  word-wrap: break-word;
}

.mensagem.bot {
  background: #e1e1e6;
  align-self: flex-start;
  color: #333;
}

.mensagem.user {
  background: #d4af37;
  align-self: flex-end;
  color: #191A2C;
}

/* CAMPO DE RESPOSTA */
#chat-form {
  display: flex;
  padding: 15px;
  border-top: 1px solid #ccc;
  background: #fff;
}

#chat-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  margin-right: 10px;
  transition: all 0.3s ease;
}

#chat-form input:focus {
  border-color: #d4af37;
  box-shadow: 0 0 5px #d4af37aa;
}

#chat-form button {
  background: #d4af37;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  color: #191A2C;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

#chat-form button:hover {
  background: #b9911b;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVO */
@media (max-width: 768px) {
  .chatbot {
    width: 90%;
    height: 60%;
    right: 5%;
    bottom: 20px;
  }

  main.conteudo {
    padding: 20px 15px;
  }

  .logo-menor {
    max-width: 80%;
  }
}


.chat-mensagens {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth; /* <-- Faz o scroll ir suavemente para o final */
}

.botao-opcao, .botao-pular {
  background: #d4af37;
  border: none;
  color: #191A2C;
  padding: 10px 16px;
  margin: 5px 5px 5px 0;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.botao-opcao:hover, .botao-pular:hover {
  background: #b9911b;
}

#upload-area {
  padding: 15px 20px;
  background: #fff;
  border-radius: 10px;
  margin: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.upload-destacado {
  padding: 14px;
  font-size: 1rem;
  border: 2px dashed #d4af37;
  border-radius: 10px;
  width: 100%;
  max-width: 90%;
  background: #fff;
  color: #191A2C;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.upload-destacado:hover {
  border-color: #b9911b;
}


@media (max-width: 768px) {
  .upload-destacado {
    font-size: 0.9rem;
    padding: 12px;
  }
}

#upload-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

#upload-area input[type="file"] {
  margin-bottom: 5px;
  z-index: 1;
}

#lista-arquivos {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
  color: #191A2C;
  font-size: 0.9rem;
}
@media (max-width: 768px) {
  .chatbot {
    transition: transform 0.6s ease;
  }

  .chatbot.deslocado {
    transform: translateY(60%);
  }
}
