feat: add global & server leveling, quests, achievements, guilds land-claiming, social & toggleable configs

This commit is contained in:
SCOPEDD committed 2026-09-29 03:24:27 -04:00
1 parent 4b79f69c20
commit b4cef85b1f
40 files changed
+10261 -27

No files matched your search

+913
View File
@@ -0,0 +1,913 @@
<script lang="ts">
import { onMount } from 'svelte';
import {
Users, UserPlus, MessageSquare, Gamepad2, Send, Check, X, Trash2,
Clock, ExternalLink, LoaderCircle, RefreshCw, Circle, UserX, Sparkles
} from '@lucide/svelte';
import Avatar from '../components/Avatar.svelte';
import Modal from '../components/Modal.svelte';
import { activeAccount, app, instances, toast } from '../lib/store.svelte';
import { invoke } from '../lib/tauri';
import type { FriendInfo, DirectMessage, GameInvite } from '../lib/types';
let activeSection = $state<'friends' | 'messages' | 'invites'>('friends');
let friendsFilter = $state<'all' | 'online' | 'pending'>('all');
let loading = $state(false);
let friends = $state<FriendInfo[]>([]);
let invites = $state<GameInvite[]>([]);
let activeChatFriend = $state<FriendInfo | null>(null);
let messages = $state<DirectMessage[]>([]);
let messageInput = $state('');
let sendingMessage = $state(false);
// Add Friend Modal / Input
let addFriendUsername = $state('');
let sendingFriendReq = $state(false);
// Send Game Invite Modal
let inviteModalOpen = $state(false);
let inviteTargetFriend = $state<FriendInfo | null>(null);
let inviteInstanceId = $state(instances()[0]?.id ?? '');
let sendingInvite = $state(false);
async function loadData() {
loading = true;
try {
const [fList, iList] = await Promise.all([
invoke<FriendInfo[]>('get_friends').catch(() => []),
invoke<GameInvite[]>('get_game_invites').catch(() => [])
]);
friends = fList;
invites = iList;
} catch (e: any) {
toast(e?.message ?? 'Failed to load social data', 'error');
} finally {
loading = false;
}
}
async function handleSendFriendRequest() {
if (!addFriendUsername.trim()) return;
sendingFriendReq = true;
try {
await invoke('send_friend_request', { friendUsername: addFriendUsername.trim() });
toast(`Friend request sent to ${addFriendUsername.trim()}!`, 'ok');
addFriendUsername = '';
await loadData();
} catch (e: any) {
toast(e?.message ?? 'Failed to send friend request', 'error');
} finally {
sendingFriendReq = false;
}
}
async function handleRespondRequest(friendUuid: string, accept: boolean) {
try {
await invoke('respond_friend_request', { friendUuid, accept });
toast(accept ? 'Friend request accepted!' : 'Request declined.', 'ok');
await loadData();
} catch (e: any) {
toast(e?.message ?? 'Action failed', 'error');
}
}
async function handleRemoveFriend(friendUuid: string) {
try {
await invoke('remove_friend', { friendUuid });
friends = friends.filter((f) => f.uuid !== friendUuid);
if (activeChatFriend?.uuid === friendUuid) {
activeChatFriend = null;
messages = [];
}
toast('Friend removed', 'ok');
} catch (e: any) {
toast(e?.message ?? 'Failed to remove friend', 'error');
}
}
async function selectChatFriend(friend: FriendInfo) {
activeChatFriend = friend;
activeSection = 'messages';
try {
messages = await invoke<DirectMessage[]>('get_direct_messages', {
friendUuid: friend.uuid,
limit: 50
});
} catch (e: any) {
toast(e?.message ?? 'Failed to load messages', 'error');
}
}
async function handleSendMessage() {
if (!activeChatFriend || !messageInput.trim()) return;
sendingMessage = true;
const text = messageInput.trim();
try {
const msg = await invoke<DirectMessage>('send_direct_message', {
toUuid: activeChatFriend.uuid,
content: text
});
messages = [...messages, msg];
messageInput = '';
} catch (e: any) {
toast(e?.message ?? 'Failed to send message', 'error');
} finally {
sendingMessage = false;
}
}
function openInviteModal(friend: FriendInfo) {
inviteTargetFriend = friend;
inviteModalOpen = true;
}
async function handleSendInvite() {
if (!inviteTargetFriend) return;
sendingInvite = true;
try {
const inst = instances().find((i) => i.id === inviteInstanceId);
await invoke('send_game_invite', {
toUuid: inviteTargetFriend.uuid,
instanceId: inviteInstanceId,
serverAddress: inst?.server?.address ?? 'localhost',
serverName: inst?.name ?? 'Minecraft Server'
});
toast(`Game invite sent to ${inviteTargetFriend.username}!`, 'ok');
inviteModalOpen = false;
} catch (e: any) {
toast(e?.message ?? 'Failed to send game invite', 'error');
} finally {
sendingInvite = false;
}
}
async function handleRespondInvite(inviteId: string, accept: boolean) {
try {
await invoke('respond_game_invite', { inviteId, accept });
invites = invites.map((inv) =>
inv.id === inviteId ? { ...inv, status: accept ? 'accepted' : 'declined' } : inv
);
toast(accept ? 'Game invite accepted!' : 'Invite declined.', 'ok');
} catch (e: any) {
toast(e?.message ?? 'Failed to respond to invite', 'error');
}
}
const acceptedFriends = $derived(friends.filter((f) => f.status === 'accepted'));
const pendingReceived = $derived(friends.filter((f) => f.status === 'pending_received'));
const pendingSent = $derived(friends.filter((f) => f.status === 'pending_sent'));
const displayedFriends = $derived(
friends.filter((f) => {
if (friendsFilter === 'online') return f.status === 'accepted' && f.is_online;
if (friendsFilter === 'pending') return f.status !== 'accepted';
return f.status === 'accepted';
})
);
onMount(() => {
loadData();
});
</script>
<div class="social-page">
<!-- Page Header -->
<div class="page-header">
<div class="title-wrap">
<h1><Users class="users-icon" size={26} /> Friends & Social</h1>
<p class="lead">Connect with friends, send direct messages, and team up with game invites.</p>
</div>
<div class="header-actions">
<button class="ghost icon" onclick={loadData} title="Refresh" aria-label="Refresh">
<RefreshCw size={17} class={loading ? 'spin' : ''} />
</button>
</div>
</div>
<!-- Social Navigation Tabs -->
<div class="tabs-row">
<div class="tabs-segmented">
<button class:active={activeSection === 'friends'} onclick={() => (activeSection = 'friends')}>
<Users size={15} /> Friends ({acceptedFriends.length})
</button>
<button class:active={activeSection === 'messages'} onclick={() => (activeSection = 'messages')}>
<MessageSquare size={15} /> Direct Messages
</button>
<button class:active={activeSection === 'invites'} onclick={() => (activeSection = 'invites')}>
<Gamepad2 size={15} /> Invites ({invites.filter((i) => i.status === 'pending').length})
</button>
</div>
</div>
<!-- Content Sections -->
{#if activeSection === 'friends'}
<div class="friends-layout">
<!-- Add Friend Bar -->
<div class="add-friend-bar glass">
<UserPlus size={18} class="muted" />
<input
type="text"
placeholder="Enter a player's username to add them..."
bind:value={addFriendUsername}
onkeydown={(e) => e.key === 'Enter' && handleSendFriendRequest()}
class="add-friend-input"
/>
<button
class="primary sm"
onclick={handleSendFriendRequest}
disabled={sendingFriendReq || !addFriendUsername.trim()}
>
{#if sendingFriendReq}<LoaderCircle size={14} class="spin" />{:else}Send Request{/if}
</button>
</div>
<!-- Filter Sub-tabs -->
<div class="filter-pills">
<button class="pill" class:active={friendsFilter === 'all'} onclick={() => (friendsFilter = 'all')}>
All ({acceptedFriends.length})
</button>
<button class="pill" class:active={friendsFilter === 'online'} onclick={() => (friendsFilter = 'online')}>
Online ({acceptedFriends.filter((f) => f.is_online).length})
</button>
<button class="pill" class:active={friendsFilter === 'pending'} onclick={() => (friendsFilter = 'pending')}>
Pending ({pendingReceived.length + pendingSent.length})
</button>
</div>
<!-- Pending Incoming Requests Alert -->
{#if pendingReceived.length > 0 && friendsFilter !== 'pending'}
<div class="pending-alert glass">
<span class="tiny bold">You have {pendingReceived.length} pending friend request(s)</span>
<button class="ghost sm" onclick={() => (friendsFilter = 'pending')}>Review</button>
</div>
{/if}
<!-- Friends List -->
{#if friendsFilter === 'pending'}
<div class="pending-lists">
{#if pendingReceived.length > 0}
<h4 class="subheading">Incoming Requests ({pendingReceived.length})</h4>
<div class="friends-grid">
{#each pendingReceived as req (req.uuid)}
<div class="friend-card glass">
<div class="card-left" role="button" tabindex="0" onclick={() => (app.viewProfileUuid = req.uuid)} onkeydown={(e) => e.key === 'Enter' && (app.viewProfileUuid = req.uuid)}>
<Avatar uuid={req.uuid} name={req.username} size={2.5} />
<div class="name-block">
<span class="user-title">{req.username}</span>
<span class="tiny muted">Wants to be friends</span>
</div>
</div>
<div class="req-actions">
<button class="primary icon sm" onclick={() => handleRespondRequest(req.uuid, true)} title="Accept">
<Check size={14} />
</button>
<button class="ghost icon sm" onclick={() => handleRespondRequest(req.uuid, false)} title="Decline">
<X size={14} />
</button>
</div>
</div>
{/each}
</div>
{/if}
{#if pendingSent.length > 0}
<h4 class="subheading" style:margin-top="1rem">Outgoing Requests ({pendingSent.length})</h4>
<div class="friends-grid">
{#each pendingSent as req (req.uuid)}
<div class="friend-card glass">
<div class="card-left">
<Avatar uuid={req.uuid} name={req.username} size={2.5} />
<div class="name-block">
<span class="user-title">{req.username}</span>
<span class="tiny muted">Request pending...</span>
</div>
</div>
<button class="ghost icon sm" onclick={() => handleRemoveFriend(req.uuid)} title="Cancel Request">
<Trash2 size={14} />
</button>
</div>
{/each}
</div>
{/if}
{#if pendingReceived.length === 0 && pendingSent.length === 0}
<div class="empty-state glass">
<p class="muted">No pending friend requests.</p>
</div>
{/if}
</div>
{:else if displayedFriends.length === 0}
<div class="empty-state glass">
<Users size={32} class="muted" />
<p class="muted">No friends found in this view. Add friends by typing their username above!</p>
</div>
{:else}
<div class="friends-grid">
{#each displayedFriends as friend (friend.uuid)}
<div class="friend-card glass">
<div
class="card-left"
role="button"
tabindex="0"
onclick={() => (app.viewProfileUuid = friend.uuid)}
onkeydown={(e) => e.key === 'Enter' && (app.viewProfileUuid = friend.uuid)}
title="View Profile"
>
<div class="avatar-holder">
<Avatar uuid={friend.uuid} name={friend.username} size={2.6} />
<span class="status-dot" class:online={friend.is_online}></span>
</div>
<div class="name-block">
<span class="user-title">{friend.username}</span>
{#if friend.is_online && friend.playing_on}
<span class="tiny playing-on">Playing on {friend.playing_on}</span>
{:else if friend.is_online}
<span class="tiny online-label">Online in Launcher</span>
{:else}
<span class="tiny muted">Offline</span>
{/if}
</div>
</div>
<div class="friend-actions">
<button class="ghost icon sm" onclick={() => selectChatFriend(friend)} title="Message">
<MessageSquare size={15} />
</button>
<button class="ghost icon sm" onclick={() => openInviteModal(friend)} title="Invite to Game">
<Gamepad2 size={15} />
</button>
<button class="ghost icon sm danger-hover" onclick={() => handleRemoveFriend(friend.uuid)} title="Remove Friend">
<UserX size={15} />
</button>
</div>
</div>
{/each}
</div>
{/if}
</div>
{:else if activeSection === 'messages'}
<!-- Direct Messages Split View -->
<div class="messages-split glass">
<!-- Conversation Sidebar -->
<div class="conv-sidebar">
<span class="conv-head tiny uppercase muted">Conversations</span>
<div class="conv-list">
{#each acceptedFriends as friend (friend.uuid)}
<button
class="conv-item"
class:active={activeChatFriend?.uuid === friend.uuid}
onclick={() => selectChatFriend(friend)}
>
<div class="avatar-holder">
<Avatar uuid={friend.uuid} name={friend.username} size={2} />
<span class="status-dot" class:online={friend.is_online}></span>
</div>
<div class="conv-meta">
<span class="conv-name">{friend.username}</span>
{#if friend.playing_on}
<span class="tiny muted">{friend.playing_on}</span>
{/if}
</div>
</button>
{/each}
</div>
</div>
<!-- Chat Thread Main -->
<div class="chat-thread">
{#if activeChatFriend}
<div class="thread-header">
<div
class="thread-user"
role="button"
tabindex="0"
onclick={() => (app.viewProfileUuid = activeChatFriend!.uuid)}
onkeydown={(e) => e.key === 'Enter' && (app.viewProfileUuid = activeChatFriend!.uuid)}
>
<Avatar uuid={activeChatFriend.uuid} name={activeChatFriend.username} size={2.2} />
<div>
<strong>{activeChatFriend.username}</strong>
<span class="tiny muted block">{activeChatFriend.is_online ? 'Active now' : 'Offline'}</span>
</div>
</div>
<button class="primary sm" onclick={() => openInviteModal(activeChatFriend!)}>
<Gamepad2 size={13} /> Invite
</button>
</div>
<div class="messages-scroll">
{#if messages.length === 0}
<div class="empty-state">
<MessageSquare size={28} class="muted" />
<p class="tiny muted">No messages yet with {activeChatFriend.username}. Say hello!</p>
</div>
{:else}
{#each messages as msg (msg.id)}
{@const isMine = msg.from_uuid === activeAccount()?.uuid}
<div class="bubble-row" class:is-mine={isMine}>
<div class="bubble" class:is-mine={isMine}>
<p class="bubble-text">{msg.content}</p>
<span class="bubble-time tiny">{new Date(msg.created_at).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}</span>
</div>
</div>
{/each}
{/if}
</div>
<div class="message-composer">
<input
type="text"
placeholder="Type a message..."
bind:value={messageInput}
onkeydown={(e) => e.key === 'Enter' && handleSendMessage()}
class="composer-input"
/>
<button
class="primary icon"
onclick={handleSendMessage}
disabled={sendingMessage || !messageInput.trim()}
aria-label="Send Message"
>
{#if sendingMessage}<LoaderCircle size={15} class="spin" />{:else}<Send size={15} />{/if}
</button>
</div>
{:else}
<div class="center-state">
<MessageSquare size={36} class="muted" />
<p class="muted">Select a friend to start chatting</p>
</div>
{/if}
</div>
</div>
{:else if activeSection === 'invites'}
<!-- Game Invites View -->
<div class="invites-view">
{#if invites.length === 0}
<div class="empty-state glass">
<Gamepad2 size={36} class="muted" />
<p class="muted">No game invites received. When friends invite you to join their server, they will appear here!</p>
</div>
{:else}
<div class="invites-grid">
{#each invites as inv (inv.id)}
<div class="invite-card glass">
<div class="invite-top">
<Avatar uuid={inv.from_uuid} name={inv.from_username} size={2.5} />
<div class="invite-meta">
<span class="inviter-name"><strong>{inv.from_username}</strong> invited you to play</span>
<span class="server-title">{inv.server_name}</span>
<span class="tiny muted server-addr">{inv.server_address}</span>
</div>
</div>
<div class="invite-footer">
<span class="tiny muted">{new Date(inv.created_at).toLocaleDateString()}</span>
{#if inv.status === 'pending'}
<div class="invite-btns">
<button class="primary sm" onclick={() => handleRespondInvite(inv.id, true)}>
<Check size={13} /> Accept
</button>
<button class="ghost sm" onclick={() => handleRespondInvite(inv.id, false)}>
Decline
</button>
</div>
{:else}
<span class="badge status-badge {inv.status}">{inv.status}</span>
{/if}
</div>
</div>
{/each}
</div>
{/if}
</div>
{/if}
</div>
<!-- Send Game Invite Modal -->
<Modal bind:open={inviteModalOpen} title="Invite {inviteTargetFriend?.username} to Play" width={24}>
<div class="invite-modal-body">
<p class="tiny muted">
Choose which instance / server you want to invite {inviteTargetFriend?.username} to join:
</p>
<label>
<span class="field-label">Instance</span>
<select bind:value={inviteInstanceId} class="modal-select">
{#each instances() as inst}
<option value={inst.id}>{inst.name}</option>
{/each}
</select>
</label>
</div>
{#snippet footer()}
<button class="ghost" onclick={() => (inviteModalOpen = false)}>Cancel</button>
<button class="primary" onclick={handleSendInvite} disabled={sendingInvite}>
{#if sendingInvite}<LoaderCircle size={14} class="spin" />{:else}<Gamepad2 size={14} />{/if}
Send Game Invite
</button>
{/snippet}
</Modal>
<style>
.social-page {
height: 100%;
display: flex;
flex-direction: column;
overflow-y: auto;
padding: 1.6rem 2.2rem 2.5rem;
gap: 1.2rem;
}
.page-header {
display: flex;
justify-content: space-between;
align-items: flex-end;
border-bottom: 1px solid var(--line);
padding-bottom: 1rem;
}
.title-wrap h1 {
font-size: 1.5rem;
font-weight: 700;
display: flex;
align-items: center;
gap: 0.6rem;
}
:global(.users-icon) {
color: var(--accent);
}
.lead {
color: var(--muted);
font-size: 0.88rem;
margin-top: 0.2rem;
}
.tabs-row {
display: flex;
}
.tabs-segmented {
display: flex;
background: color-mix(in srgb, var(--surface) 80%, transparent);
padding: 0.25rem;
border-radius: var(--radius-sm);
border: 1px solid var(--line);
gap: 0.2rem;
}
.tabs-segmented button {
display: flex;
align-items: center;
gap: 0.4rem;
background: transparent;
border: none;
padding: 0.45rem 1rem;
font-size: 0.85rem;
font-weight: 560;
color: var(--muted);
border-radius: calc(var(--radius-sm) - 2px);
transition: all 0.15s;
}
.tabs-segmented button.active {
background: color-mix(in srgb, var(--text) 10%, transparent);
color: var(--text);
}
.friends-layout {
display: flex;
flex-direction: column;
gap: 1rem;
}
.add-friend-bar {
display: flex;
align-items: center;
gap: 0.8rem;
padding: 0.6rem 1rem;
border-radius: var(--radius);
background: var(--surface);
border: 1px solid var(--line);
}
.add-friend-input {
flex: 1;
background: transparent;
border: none;
font-size: 0.88rem;
color: var(--text);
outline: none;
}
.filter-pills {
display: flex;
gap: 0.4rem;
}
.pill {
padding: 0.3rem 0.75rem;
font-size: 0.8rem;
font-weight: 560;
border-radius: 99rem;
background: color-mix(in srgb, var(--text) 6%, transparent);
border: 1px solid transparent;
color: var(--muted);
transition: all 0.15s;
}
.pill.active {
background: color-mix(in srgb, var(--accent) 18%, transparent);
border-color: color-mix(in srgb, var(--accent) 45%, transparent);
color: var(--text);
}
.pending-alert {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.6rem 1rem;
border-radius: var(--radius-sm);
background: color-mix(in srgb, var(--accent) 12%, transparent);
border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.friends-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
gap: 0.9rem;
}
.friend-card {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.9rem 1.1rem;
border-radius: var(--radius);
background: var(--surface);
border: 1px solid var(--line);
transition: border-color 0.15s, transform 0.12s;
}
.friend-card:hover {
border-color: var(--line-strong);
transform: translateY(-1px);
}
.card-left {
display: flex;
align-items: center;
gap: 0.8rem;
cursor: pointer;
flex: 1;
min-width: 0;
}
.avatar-holder {
position: relative;
}
.status-dot {
position: absolute;
bottom: -1px;
right: -1px;
width: 9px;
height: 9px;
border-radius: 50%;
background: var(--muted);
border: 2px solid var(--surface);
}
.status-dot.online {
background: var(--success);
}
.name-block {
display: flex;
flex-direction: column;
min-width: 0;
}
.user-title {
font-weight: 650;
font-size: 0.92rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.playing-on {
color: var(--accent);
font-weight: 560;
}
.online-label {
color: var(--success);
}
.friend-actions, .req-actions {
display: flex;
align-items: center;
gap: 0.3rem;
}
.danger-hover:hover {
color: var(--danger);
}
.subheading {
font-size: 0.92rem;
font-weight: 700;
margin-bottom: 0.6rem;
}
/* Direct Messages Split */
.messages-split {
display: flex;
height: 32rem;
border-radius: var(--radius);
background: var(--surface);
border: 1px solid var(--line);
overflow: hidden;
}
.conv-sidebar {
width: 15rem;
border-right: 1px solid var(--line);
display: flex;
flex-direction: column;
background: color-mix(in srgb, var(--surface) 90%, black);
}
.conv-head {
padding: 0.8rem 1rem 0.5rem;
letter-spacing: 0.06em;
font-weight: 700;
}
.conv-list {
flex: 1;
overflow-y: auto;
display: flex;
flex-direction: column;
padding: 0.3rem 0.5rem;
gap: 0.2rem;
}
.conv-item {
display: flex;
align-items: center;
gap: 0.65rem;
padding: 0.55rem 0.7rem;
border-radius: var(--radius-sm);
background: transparent;
border: none;
text-align: left;
transition: background 0.12s;
}
.conv-item:hover {
background: color-mix(in srgb, var(--text) 6%, transparent);
}
.conv-item.active {
background: color-mix(in srgb, var(--accent) 15%, transparent);
}
.conv-meta {
display: flex;
flex-direction: column;
min-width: 0;
}
.conv-name {
font-size: 0.86rem;
font-weight: 650;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.chat-thread {
flex: 1;
display: flex;
flex-direction: column;
}
.thread-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.8rem 1.2rem;
border-bottom: 1px solid var(--line);
}
.thread-user {
display: flex;
align-items: center;
gap: 0.75rem;
cursor: pointer;
}
.block {
display: block;
}
.messages-scroll {
flex: 1;
overflow-y: auto;
padding: 1.2rem;
display: flex;
flex-direction: column;
gap: 0.6rem;
}
.bubble-row {
display: flex;
justify-content: flex-start;
}
.bubble-row.is-mine {
justify-content: flex-end;
}
.bubble {
max-width: 22rem;
padding: 0.6rem 0.9rem;
border-radius: var(--radius);
background: color-mix(in srgb, var(--surface) 90%, var(--text));
border: 1px solid var(--line);
display: flex;
flex-direction: column;
gap: 0.2rem;
}
.bubble.is-mine {
background: color-mix(in srgb, var(--accent) 25%, transparent);
border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.bubble-text {
font-size: 0.88rem;
margin: 0;
line-height: 1.35;
word-break: break-word;
}
.bubble-time {
align-self: flex-end;
color: var(--muted);
font-size: 0.68rem;
}
.message-composer {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.75rem 1.2rem;
border-top: 1px solid var(--line);
}
.composer-input {
flex: 1;
background: color-mix(in srgb, var(--bg) 60%, transparent);
border: 1px solid var(--line);
color: var(--text);
padding: 0.5rem 0.85rem;
border-radius: var(--radius-sm);
font-size: 0.88rem;
}
/* Invites View */
.invites-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
gap: 1rem;
}
.invite-card {
display: flex;
flex-direction: column;
gap: 0.9rem;
padding: 1.2rem;
border-radius: var(--radius);
background: var(--surface);
border: 1px solid var(--line);
}
.invite-top {
display: flex;
align-items: center;
gap: 0.9rem;
}
.invite-meta {
display: flex;
flex-direction: column;
gap: 0.15rem;
}
.server-title {
font-size: 1rem;
font-weight: 700;
}
.invite-footer {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid color-mix(in srgb, var(--line) 40%, transparent);
padding-top: 0.7rem;
}
.invite-btns {
display: flex;
gap: 0.4rem;
}
.status-badge {
text-transform: capitalize;
}
.status-badge.accepted {
background: color-mix(in srgb, var(--success) 20%, transparent);
color: var(--success);
}
.status-badge.declined {
background: color-mix(in srgb, var(--danger) 20%, transparent);
color: var(--danger);
}
.invite-modal-body {
display: flex;
flex-direction: column;
gap: 0.8rem;
}
.modal-select {
width: 100%;
background: color-mix(in srgb, var(--bg) 60%, transparent);
border: 1px solid var(--line);
color: var(--text);
padding: 0.45rem 0.75rem;
border-radius: var(--radius-sm);
font-size: 0.88rem;
}
.badge {
display: inline-flex;
align-items: center;
gap: 0.3rem;
font-size: 0.72rem;
font-weight: 600;
padding: 0.16rem 0.5rem;
border-radius: 99rem;
}
.center-state, .empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.8rem;
padding: 3rem 1.5rem;
text-align: center;
border-radius: var(--radius);
}
</style>