﻿.messages-container {
    max-width: 600px;
    margin: 0 auto;
}

.message {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(0);
    opacity: 1;
    animation: fadeInUp 0.5s ease-out forwards;
    border-right: 4px solid #4CAF50;
    transition: all 0.3s ease;
    position: relative;
    text-align: right;
}

    .message:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    }

    .message:nth-child(odd) {
        border-right-color: #2196F3;
    }

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
    color: #555;
    direction: rtl;
}

.message-content {
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: right;
}

.message-footer {
    display: flex;
    justify-content: flex-start; /* تغییر به flex-start برای سمت راست */
    margin-top: 15px;
}

.reply-btn {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 0; /* تغییر به 0 */
    margin-left: auto; /* اضافه شده برای فاصله از سمت چپ */
}

    .reply-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        background: linear-gradient(135deg, #5d7de8, #9666d4);
    }

    .reply-btn:active {
        transform: translateY(0);
    }

    .reply-btn::before {
        content: "↩";
        font-size: 16px;
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    animation-delay: calc(var(--order) * 0.2s);
}
