/* SkiBum social — friends, DMs, leaderboard, profile extras */

.social-page-shell {
    min-height: 100vh;
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 8rem, #ffffff 14rem);
    padding-top: var(--skibum-header-h, calc(4.5rem + env(safe-area-inset-top, 0)));
    padding-bottom: 2.5rem;
}

@media (min-width: 1024px) {
    .social-page-shell {
        padding-top: calc(5rem + env(safe-area-inset-top, 0));
    }
}

.social-page-content {
    max-width: 42rem;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

@media (min-width: 768px) {
    .social-page-content {
        max-width: 48rem;
        padding: 1.25rem 1.5rem 2.5rem;
    }
}

.social-page-header {
    margin-bottom: 1.25rem;
}

.social-page-header-row {
    margin-bottom: 0.75rem;
}

.social-page-title {
    font-family: var(--skibum-font-display, Georgia, serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .social-page-title {
        font-size: 2rem;
    }
}

.social-page-subtitle {
    margin-top: 0.35rem;
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.5;
    max-width: 36rem;
}

.social-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}

.social-card-body {
    padding: 1rem;
}

@media (min-width: 768px) {
    .social-card-body {
        padding: 1.25rem;
    }
}

.social-invite-card {
    padding: 1rem 1.125rem;
    border-radius: 0.875rem;
    border: 1px solid rgba(79, 117, 155, 0.22);
    background: linear-gradient(135deg, rgba(79, 117, 155, 0.07), #ffffff 70%);
}

.social-tab-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.social-tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    transition: all 0.15s ease;
}

.social-tab-btn:hover {
    border-color: #4F759B;
    color: #4F759B;
}

.social-tab-btn.is-active {
    background: #1A281F;
    border-color: #1A281F;
    color: #fff;
}

.social-list-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid #f3f4f6;
    background: #fafafa;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.social-list-item:hover {
    border-color: #dbeafe;
    background: #fff;
    box-shadow: 0 2px 10px rgba(79, 117, 155, 0.08);
}

.social-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4F759B, #1A281F);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    overflow: hidden;
}

.social-avatar-lg {
    width: 3rem;
    height: 3rem;
}

.social-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-dm-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: min(55vh, 480px);
    overflow-y: auto;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

.social-dm-bubble {
    max-width: 85%;
    padding: 0.625rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
    word-break: break-word;
}

.social-dm-bubble.mine {
    align-self: flex-end;
    background: #1A281F;
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.social-dm-bubble.theirs {
    align-self: flex-start;
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 0.25rem;
}

.social-dm-compose {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.social-dm-compose input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 2.75rem 1fr auto;
    gap: 0.75rem 1rem;
    align-items: center;
    padding: 0.875rem 1rem;
    border-radius: 0.875rem;
    border: 1px solid #f3f4f6;
    background: #fff;
}

.leaderboard-rank {
    font-size: 1.125rem;
    font-weight: 700;
    color: #374151;
    text-align: center;
}

.leaderboard-row.rank-1 {
    border-color: #fcd34d;
    background: linear-gradient(90deg, #fffbeb, #fff);
}

.leaderboard-row.rank-2 {
    border-color: #d1d5db;
    background: #fafafa;
}

.leaderboard-row.rank-3 {
    border-color: #fdba74;
    background: #fff7ed;
}

.profile-tab-bar {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.875rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.profile-tab-btn {
    padding: 0.4rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

.profile-tab-btn.is-active {
    color: #4F759B;
    background: rgba(79, 117, 155, 0.1);
}

.profile-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 0.625rem;
}

.profile-badge-card {
    text-align: center;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.profile-badge-card.locked {
    opacity: 0.45;
    filter: grayscale(0.6);
}

.profile-badge-card.earned {
    border-color: #4F759B;
    box-shadow: 0 2px 12px rgba(79, 117, 155, 0.12);
}

.profile-hero-compact .skibum-card-padded,
.profile-activity-compact .skibum-card-padded {
    padding: 1rem 1.125rem;
}

.profile-stat-compact {
    padding: 0.45rem 0.75rem !important;
    min-width: 4.5rem;
}

.profile-stat-compact .skibum-stat-value {
    font-size: 1.125rem !important;
    line-height: 1.2;
}

.profile-stat-compact .skibum-stat-label {
    font-size: 0.65rem !important;
}

#nav-gamification-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    background: rgba(79, 117, 155, 0.12);
    color: #1A281F;
    font-size: 0.75rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

#nav-gamification-chip:hover {
    background: rgba(79, 117, 155, 0.2);
}

.skibum-fav-btn.is-favorited {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

.skibum-fav-btn.is-favorited i {
    font-weight: 900;
}
