/* Reset e Configurações Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* OCULTAR BARRA DE SCROLL APENAS NO CHAT */
.chat-container,
.chat-container *,
#chatMessages {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chat-container::-webkit-scrollbar,
#chatMessages::-webkit-scrollbar {
  display: none;
  width: 0;
}

/* Container do Chat */
.chat-container {
  background:
    linear-gradient(rgba(0, 0, 0, 0.95), rgba(17, 17, 17, 0.95)),
    url("../img/blinthek-Brasao.png") no-repeat center center;

  background-size: 100% 100%;

  height: 600px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 20px;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  font-family: "Open Sans", "Roboto", sans-serif;
}

/* Wrapper do Conteúdo */
.chat-content-wrapper {
  width: 100%;
  max-width: 850px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.chat-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid #333;
  padding: 4px;

  /* Posicionamento para centralizar */
  position: absolute;
  top: 20px; /* Ajuste este valor para subir ou descer em relação ao texto */
  left: 50%;
  transform: translateX(-50%);

  z-index: 10;
  background-color: #fff; /* Opcional: para garantir que o fundo do círculo não seja transparente */
  transition: opacity 0.4s ease;
}

.hidden {
  opacity: 0 !important;
  pointer-events: none;
}

/* Título */
.chat-title {
  color: white;
  font-family: "Open Sans", "Roboto", sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  text-align: center;
  transition: all 0.5s ease;
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: 5;
  letter-spacing: -0.5px;
}

.chat-active .chat-title {
  opacity: 0;
  top: 15%;
  pointer-events: none;
}

/* ÁREA DE MENSAGENS */
#chatMessages {
  flex: 1;
  width: 100%;
  display: none;
  flex-direction: column;
  gap: 20px;
  padding: 40px 0 140px 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.chat-active #chatMessages {
  display: flex;
}

/* BARRA DE INPUT */
.input-area {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 700px;
  z-index: 100;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-active .input-area {
  top: calc(100% - 60px);
  transform: translate(-50%, 0);
}

.input-wrapper {
  background: #1a1a1d;
  border-radius: 50px;
  border: 1px solid #444;
  padding: 5px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

input[type="text"] {
  width: 100%;
  background: transparent;
  border: none;
  color: white;
  padding: 15px 65px 15px 25px;
  font-size: 1.1rem;
  outline: none;
  font-family: "Open Sans", sans-serif;
}

/* Mensagens */
.message-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.message-wrapper.user {
  justify-content: flex-end;
}

.ai-logo-bubble {
  width: 80px;
  height: 80px;
  /* background: #000; */
  border-radius: 50%;
  padding: 6px;
  flex-shrink: 0;
}

.message {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  max-width: 75%;
  font-family: "Open Sans", sans-serif;
}

/* RESPOSTA DA IA (Negrito e Espaçamento) */
.message.ai {
  background: #1a1a1d;
  color: #eee;
  border: 1px solid #333;
  border-top-left-radius: 2px;

  /* Mantém o negrito e organiza o texto */
  font-weight: bold;
  line-height: 1.8;
  white-space: pre-wrap;
  padding: 18px 22px;
}

/* Garante o espaçamento entre os itens numerados */
.message.ai br {
  display: block;
  margin-bottom: 12px;
  content: "";
}

.message.user {
  background: #c63645;
  color: white;
  border-top-right-radius: 2px;
}

#sendBtn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}
