/* Стили для списка чатов */
.chats-list {
    max-height: 60vh;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin: 0.25rem 0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.chat-item:hover {
    background: var(--bg-secondary);
}

.chat-item.active {
    background: var(--primary-color);
    color: white;
}

.chat-item.active .chat-preview {
    color: rgba(255, 255, 255, 0.8);
}

.chat-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.chat-item.active .chat-avatar {
    background: rgba(255, 255, 255, 0.2);
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-name {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-preview {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.chat-item.active .chat-time {
    color: rgba(255, 255, 255, 0.7);
}

.chat-actions {
    display: none;
    margin-left: 0.5rem;
}

.chat-item:hover .chat-actions {
    display: block;
}

.btn-chat-action {
    background: none;
    border: none;
    color: var(--text-tertiary);
    padding: 0.25rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-chat-action:hover {
    color: var(--danger-color);
    background: rgba(220, 53, 69, 0.1);
}

.no-chats {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-tertiary);
}

.no-chats i {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Анимации для сообщений */
.message-appear {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.message-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Dropdown меню чатов */
.chats-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem;
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
}

.chats-dropdown.show {
    display: block;
}

.chats-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.chats-dropdown-item:hover {
    background: var(--bg-secondary);
}

.chats-dropdown-item i {
    margin-right: 0.5rem;
    width: 1rem;
}