/* ══════════════════════════════════════════════════════════════════
   follow.css — Follow button + follower/following list styles
   Uses CSS variables from base.css exclusively. Dark mode via vars.
   ══════════════════════════════════════════════════════════════════ */

/* ── Follow Button ────────────────────────────────────────────── */

.btn--follow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-speed);
    border: 1.5px solid var(--accent-color);
    background: var(--accent-color);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.btn--follow:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* ── Following state (outline/muted) ─────────────────────────── */

.btn--follow.is-following {
    background: transparent;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn--follow.is-following:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: var(--color-error);
    color: var(--color-error);
}

/* ── Text swap on hover (Twitter/Instagram style) ─────────────── */

.btn--follow__text-hover {
    display: none;
}

.btn--follow__text-default {
    display: inline;
}

.btn--follow.is-following:hover .btn--follow__text-default {
    display: none;
}

.btn--follow.is-following:hover .btn--follow__text-hover {
    display: inline;
}

/* ── Small variant for list cards ─────────────────────────────── */

.btn--follow-sm {
    min-width: 85px;
    padding: var(--space-1) var(--space-4);
    font-size: var(--text-xs);
}

/* ── Profile stat link reset ──────────────────────────────────── */

a.profile-stat {
    text-decoration: none;
    color: inherit;
}

a.profile-stat:hover {
    opacity: 0.8;
}

a.profile-stat:hover .profile-stat__count {
    color: var(--accent-color);
}

/* ══════════════════════════════════════════════════════════════════
   Follower / Following List Pages
   ══════════════════════════════════════════════════════════════════ */

.follow-list-page {
    max-width: 700px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-4);
}

/* ── Header ───────────────────────────────────────────────────── */

.follow-list-header {
    margin-bottom: var(--space-8);
}

.follow-list-header__back {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
    transition: color var(--transition-speed);
}

.follow-list-header__back:hover {
    color: var(--accent-color);
}

.follow-list-header__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 var(--space-1) 0;
    line-height: var(--leading-tight);
}

.follow-list-header__count {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin: 0;
}

/* ── Card Grid ────────────────────────────────────────────────── */

.follow-list__grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

/* ── User Card ────────────────────────────────────────────────── */

.follow-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    transition: background var(--transition-speed);
}

.follow-card:hover {
    background: var(--surface-secondary);
}

/* Avatar */

.follow-card__avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.follow-card__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.follow-card__avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    color: #ffffff;
    font-weight: 700;
    font-size: var(--text-lg);
    font-family: var(--font-sans);
}

/* Info */

.follow-card__info {
    flex: 1;
    min-width: 0;
}

.follow-card__name {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    font-size: var(--text-base);
    line-height: var(--leading-snug);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-card__name:hover {
    color: var(--accent-color);
}

.follow-card__username {
    display: block;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-snug);
}

.follow-card__bio {
    margin: var(--space-1) 0 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Load More ────────────────────────────────────────────────── */

.follow-list__load-more {
    text-align: center;
    padding: var(--space-8) 0;
}

/* ── Empty State ──────────────────────────────────────────────── */

.follow-list-empty {
    text-align: center;
    padding: var(--space-16) var(--space-4);
    color: var(--text-muted);
}

.follow-list-empty p {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 var(--space-2);
}

.follow-list-empty span {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════════════════
   Profile Follow Suggestions
   ══════════════════════════════════════════════════════════════════ */

.profile-suggestions {
    margin-bottom: var(--space-8);
    padding: var(--space-6) 0;
}

.profile-suggestions__heading {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 var(--space-4);
    line-height: var(--leading-tight);
}

.profile-suggestions__grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 480px) {
    .follow-list-page {
        padding: var(--space-4) var(--space-3);
    }

    .follow-card {
        gap: var(--space-3);
        padding: var(--space-3);
    }

    .follow-card__avatar {
        width: 40px;
        height: 40px;
    }

    .btn--follow-sm {
        min-width: 72px;
        padding: var(--space-1) var(--space-3);
    }

    .follow-list-header__title {
        font-size: var(--text-xl);
    }
}
