/*
 * Trainer- und Schiedsrichterseite in der Sprache der Vereinsseite: dieselbe
 * Karte mit Abriss, dieselbe Ticketliste nach Saison. Das Eigene steht auf der
 * Karte — beim Trainer die Reihe seiner Stationen und die Bilanz seiner
 * Mannschaft, beim Schiedsrichter die Waage aus Heimsiegen, Unentschieden und
 * Auswärtssiegen. Mobil zuerst. Die Versprechen stehen in specs/coach.md und
 * specs/referee.md.
 */

.person-page {
    color: var(--gh-ink);
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 48px;
}

.person-page a {
    color: var(--gh-grass);
}

/* Die Kachel trägt ihre eigenen Farben; das Grün der Links gilt nicht für sie. */
.person-page a.ticket-tile__link {
    color: var(--gh-ink);
}

.person-page a:focus-visible {
    outline: 2px solid var(--gh-night);
    outline-offset: 2px;
    border-radius: 2px;
}

.person-page ol.breadcrumb {
    margin-bottom: 12px;
}

.person-page h2 {
    font-family: var(--gh-numeral);
    font-weight: 600;
    font-size: 24px;
    line-height: 1.2;
    color: var(--gh-night);
    margin: 0 0 14px;
}

.person-section {
    margin-top: 40px;
}

/*
 * Die Karte: links wer und was ich von ihm gesehen habe, rechts hinter der
 * Perforation der Abriss mit den Spielen. Auf dem Telefon sitzt der Abriss unten.
 */
.person-pass {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--gh-paper);
    border-radius: 8px;
    margin: 4px 0 8px;
}

.person-pass__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px 20px 18px;
}

.person-pass__kind {
    font-size: 13px;
    color: var(--gh-muted);
}

.person-pass__name {
    font-family: var(--gh-numeral);
    font-weight: 700;
    font-size: 26px;
    line-height: 1.15;
    color: var(--gh-night);
    overflow-wrap: anywhere;
}

.person-pass__country {
    margin-top: 2px;
    font-family: var(--gh-numeral);
    font-weight: 600;
    font-size: 18px;
    color: var(--gh-muted);
}

.person-pass__country img {
    vertical-align: -2px;
}

.person-pass__seen {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--gh-rule);
}

.person-pass__leagues {
    margin: 0;
    font-family: var(--gh-numeral);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.3;
    color: var(--gh-muted);
}

/* Umgebrochen wird zwischen den Wettbewerben, nicht in einem Namen. */
.person-pass__league {
    white-space: nowrap;
}

.person-pass .person-pass__league a {
    color: inherit;
    text-decoration: none;
}

.person-pass .person-pass__league a:hover {
    color: var(--gh-night);
    text-decoration: underline;
}

/* Die Stationen des Trainers: je Mannschaft ein Feld, wann und wie oft. */
.person-stations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.person-page a.person-station {
    display: flex;
    flex-direction: column;
    padding: 5px 10px 6px;
    background: #fff;
    border-radius: 3px;
    color: var(--gh-ink);
    text-decoration: none;
}

.person-page a.person-station:hover .person-station__team {
    color: var(--gh-grass);
    text-decoration: underline;
}

.person-station__team {
    font-family: var(--gh-numeral);
    font-weight: 700;
    font-size: 17px;
    line-height: 1.2;
}

.person-station__meta {
    font-size: 13px;
    color: var(--gh-muted);
    font-variant-numeric: tabular-nums;
}

.person-station__meta b {
    color: var(--gh-night);
}

/*
 * Die Bilanz seiner Mannschaft: erst die Summe, darunter jedes Spiel als Feld in
 * der Reihenfolge, in der ich es gesehen habe — wie auf der Vereinsseite.
 */
.person-form,
.person-scale {
    margin-top: 12px;
}

.person-form__tally,
.person-scale__tally {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 16px;
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--gh-muted);
}

.person-form__tally b,
.person-scale__tally b {
    font-family: var(--gh-numeral);
    font-weight: 700;
    font-size: 22px;
    color: var(--gh-night);
    font-variant-numeric: tabular-nums;
}

.person-form__strip {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.person-form__result > a,
.person-form__result > span {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    font-family: var(--gh-numeral);
    font-weight: 700;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    color: #fff;
    text-decoration: none;
}

.person-form__result--s > * {
    background: var(--gh-grass);
}

.person-form__result--u > * {
    background: var(--gh-draw);
}

.person-form__result--n > * {
    background: var(--gh-loss);
}

.person-page .person-form__result > a {
    color: #fff;
}

.person-page .person-form__result > a:hover {
    box-shadow: inset 0 0 0 2px var(--gh-night);
}

/*
 * Die Waage des Schiedsrichters: ein Balken, Heimsiege links in Nachtfarbe,
 * Auswärtssiege rechts in Grün, die Unentschieden grau dazwischen. Die Zahlen
 * stehen darüber, damit es nicht an der Farbe allein hängt.
 */
.person-scale__bar {
    display: flex;
    gap: 3px;
    height: 12px;
}

.person-scale__part {
    flex-basis: 0;
    border-radius: 2px;
}

.person-scale__part--home {
    background: var(--gh-night);
}

.person-scale__part--draw {
    background: var(--gh-draw);
}

.person-scale__part--away {
    background: var(--gh-grass);
}

.person-pass__stub {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 20px 18px;
    border-top: 2px dashed var(--gh-perforation);
}

.person-pass__stub::before,
.person-pass__stub::after {
    content: '';
    position: absolute;
    top: calc(var(--gh-notch) / -2 - 1px);
    width: var(--gh-notch);
    height: var(--gh-notch);
    border-radius: 50%;
    background: #fff;
}

.person-pass__stub::before {
    left: calc(var(--gh-notch) / -2);
}

.person-pass__stub::after {
    right: calc(var(--gh-notch) / -2);
}

.person-pass__label {
    font-size: 13px;
    color: var(--gh-muted);
}

.person-pass__value {
    font-family: var(--gh-numeral);
    font-weight: 700;
    font-size: 40px;
    line-height: 1;
    color: var(--gh-night);
    font-variant-numeric: tabular-nums;
}

.person-pass__value--date {
    font-size: 24px;
    line-height: 1.15;
}

.person-pass__years {
    margin-top: 2px;
    font-family: var(--gh-numeral);
    font-weight: 600;
    font-size: 17px;
    color: var(--gh-muted);
    font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
    .person-pass {
        grid-template-columns: 1fr minmax(170px, auto);
    }

    .person-pass__main {
        padding: 22px 28px;
    }

    .person-pass__name {
        font-size: 32px;
    }

    .person-pass__country {
        font-size: 21px;
    }

    .person-pass__stub {
        padding: 22px 28px;
        border-top: 0;
        border-left: 2px dashed var(--gh-perforation);
    }

    .person-pass__stub::before,
    .person-pass__stub::after {
        left: calc(var(--gh-notch) / -2 - 1px);
        right: auto;
    }

    .person-pass__stub::before {
        top: calc(var(--gh-notch) / -2);
    }

    .person-pass__stub::after {
        top: auto;
        bottom: calc(var(--gh-notch) / -2);
    }
}
