@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

.chat-container {
    width: 260px;
    height: 500px;
    background-color: #fff;
    border: none;
    display: flex;
    flex-direction: column;
    border-radius: 15px; /* Colțuri mai rotunjite */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); /* Adăugăm umbră */
    overflow: hidden; /* Ascundem eventualele overflow-uri */
    animation: fadeIn 0.5s ease; /* Adăugăm o animație de intrare */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.messages {
    font-family: "Poppins", sans-serif;
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    border-bottom: 1px solid #ddd;
    background-color: #f9f9f9;
}

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

.input-area input {
    width: 80%;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-area input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.input-area button {
    width: 15%;
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-area button:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

.message {
    padding: 10px;
    border-radius: 20px;
    margin: 5px 0;
    max-width: 80%;
    font-size: 14px;
    opacity: 0;
    animation: slideIn 0.5s forwards; /* Animație pentru mesaje */
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.message.user {
    background-color: #d1e7dd;
    align-self: flex-end;
    margin-left: auto;
    font-size: 14px;
    animation-delay: 0.1s; /* Timp de întârziere pentru efectul de animație */
}

.message.bot {
    background-color: #f8d7da;
    align-self: flex-start;
    font-size: 14px;
    animation-delay: 0.2s;
}

@media (max-width: 768px) {
    .chat-container {
        width: 100%;
        height: 350px; /* Ajustăm înălțimea pentru dispozitive mobile */
    }

    .input-area input {
        width: 70%;
    }

    .input-area button {
        width: 20%;
    }
}
