/* Styles for the Contact page only; shared styles are in mainstyle.css.
   Sizes are in rem so they follow the desktop window-height scaling. */

.contact-intro {
    margin: 0 0 1.25rem;
    text-align: center;
}

/* One row per network: its logo, name and username, then an arrow out (or
   Copy, for Discord). Two columns once there's room. */
.contact-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--inset);
    border: 1px solid var(--line);
    border-radius: 1.125rem;
    color: var(--text);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s;
}

.contact-link:hover {
    border-color: #555;
}

/* The logo's square inverts on hover, like .icon-link */
.contact-logo {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    background: var(--tab);
    border: 1px solid var(--line);
    border-radius: 0.875rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.contact-logo svg {
    width: 1.375rem;
    height: 1.375rem;
}

.contact-link:hover .contact-logo {
    background: var(--text);
    border-color: var(--text);
    color: var(--inset);
}

.contact-text {
    display: grid;
    min-width: 0;
}

.contact-name {
    font-weight: 600;
}

/* Mono, but in its own case, since usernames can be case-sensitive */
.contact-username {
    text-transform: none;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-action {
    flex: none;
    display: grid;
    place-items: center;
    margin-left: auto;
    padding-right: 0.25rem;
}

.contact-action svg {
    width: 1.125rem;
    height: 1.125rem;
}

.contact-empty {
    margin: 0;
    text-align: center;
}

.contact-copied {
    margin: 0.75rem 0 0;
    text-align: center;
}

.contact-copied:empty {
    display: none;
}
