/**
 * Lunker Social Components CSS
 * Complete styles for followers, following, and user profile components
 */

 :root {
    --lunker-primary: #2d5a2d;
    --lunker-secondary: #3a7c3a;
    --lunker-accent: #4a9d4a;
    --lunker-light: #e8f5e8;
    --lunker-cream: #f5f3f0;
    --lunker-hover: rgba(45, 90, 45, 0.1);
    --lunker-border: #e0e0e0;
}

/* User Card Styles for Followers/Following Lists */
.user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--lunker-border);
    transition: all 0.2s ease;
    background: white;
}

.user-card:last-child {
    border-bottom: none;
}

.user-card:hover {
    background-color: var(--lunker-hover);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--lunker-light);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.user-avatar:hover {
    border-color: var(--lunker-primary);
    transform: scale(1.05);
}

.user-details {
    min-width: 0;
    flex: 1;
}

.user-name {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.user-username {
    margin: 0 0 4px 0;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.2;
}

.user-bio {
    font-size: 0.8rem;
    color: #888;
    margin: 4px 0 0 0;
    line-height: 1.3;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-actions {
    flex-shrink: 0;
    margin-left: 12px;
}

/* Follow Button Styles */
.follow-btn {
    background: var(--lunker-primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    min-width: 80px;
}

.follow-btn:hover {
    background: var(--lunker-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(45, 90, 45, 0.3);
}

.follow-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.follow-btn.following {
    background: #fff;
    color: var(--lunker-primary);
    border: 2px solid var(--lunker-primary);
}

.follow-btn.following:hover {
    background: var(--lunker-primary);
    color: white;
}

/* Profile Stats Styles */
.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px 0;
    border-top: 1px solid var(--lunker-border);
    border-bottom: 1px solid var(--lunker-border);
    margin: 20px 0;
}

.stat-item {
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 8px;
    min-width: 80px;
}

.stat-item:hover {
    background-color: var(--lunker-hover);
    transform: translateY(-1px);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--lunker-primary);
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px 8px 0 0;
}

.tab {
    padding: 12px 24px;
    border: none;
    background: none;
    color: #666;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.tab.active {
    color: var(--lunker-primary);
    border-bottom-color: var(--lunker-primary);
    background-color: var(--lunker-hover);
}

.tab:hover:not(.active) {
    color: var(--lunker-secondary);
    background-color: rgba(45, 90, 45, 0.05);
}

/* Container Styles */
.followers-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.users-list, .followers-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.page-title h1 {
    margin: 0;
    color: var(--lunker-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.back-link {
    color: var(--lunker-primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.back-link:hover {
    color: var(--lunker-secondary);
    text-decoration: none;
}

/* Loading and Empty States */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.loading i {
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #ccc;
}

.empty-state h4 {
    margin-bottom: 8px;
    color: #555;
}

.empty-state p {
    color: #777;
    margin: 0;
}

/* Profile Card Styles */
.user-profile-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--lunker-light);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
    border-color: var(--lunker-primary);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.profile-username {
    font-size: 1rem;
    color: #666;
    margin-bottom: 16px;
}

.profile-bio {
    color: #555;
    margin-bottom: 24px;
    line-height: 1.5;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.profile-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.secondary-btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.secondary-btn:hover {
    background: #e9ecef;
    color: #333;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Follower/Following Item Styles (alternative naming) */
.follower-item, .following-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--lunker-border);
    transition: all 0.2s ease;
}

.follower-item:last-child, .following-item:last-child {
    border-bottom: none;
}

.follower-item:hover, .following-item:hover {
    background-color: var(--lunker-hover);
}

.follower-info, .following-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.follower-avatar, .following-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--lunker-light);
}

.follower-details, .following-details {
    min-width: 0;
}

.follower-details h4, .following-details h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.follower-details p, .following-details p {
    margin: 0 0 4px 0;
    font-size: 0.875rem;
    color: #666;
}

.follower-bio, .following-bio {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}

/* Stats Summary */
.stats-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    justify-content: center;
}

.stats-summary .stat-item {
    text-align: center;
    min-width: 60px;
}

.stats-summary .stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--lunker-primary);
}

.stats-summary .stat-label {
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .followers-container {
        padding: 16px;
    }

    .page-header {
        padding: 20px;
    }

    .user-card, .follower-item, .following-item {
        padding: 12px 16px;
    }

    .user-avatar, .follower-avatar, .following-avatar {
        width: 40px;
        height: 40px;
    }

    .user-bio, .follower-bio, .following-bio {
        max-width: 200px;
    }

    .profile-stats {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .stat-item {
        padding: 12px;
    }

    .tab {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .profile-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .user-profile-card {
        padding: 24px;
        margin: 0 16px 24px 16px;
    }

    .stats-summary {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .user-info, .follower-info, .following-info {
        gap: 8px;
    }

    .user-avatar, .follower-avatar, .following-avatar {
        width: 36px;
        height: 36px;
    }

    .user-name, .follower-details h4, .following-details h4 {
        font-size: 0.9rem;
    }

    .user-username, .follower-details p, .following-details p {
        font-size: 0.8rem;
    }

    .follow-btn {
        padding: 6px 16px;
        font-size: 0.8rem;
        min-width: 70px;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 1.3rem;
    }
}

/* Focus styles for accessibility */
.follow-btn:focus,
.tab:focus,
.stat-item:focus,
.back-link:focus {
    outline: 2px solid var(--lunker-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .follow-btn,
    .tab-navigation,
    .back-link {
        display: none;
    }
    
    .user-card, .follower-item, .following-item {
        border: 1px solid #000;
        margin-bottom: 8px;
        break-inside: avoid;
    }
}

/* Ensure delete buttons are visible */
.comment-delete-btn {
    border: none !important;
    background: none !important;
    color: #d9534f !important;
    font-size: 1.1rem !important;
    margin-left: 8px !important;
    cursor: pointer !important;
    padding: 4px !important;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.comment-delete-btn:hover {
    color: #c9302c !important;
    background-color: rgba(217, 83, 79, 0.1) !important;
    border-radius: 4px !important;
}

.comment-delete-btn i {
    pointer-events: none;
}

/* Legacy comment item styles - removed to prevent conflicts */