.chat-container {
    overflow-y: auto;
    display: none;
    flex-direction: column;
    max-height: 100%;
    position: relative;
    top: -30px;
    max-width: 100%;
    margin: 38px 0;
    object-fit: cover;
    width: 500px;
    height: 320px;
}

.chat-container.active {
    display: flex;
}

.messages-wrap {
    display: flex;
    flex-direction: column;
}

.message {
    padding: 13px 13px 13px 15px;
    margin: 10px;
    min-width: 30%;
    max-width: 60%;
    color: #000;
    display: none;
    flex-direction: column;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    opacity: 0; /* Start invisible */
    border-radius: 15px;
}

.message .quoted_text {
    background: #00000029;
    padding: 9px;
    border-radius: 11px;
    margin-bottom: 7px;
}

.message img {
    margin-bottom: 12px;
    background-size: cover;
    border-radius: 11px;
    background-position: center;
    box-shadow: 0 1px 4px #000;
    margin-top: 7px;
}

.chat-audio-wrap {
    position: relative;
    right: -6px;
    display: block;
    scale: 0.7;
    transform-origin: right;
}

.message.show {
    display: flex;
}

.message.left {
    align-self: flex-end;
    background-color: #e28e8e;
    animation-name: slideInFromRight;
}

.message.right {
    align-self: flex-start;
    background-color: #fce4e4;
    animation-name: slideInFromLeft;
}

.message .senderDisplayName {
    font-family: 'SimplePro-H-Bold', sans-serif;
    font-size: 15px;
}

.message .text {
    font-size: 15px;
    white-space: pre-wrap; /* Preserves line breaks */
}

.message .timeFormat {
    direction: ltr;
    font-size: 13px;
    align-self: flex-end;
    margin-top: 5px;
}

.chat-title {
    display: flex;
    height: 40px;
    box-shadow: 0 19px 17px #242424;
    z-index: 1;
    position: relative;
    background: #242424;
    justify-content: center;
    align-items: start;
    font-family: 'SimplePro-H-Bold', sans-serif;
    font-size: 20px;
}

/* Keyframes for animations */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}