/* A team's head and players, as www/team.html and www/my-team.html both draw
   them (js/teams/team-view.js writes the links and the rows). The head,
   bands, rows and tally come from css/shared/night.css; each page lays out
   its own grid, since only My Team has the manager's buttons beside it. */

/* The head is the whole page when there is no team; the footer keeps its
   distance. */
.team-none {
    margin-bottom: var(--space-16);
}

/* ── The club's head ──────────────────────────────────────────── */
/* The name sits beside the badge, and drops under it only when a word of
   the name is too long to fit there. */
.club-head__name {
    grid-area: title;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4) var(--space-5);
    min-width: 0;
}

.club-head__name .page-head__title {
    max-width: 100%;
}

/* The badge as it is drawn, not in a round frame. */
.club-head__badge {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    object-fit: contain;
}

/* The club's links, as a player's are on the profile: in the text's colours
   rather than the brands'. */
.club-head__socials {
    grid-area: links;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-4) 0 0;
    padding: 0;
    list-style: none;
}

.club-head__socials .icon-btn {
    color: var(--led-pale-72);
    text-decoration: none;
}

.club-head__socials .icon-btn svg {
    width: var(--text-lg);
    height: var(--text-lg);
}

.club-head__socials .icon-btn:hover {
    color: var(--text-primary);
}

.club-head__tally {
    grid-area: tally;
    margin-top: var(--space-10);
}

.club-head .tally .t-figure {
    color: #fff;
}

/* ── Players ──────────────────────────────────────────────────── */
.player-row {
    flex-wrap: nowrap;
}

.player-row .rows__main {
    flex: 1 1 auto;
}

.player-row .rows__end {
    flex-wrap: nowrap;
}

.player-row__avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-elevated);
}

.player-row__name {
    color: inherit;
}

.player-row__name:hover {
    color: var(--accent-hover);
}

/* ── Invite a player's matches ────────────────────────────────── */
.invite-matches:empty {
    display: none;
}

.invite-matches {
    margin-top: var(--space-4);
}

.invite-match {
    width: 100%;
    padding-inline: 0;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--border);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.invite-match .rows__name,
.invite-match .rows__meta {
    display: block;
}

.invite-match .rows__name {
    font-size: var(--text-base);
}

.invite-match:hover,
.invite-match:focus-visible {
    color: var(--accent-hover);
}

.invite-matches__none {
    padding: var(--space-3) 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* ── Phones ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .club-head__name {
        gap: var(--space-4);
    }
    .club-head__badge {
        width: 48px;
        height: 48px;
    }
    .club-head__tally {
        margin-top: var(--space-8);
    }
    .team-none {
        margin-bottom: var(--space-12);
    }
}
