/* ---------------------------------------------------
   stokesnet.xyz - shared social system styles
   (avatars, online dot, status pills, mini profile card)
   Loaded by friends.css / messages.css / profile.css
------------------------------------------------------ */

@font-face {
    font-family: 'BlackOpsOne';
    src: url('https://assets.stokesnet.xyz/fonts/BlackOpsOne.ttf') format('truetype');
    font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Rajdhani';
    src: url('https://assets.stokesnet.xyz/fonts/Rajdhani.ttf') format('truetype');
    font-weight: normal; font-style: normal; font-display: swap;
}

/* ---- avatar (matches admin.css so it renders identically everywhere) ---- */
.sn-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    background: var(--dark-mode-button-background-color);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
    font-family: 'Rajdhani', -apple-system, sans-serif;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.02em;
}

.sn-avatar-wrap {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
}
.sn-online-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #59d68f;
    box-shadow: 0 0 0 2px var(--dark-mode-background-color, #141414), 0 0 8px 0 rgba(89,214,143,0.7);
}
.sn-online-dot[hidden] { display: none; }
.sn-online-dot--lg {
    width: 16px;
    height: 16px;
    box-shadow: 0 0 0 3px #1a1919, 0 0 10px 0 rgba(89,214,143,0.7);
}

/* ---- rank badge ---- */
.rank-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-family: 'Rajdhani', -apple-system, sans-serif;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
}
.rank-pill--trusted { background: rgba(89,214,143,0.12); color: #59d68f; }
.rank-pill--developer { background: rgba(178,125,240,0.14); color: #b77df0; }
.rank-pill--admin { background: rgba(240,185,85,0.14); color: #f0b955; }
.rank-pill--owner { background: rgba(240,104,95,0.14); color: #f0685f; }

/* ---- relationship status pill (search results / cards) ---- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    font-family: 'Rajdhani', -apple-system, sans-serif;
    font-size: 14.5px;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
    transition: box-shadow .2s ease, background .2s ease, transform .1s ease;
}
.status-pill:active { transform: translateY(1px); }
.status-pill svg { width: 15px; height: 15px; flex: 0 0 auto; }

.status-pill--add {
    background: var(--dark-mode-button-background-color);
    color: var(--dark-mode-text-color);
    box-shadow: 0 0 12px 0 rgba(255,255,255,0.06);
}
.status-pill--add:hover { box-shadow: 0 0 16px 2px rgba(255,255,255,0.16); }

.status-pill--pending {
    background: rgba(240,185,85,0.12);
    color: #f0b955;
    cursor: default;
}
.status-pill--pending.is-clickable { cursor: pointer; }
.status-pill--pending.is-clickable:hover { background: rgba(240,185,85,0.2); }

.status-pill--accept {
    background: #59d68f;
    color: #0b2417;
}
.status-pill--accept:hover { box-shadow: 0 0 14px 2px rgba(89,214,143,0.45); }

.status-pill--friends {
    background: rgba(89,214,143,0.12);
    color: #59d68f;
    cursor: default;
}

.status-pill--danger {
    background: transparent;
    color: rgba(240,104,95,0.85);
    box-shadow: none;
    padding: 8px 10px;
}
.status-pill--danger:hover { color: #f0685f; }

.status-pill--ghost {
    background: transparent;
    color: rgba(255,255,255,0.55);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1) inset;
}
.status-pill--ghost:hover { color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,0.25) inset; }

.status-pill:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ---- mini profile card, reused in friends grid / search results / requests ---- */
.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
    transition: box-shadow .2s ease, background .2s ease;
}
.profile-card:hover { background: rgba(255,255,255,0.035); box-shadow: 0 0 0 1px rgba(255,255,255,0.1); }

.profile-card__link {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}
.profile-card__meta { min-width: 0; }
.profile-card__name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Rajdhani', -apple-system, sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--dark-mode-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-card__sub {
    font-family: 'Rajdhani', -apple-system, sans-serif;
    font-size: 13.5px;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.empty-state {
    text-align: center;
    padding: 34px 20px;
    font-family: 'Rajdhani', -apple-system, sans-serif;
    color: rgba(255,255,255,0.4);
    font-size: 15.5px;
}

/* ---- shared nav badge (unread dot on topbar links) ---- */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    background: #f0685f;
    color: #fff;
    font-family: 'Rajdhani', -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}
.nav-badge[hidden] { display: none; }

@media (max-width: 560px) {
    .profile-card { padding: 12px; gap: 12px; }
    .profile-card__actions { gap: 6px; }
}

/* ---------------------------------------------------
   shared modal system (matches the admin panel's confirm
   / edit dialogs) — used for confirmations, the "new
   conversation" picker, and the profile-view card
------------------------------------------------------ */
.sn-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(10,10,10,0.6);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.sn-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
/* nested confirm dialogs (e.g. block, opened from the profile-view modal)
   must always render above the modal that opened them */
.sn-modal-overlay--top { z-index: 400; }

.sn-modal {
    position: relative;
    width: 460px;
    max-width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #1a1919;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 26px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: translateY(14px) scale(0.98);
    transition: transform .22s cubic-bezier(.32,.72,.35,1.2);
}
.sn-modal-overlay.is-open .sn-modal { transform: translateY(0) scale(1); }
.sn-modal--sm { width: 400px; }

.sn-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.sn-modal-head h2 {
    font-family: 'BlackOpsOne', -apple-system, sans-serif;
    font-size: 19px;
    letter-spacing: 0.04em;
    margin: 0;
    color: var(--dark-mode-text-color);
}
.sn-modal-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background .2s ease, color .2s ease;
}
.sn-modal-close:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sn-modal-close svg { width: 18px; height: 18px; display: block; }
.sn-modal-close--floating { position: absolute; top: 14px; right: 14px; z-index: 2; }

.sn-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}
.sn-modal-body p.sn-modal-warning {
    color: rgba(255,255,255,0.7);
    font-size: 14.5px;
    line-height: 1.5;
    margin: 0;
}

