/* css/network.css
 *
 * Network (Ben, 2026-10-18): the Add to Network button and the profile's
 * Network card. See includes/network.php and js/network.js.
 */

/* ---- the icon, on a Directory card, beside the envelope ----------------- */

/* The same 28px circle as .md-message (css/members.css), so the two read as a
   pair of things you can do about this person. The colour says the state:
   blue to ask, grey while waiting, gold when they asked you, green once in. */
.net-btn--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #bfc2e0;
    border-radius: 50%;
    background: var(--primary-dim);
    color: var(--primary, #016ea9);
    font-size: 13px;
    cursor: pointer;
}

.net-btn--icon:hover,
.net-btn--icon:focus-visible {
    border-color: var(--primary, #016ea9);
    background: var(--primary, #016ea9);
    color: #fff;
    outline: none;
}

.net-btn--outgoing.net-btn--icon {
    border-color: var(--border, #dbdfea);
    background: #f3f4f7;
    color: var(--text-muted, #8094ae);
}

.net-btn--incoming.net-btn--icon {
    border-color: var(--gold, #c9a84c);
    background: var(--gold-tint, #faf3df);
    color: #8a6a12;
}

.net-btn--connected.net-btn--icon {
    border-color: #9fd3b0;
    background: #e8f6ed;
    color: #17683a;
}

/* A grid card's foot: the envelope and this together at the right. */
.md-card-btns {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.md-card-btns .md-message {
    margin-left: 0;
}

/* ---- the labelled button, on a profile ---------------------------------- */

.net-btn--connected.btn {
    border-color: #9fd3b0;
    color: #17683a;
}

.net-btn--incoming.btn {
    border-color: var(--gold, #c9a84c);
    color: #8a6a12;
}

.net-btn--outgoing.btn {
    color: var(--text-muted, #8094ae);
}

/* The note box in the request dialog, in the page's own type rather than
   SweetAlert's monospace. */
#net-note {
    min-height: 90px;
    font-family: var(--font-sans, inherit);
    font-size: 15px;
    line-height: 1.45;
}

/* ---- the profile's Network card ----------------------------------------- */

.net-card-count {
    display: inline-block;
    min-width: 18px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--primary-dim, #eef1f0);
    color: var(--color-blue, #005e6a);
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    letter-spacing: 0;
}

.net-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 6px 14px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.net-card-person {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 3px 0;
    color: var(--text-dark, #364a63);
    text-decoration: none;
}

.net-card-person .profile-rep-avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
}

.net-card-person .profile-rep-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.net-card-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.net-card-person:hover .net-card-name {
    color: var(--primary, #016ea9);
    text-decoration: underline;
}

.net-card-more,
.net-card-empty {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--text-muted, #8094ae);
}
