
/* Container do indicador de digitação */
.typing-indicator {
	background-color: #e6e6e6; /* Cor de fundo estilo balão de chat */
	padding: 10px 15px;
	margin-left: 30px;
	border-radius: 20px; /* Bordas arredondadas */
	display: inline-flex; /* Para que o container se ajuste ao conteúdo */
	align-items: flex-end; /* Alinha os pontos na base */
	gap: 5px; /* Espaço entre os pontos */
	/* Inicialmente oculto, se você quiser controlar com JS */
	/* display: none; */
}

/* Estilo base dos pontos */
.typing-indicator span {
	height: 8px;
	width: 8px;
	background-color: #999; /* Cor dos pontos */
	border-radius: 50%; /* Faz os elementos ficarem redondos */
	display: inline-block;
	opacity: 0; /* Começa invisível */

	/* Aplica a animação */
	animation-name: bounce;
	animation-duration: 1.4s; /* Duração total da animação */
	animation-iteration-count: infinite; /* Repetir infinitamente */
	animation-timing-function: ease-in-out; /* Curva de animação suave */
}

/* Define a animação 'bounce' */
@keyframes bounce {
	0%, 60%, 100% {
		transform: translateY(0); /* Posição inicial/final */
		opacity: 0.5;
	}
	30% {
		transform: translateY(-6px); /* Posição no pico do pulo */
		opacity: 1;
	}
}

/* Adiciona um atraso diferente para cada ponto, criando o efeito sequencial */
.typing-indicator span:nth-child(1) {
	animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
	animation-delay: 0.2s; /* Atraso para o segundo ponto */
}

.typing-indicator span:nth-child(3) {
	animation-delay: 0.4s; /* Atraso para o terceiro ponto */
}

/* Estilos para os botões de controle (opcional) */
.controls {
	margin-top: 20px;
}
.controls button {
	padding: 8px 15px;
	margin: 0 5px;
	cursor: pointer;
}




#chat-container {
    width: 100%;
    height: 300px;
    border: 1px solid #ccccccb5;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

#chat-messages {
    flex-grow: 1; /* Faz esta div ocupar o espaço disponível */
    padding: 15px;
    overflow-y: scroll; /* Habilita a barra de rolagem vertical */
    border-bottom: 1px solid #eee;
    background-color: #f9f9f940;
    /* Opcional: rolagem suave */
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 90%; /* Mensagens não ocupam a largura toda */
    word-wrap: break-word; /* Quebra palavras longas */
    line-height: 1.4;
}

.user-message {
    background-color: #dcf8c6; /* Verde claro (estilo WhatsApp) */
    margin-left: auto; /* Alinha à direita */
    border-bottom-right-radius: 5px; /* Ajuste visual */
}

.other-message {
    background-color: #eee; /* Cinza claro */
    margin-right: auto; /* Alinha à esquerda */
    border-bottom-left-radius: 5px; /* Ajuste visual */
}

.system-message {
    background-color: #9e9e9e26;
    color: #333333;
    font-style: italic;
    text-align: left;
    max-width: 100%;
    font-size: 0.9em;
    border-radius: 5px;
}


#input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
    background-color: #fff;
}

#message-input {
    flex-grow: 1; /* Ocupa o espaço restante */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-right: 10px;
    font-size: 1em;
}

#send-button {
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
}

#send-button:hover {
    background-color: #0056b3;
}

/* Estilos para a barra de rolagem (opcional, funciona melhor em WebKit - Chrome/Safari/Edge) */
#chat-messages::-webkit-scrollbar {
    width: 8px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}