/* =====================================================
   Riftmana Follow System Styles
   ===================================================== */

/* ===================== Follow Button ===================== */
.rm-follow-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rm-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--ps-gold) 0%, var(--ps-gold-2) 100%);
    border: 1px solid rgba(0, 159, 212, 0.5);
    border-radius: 16px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.rm-follow-btn:hover {
    background: linear-gradient(135deg, #00b4e6 0%, #0088bb 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 159, 212, 0.3);
    text-decoration: none;
    color: #fff;
}

.rm-follow-btn:active {
    transform: translateY(0);
}

.rm-follow-btn.is-following {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.rm-follow-btn.is-following:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.5);
    color: #e74c3c;
}

.rm-follow-btn.is-following:hover .follow-text {
    display: none;
}

.rm-follow-btn.is-following:hover::after {
    content: 'Unfollow';
}

.rm-follow-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.rm-follow-btn.is-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: followSpin 0.6s linear infinite;
    margin-left: 6px;
}

@keyframes followSpin {
    to { transform: rotate(360deg); }
}

/* Follow icon states */
.rm-follow-btn .follow-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
}

.rm-follow-btn .icon-check {
    display: none;
}

.rm-follow-btn.is-following .icon-follow {
    display: none;
}

.rm-follow-btn.is-following .icon-check {
    display: block;
}

/* Follower count next to button */
.rm-follower-count {
    color: #888;
    font-size: 0.85rem;
}

/* Small follow button variant */
.rm-follow-btn-small {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 12px;
}

.rm-follow-btn-small .follow-icon {
    display: none;
}

/* ===================== Profile Follow Stats ===================== */
.rm-profile-follow-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.rm-profile-stat-link,
.rm-profile-stat-item {
    display: flex;
    align-items: baseline;  /* Change from 'center' to 'baseline' */
    gap: 4px;
    text-decoration: none;
    color: inherit;
}

.rm-profile-stat-link:hover {
    text-decoration: none;
}

.rm-profile-stat-link:hover .rm-profile-stat-number {
    color: var(--ps-gold);
}

.rm-profile-stat-number {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.rm-profile-stat-label {
    color: #888;
    font-size: 0.85rem;
}

.rm-profile-stat-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

/* ===================== Following/Followers List ===================== */
.rm-follow-list-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.rm-follow-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rm-follow-list-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.rm-follow-list-count {
    color: #888;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
}

/* Empty State */
.rm-follow-empty {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.rm-follow-empty-icon {
    color: #444;
    margin-bottom: 16px;
}

.rm-follow-empty-text {
    color: #888;
    font-size: 1.1rem;
    margin: 0 0 8px 0;
}

.rm-follow-empty-hint {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Follow Grid */
.rm-follow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Follow Card */
.rm-follow-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.rm-follow-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.rm-follow-card-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.rm-follow-card-link:hover {
    text-decoration: none;
}

.rm-follow-card-avatar {
    flex-shrink: 0;
}

.rm-follow-card-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    object-fit: cover;
}

.rm-follow-card-info {
    flex: 1;
    min-width: 0;
}

.rm-follow-card-name {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.rm-follow-card:hover .rm-follow-card-name {
    color: var(--ps-gold);
}

.rm-follow-card-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.rm-follow-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #888;
    font-size: 0.8rem;
}

.rm-follow-stat svg {
    opacity: 0.7;
}

/* Follow button in card */
.rm-follow-card .rm-follow-btn-small {
    flex-shrink: 0;
}

/* Card removal animation */
.rm-follow-card.removing {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

/* Load More */
.rm-follow-load-more-wrapper {
    text-align: center;
    margin-top: 24px;
}

.rm-follow-load-more {
    padding: 12px 32px;
    background: transparent;
    color: var(--ps-orange-deep);
    border: 2px solid var(--ps-orange-deep);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.rm-follow-load-more:hover {
    background: var(--ps-orange-deep);
    color: #fff;
}

/* Notice */
.rm-follow-notice {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.rm-follow-notice a {
    color: var(--ps-gold);
}

/* ===================== Mobile Responsive ===================== */
@media (max-width: 768px) {
    .rm-follow-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .rm-follow-btn {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
    
    .rm-profile-follow-stats {
        gap: 12px;
    }
    
    .rm-profile-stat-number {
        font-size: 0.95rem;
    }
    
    .rm-profile-stat-label {
        font-size: 0.8rem;
    }
    
    .rm-follow-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .rm-follow-list-title {
        font-size: 1.3rem;
    }
    
    .rm-follow-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .rm-follow-card {
        padding: 12px;
    }
    
    .rm-follow-card-avatar img {
        width: 48px;
        height: 48px;
    }
    
    .rm-follow-card-name {
        font-size: 0.95rem;
    }
    
    .rm-follow-btn-small {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .rm-follow-btn {
        padding: 3px 8px;
        font-size: 0.75rem;
        gap: 3px;
    }
    
    .rm-follow-btn .follow-icon {
        width: 12px;
        height: 12px;
    }
    
    .rm-follow-card-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .rm-follow-stat {
        font-size: 0.75rem;
    }
    
    .rm-follow-empty {
        padding: 40px 16px;
    }
    
    .rm-follow-empty-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .rm-follow-empty-text {
        font-size: 1rem;
    }
}