.sn-modal-search-input {
    width: 100%;
    height: 48px;
    font-size: 15.5px;
    padding: 0 16px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 0 12px 0 rgba(255,255,255,0.06);
    background-color: var(--dark-mode-input-background-color);
    color: var(--dark-mode-input-text-color);
    font-family: 'Rajdhani', -apple-system, sans-serif;
    outline: none;
    transition: box-shadow .2s ease;
    margin-bottom: 14px;
}
.sn-modal-search-input:focus { box-shadow: 0 0 14px 0 rgba(255,255,255,0.16); }

/* ---- "new conversation" results list ---- */
.new-convo-results { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.new-convo-result { border: none; outline: none; font: inherit; text-align: left; cursor: pointer; width: 100%; margin: 0; }
.new-convo-empty {
    padding: 20px;
    text-align: center;
    font-family: 'Rajdhani', -apple-system, sans-serif;
    color: rgba(255,255,255,0.4);
    font-size: 14.5px;
}

/* ---- profile-view modal (opened from the messages thread header) ---- */
.sn-modal--profile { width: 400px; text-align: center; padding-top: 46px; }
.profile-view-avatar { display: inline-flex; margin-bottom: 14px; }
.profile-view-name {
    margin: 4px 0 8px;
    font-family: 'BlackOpsOne', -apple-system, sans-serif;
    font-size: 22px;
    letter-spacing: 0.03em;
    color: var(--dark-mode-text-color);
    word-break: break-word;
}
.profile-view-meta {
    margin: 10px 0 0;
    font-size: 13.5px;
    color: rgba(255,255,255,0.4);
    font-family: 'Rajdhani', -apple-system, sans-serif;
    min-height: 16px;
}
.profile-view-sub {
    margin: 4px 0 0;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    font-family: 'Rajdhani', -apple-system, sans-serif;
}
.profile-view-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.profile-view-full-link {
    display: inline-block;
    margin-top: 18px;
    font-family: 'Rajdhani', -apple-system, sans-serif;
    font-size: 13.5px;
    color: var(--dark-mode-text-hover-color);
    text-decoration: none;
}
.profile-view-full-link:hover { text-decoration: underline; }
.profile-view-loading {
    padding: 44px 0;
    color: rgba(255,255,255,0.4);
    font-family: 'Rajdhani', -apple-system, sans-serif;
    font-size: 15px;
}

@media (max-width: 520px) {
    .sn-modal, .sn-modal--profile { padding: 20px; }
}
