/* Animación consolidada con una sola keyframe */
@keyframes typing-dots {
    0%, 100% { opacity: 0; }
    33% { opacity: 1; }
}

/* Aplicación eficiente con delays */
.typing-dots span {
    width: 8px;
    height: 8px;
    background-color: #6b7280;
    border-radius: 50%;
    animation: typing-dots 1s infinite;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.33s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.66s;
}

/* Estilos base compartidos para mensajes */
.line {
    padding: 8px 12px;
    max-width: 300px;
    font-size: 15px;
}

.typing-indicator {
    width: 60px;
    padding: 12px 8px;
    margin-left: 12px;
    margin-bottom: 12px;
}

.typing-indicator,
.line.server {
    background-color: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px 12px 12px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    color: #343a40;
}

.line.server {
    margin-left: 12px;
}

.line.user {
    background-color: #4e9060;
    border: 1px solid #4e9060;
    color: #ffffff;
    border-radius: 12px 12px 0 12px;
    margin-left: auto;
    margin-right: 12px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
