﻿.chat-container {
    height: calc(100vh - 150px);
    overflow-y: auto;
    padding-bottom: 80px;
    background-color: var(--mud-palette-surface);
}

.chat-item {
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    padding: 12px 16px;
    margin: 4px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
}

    .chat-item:hover {
        background-color: rgba(0, 0, 0, 0.04);
    }

    .chat-item:active {
        background-color: rgba(0, 0, 0, 0.08);
        transform: scale(0.99);
    }

    .chat-item.unread-bg {
        background-color: rgba(var(--mud-palette-primary-rgb), 0.05);
    }

.chat-avatar-container {
    position: relative;
    margin-right: 12px;
}

.chat-content {
    flex-grow: 1;
    min-width: 0; /* Важливо для text-truncate */
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.chat-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    margin-left: 8px;
}

.chat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-message-preview {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    background-color: var(--mud-palette-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(var(--mud-palette-primary-rgb), 0.3);
}

.chat-divider {
    margin-left: 76px;
    margin-right: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Стиль для префікса "Ви:" */
.own-prefix {
    color: var(--mud-palette-primary);
    font-weight: 600;
}
