/* ---------------------------------- */
/* НЕДАВНИЕ КОНТАКТЫ (ГОРИЗОНТАЛЬНАЯ ЛЕНТА) */
/* ---------------------------------- */

.recent-contacts {
    position: relative;
    top: 30px;
    margin: 0 12px 20px 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.recent-contacts-scroll {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 6px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.recent-contacts-scroll::-webkit-scrollbar {
    height: 4px;
}

.recent-contacts-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.recent-contacts-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.recent-contact-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 56px;
}

.recent-contact-item:hover .recent-contact-avatar {
    box-shadow: 0 0 0 2px var(--primary);
    transition: box-shadow var(--transition-fast);
}

.recent-contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: white;
    box-shadow: var(--shadow-sm);
    margin-bottom: 6px;
    position: relative;
    z-index: var(--z-base);
}

.recent-contact-name {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .recent-contacts {
        top: 20px;
        margin: 0 8px 16px 8px;
        padding-bottom: 8px;
    }
    .recent-contacts-scroll {
        gap: 12px;
    }
    .recent-contact-avatar {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    .recent-contact-name {
        font-size: 10px;
        max-width: 56px;
    }
}

/* Уважение prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .recent-contact-item:hover .recent-contact-avatar {
        box-shadow: 0 0 0 2px var(--primary);
        transition: none;
    }
}