/* ===== چت گروهی ===== */
.gc-chat-wrapper {
    max-width: 600px;
    margin: 20px auto;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    height: 500px;
    font-family: sans-serif;
}

/* بخش پیام‌ها */
.chat-container {
    display: flex;
    flex-direction: column; /* پیام‌ها از بالا به پایین */
    overflow-y: auto;
}



/* ... */


.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* پیام‌ها */
.gc-message {
    padding: 5px 0;
    width: 100%;
}

.gc-message.sent {
    text-align: right;
}

.gc-message.sent .gc-username {
    text-align: right;
}

.gc-message {
    text-align: right !important;
    direction: rtl;
}
.gc-username {
    text-align: right !important;
    direction: rtl;
}
.gc-text {
    text-align: right !important;
    direction: rtl;
}


/* پیام‌ها راست چین شوند */
.gc-message {
    direction: rtl !important;
    text-align: right !important;
}

/* نام کاربر بالا پیام هم راست چین */
.gc-message .gc-username {
    text-align: right !important;
    direction: rtl !important;
}

/* خود پیام داخل حباب بره راست */
.gc-message .gc-text {
    display: inline-block;
    text-align: right !important;
    direction: rtl !important;
}

/* کل لیست پیام‌ها راست‌چین شود */
.gc-messages-wrapper, 
.gc-messages-list {
    direction: rtl !important;
    text-align: right !important;
}

.gc-message .gc-bubble {
    padding: 8px 12px;
    border-radius: 15px;
    position: relative;
    font-size: 14px;
    max-width: 70%; 
    word-wrap: break-word;
    display: inline-block; 
}

/* پیام فرستنده (من) */
.gc-message.sent .gc-bubble {
    background-color: #29b562; 
    color: #fff;
    border-bottom-right-radius: 0;
}

/* پیام گیرنده (دیگران/مهمان) */
.gc-message.received .gc-bubble {
    background-color: #fff;
    color: #333;
    border-bottom-left-radius: 0;
    border: 1px solid #ddd;
}

.gc-username {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 3px;
    color: #333;
}

.gc-time {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* بخش ورودی پیام */
.gc-input-area {
    display: flex;
    flex-direction: column; 
    align-items: stretch;
    padding: 8px;
    background: #fff;
    border-top: 1px solid #ddd;
}

.gc-input-field {
    margin: 4px 0;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
}

.gc-btn-send {
    background-color: #29b562;
    color: #fff;
    border: none;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    width: 40px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    align-self: flex-end; 
    margin-top: 5px;
}
.gc-btn-send:hover {
    background-color: #24a057;
}

.gc-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    margin: 0 6px;
    object-fit: cover;
    border: 1px solid #ddd;
}

@media screen and (max-width: 600px) {
    .gc-chat-wrapper {
        width: 95%;
    }
}
