/* Moodozvon — страница /friends.
   Использует токены и базу из style.css + structure из rooms.css. */

.friends-tabs {
    display: flex;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.friends-tabs::-webkit-scrollbar { display: none; }

.friends-tab {
    flex: 1;
    min-width: max-content;
    padding: 8px 14px;
    border-radius: var(--r-pill);
    background: transparent;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.12s, color 0.12s;
}
.friends-tab.is-active {
    background: var(--surface-2);
    color: var(--text);
}
.friends-tab:hover:not(.is-active) {
    color: var(--text);
}

.friends-tab__count {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: var(--r-pill);
    background: var(--surface-3);
    color: var(--text-2);
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}
.friends-tab__count.is-accent {
    background: var(--accent);
    color: var(--accent-ink);
}
.friends-tab__count[data-zero="true"] { display: none; }

/* --- Карточка друга / заявки --- */

.friend-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.friend-card__avatar {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    background:
        linear-gradient(135deg,
            color-mix(in oklab, var(--accent) 50%, var(--surface-3)),
            color-mix(in oklab, var(--accent) 15%, var(--surface-3)));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    overflow: hidden;
}
.friend-card__avatar img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.friend-card__presence {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--offline);
    border: 2px solid var(--surface);
    transition: background 0.2s;
}
.friend-card[data-online="true"] .friend-card__presence {
    background: #2dd773;
}

.friend-card__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.friend-card__name {
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.friend-card__username {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-dim);
}
.friend-card__username::before { content: "@"; }

.friend-card__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.friend-card__actions .mz-btn,
.friend-card__actions .mz-icon-btn {
    height: 32px;
    font-size: 13px;
}
.friend-card__actions .mz-icon-btn {
    width: 32px;
    padding: 0;
}
.friend-card__actions .mz-icon-btn svg {
    width: 16px;
    height: 16px;
}

/* --- Empty states --- */

.friends-empty {
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-xl);
    padding: 36px 20px;
    text-align: center;
    color: var(--text-2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.friends-empty h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text);
    font-weight: 700;
}
.friends-empty p { margin: 0; font-size: 13px; }

@media (max-width: 640px) {
    .friends-tab { padding: 7px 10px; font-size: 13px; }
    .friend-card { padding: 12px; gap: 12px; }
    .friend-card__avatar { width: 40px; height: 40px; font-size: 15px; }
    .friend-card__actions .mz-btn { padding: 0 10px; }
}
