/* moat_profile_network.css: a profile's followers/following page (profile/network.php);
   moved out of the page (CON-12). */
/* ── Profile hero card ───────────────────────── */
.nw-hero {
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--border);
    background: #fff;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.nw-cover {
    height: 140px;
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 60%, #c084fc 100%);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
}
.nw-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.nw-hero-body {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.nw-avatar-wrap {
    margin-top: -42px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.nw-avatar-wrap img,
.nw-avatar-ph {
    width: 84px; height: 84px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.nw-avatar-ph {
    display: flex; align-items: center; justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: 2rem; font-weight: 600;
}

.nw-hero-info {
    flex: 1;
    padding-top: 0.75rem;
}
.nw-hero-name {
    font-size: 1.2rem; font-weight: 600;
    color: var(--dark);
    margin: 0 0 0.2rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nw-hero-sub {
    font-size: 0.825rem;
    color: var(--secondary);
    margin: 0 0 0.75rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nw-hero-stats {
    display: flex; gap: 1.5rem; flex-wrap: wrap;
}
.nw-hero-stat a {
    text-decoration: none; color: inherit;
    display: flex; align-items: baseline; gap: 0.3rem;
    transition: opacity .15s;
}
.nw-hero-stat a:hover { opacity: .75; }
.nw-hero-stat-num {
    font-size: 1rem; font-weight: 600; color: var(--dark);
}
.nw-hero-stat-lbl {
    font-size: 0.775rem; color: var(--secondary);
}

.nw-hero-actions {
    padding-top: 1rem;
    flex-shrink: 0;
}
.nw-back-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.45rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-size: 0.825rem; font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    transition: border-color .15s, color .15s;
}
.nw-back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

/* ── Tabs ─────────────────────────────────────── */
.nw-tabs-row {
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.nw-tabs { display: flex; gap: 0; margin-bottom: -2px; }
.nw-tab {
    padding: 0.65rem 1.3rem;
    font-size: 0.875rem; font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    border-bottom: 2.5px solid transparent;
    display: flex; align-items: center; gap: 0.4rem;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.nw-tab:hover { color: var(--primary); text-decoration: none; }
.nw-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.nw-tab-badge {
    font-size: 0.75rem; font-weight: 600;
    background: var(--light);
    color: var(--secondary);
    border-radius: 999px; padding: 0.1rem 0.5rem;
    transition: background .15s, color .15s;
}
.nw-tab.active .nw-tab-badge { background: var(--primary); color: #fff; }

/* ── Search ───────────────────────────────────── */
.nw-search-wrap {
    position: relative;
    width: 260px; max-width: 100%;
    margin-bottom: 2px;
}
.nw-search-wrap i {
    position: absolute; left: 0.875rem; top: 50%;
    transform: translateY(-50%);
    color: var(--secondary); pointer-events: none;
}
.nw-search {
    width: 100%;
    padding: 0.5rem 0.875rem 0.5rem 2.5rem;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-size: 0.85rem; color: var(--dark);
    transition: border-color .15s, box-shadow .15s;
}
.nw-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.nw-search::placeholder { color: var(--secondary); }

/* ── Result meta ──────────────────────────────── */
.nw-meta {
    font-size: 0.8rem; color: var(--secondary);
    margin-bottom: 1rem;
}

/* ── Cards grid ───────────────────────────────── */
.nw-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}

/* ── Single card ──────────────────────────────── */
.nw-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    transition: box-shadow .2s, border-color .2s, transform .2s;
}
.nw-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 18px rgba(59,130,246,.12);
    transform: translateY(-1px);
}

/* The link wraps avatar + text */
.nw-card-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}
.nw-card-link:hover { text-decoration: none; color: inherit; }

.nw-card-av {
    width: 50px; height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
    transition: border-color .2s;
}
.nw-card:hover .nw-card-av { border-color: var(--primary); }
.nw-card-av-ph {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; font-weight: 600;
    flex-shrink: 0;
}

.nw-card-body { flex: 1; min-width: 0; }
.nw-card-name {
    font-size: 0.9rem; font-weight: 600;
    color: var(--dark);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin: 0 0 0.15rem;
}
.nw-card-title {
    font-size: 0.775rem; color: var(--secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin: 0 0 0.1rem;
}
.nw-card-loc {
    font-size: 0.75rem; color: var(--secondary);
    display: flex; align-items: center; gap: 0.2rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Follow button ────────────────────────────── */
.nw-follow-btn {
    flex-shrink: 0;
    padding: 0.35rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8rem; font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    display: inline-flex; align-items: center; gap: 0.3rem;
    transition: background .15s, color .15s, border-color .15s, opacity .15s;
    white-space: nowrap;
}
.nw-follow-btn:hover {
    background: var(--primary);
    color: #fff;
}
.nw-follow-btn.following {
    background: var(--success, #10b981);
    border-color: var(--success, #10b981);
    color: #fff;
}
.nw-follow-btn.following:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}
.nw-follow-btn:disabled { opacity: .55; pointer-events: none; }

/* ── Empty state ──────────────────────────────── */
.nw-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 4rem 1rem;
    color: var(--secondary);
}
.nw-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* ── No search results ────────────────────────── */
.nw-no-results {
    display: none;
    grid-column: 1/-1;
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--secondary);
    font-size: 0.9rem;
}

/* ── Pagination ───────────────────────────────── */
.nw-pager {
    display: flex; justify-content: center;
    align-items: center; gap: 0.35rem;
    margin-top: 2.25rem; flex-wrap: wrap;
}
.nw-pgbtn {
    min-width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--dark);
    font-size: 0.875rem; font-weight: 600;
    text-decoration: none;
    transition: all .15s;
    padding: 0 0.5rem;
}
.nw-pgbtn:hover:not(.disabled):not(.active) {
    border-color: var(--primary); color: var(--primary); text-decoration: none;
}
.nw-pgbtn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.nw-pgbtn.disabled { opacity: .35; pointer-events: none; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
    .nw-grid { grid-template-columns: 1fr; }
    .nw-hero-body { gap: 0.875rem; }
    .nw-search-wrap { width: 100%; }
    .nw-tabs-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .nw-hero-actions { padding-top: 0.5rem; }
}
@media (max-width: 480px) {
    .nw-cover { height: 100px; }
    .nw-avatar-wrap { margin-top: -34px; }
    .nw-avatar-wrap img, .nw-avatar-ph { width: 68px; height: 68px; font-size: 1.5rem; }
}

/* Former style="" attribute of the card's location icon (CON-12). */
.nw-card-loc .nw-card-loc-icon { font-size: 0.75rem; }
