/*
 * Vereinsseite in der Sprache von Spieldetail- und Groundseite: dieselben
 * Farben, dieselbe Schrift für Zahlen und Namen, dieselbe Karte mit Abriss.
 * Das Eigene der Seite ist die Bilanz als Reihe auf der Karte — jedes Spiel ein
 * Feld, das erste links. Mobil zuerst. Die Versprechen stehen in specs/team.md.
 */

.team-page {
    --tp-night: #253032;
    --tp-grass: #2e7d32;
    --tp-paper: #eef2ef;
    --tp-ink: #1e2629;
    --tp-muted: #5c6b66;
    --tp-loss: #b3412e;
    --tp-draw: #8a958f;
    --tp-perforation: rgba(37, 48, 50, .28);
    --tp-numeral: 'Barlow Semi Condensed', 'Open Sans', 'Helvetica Neue', Arial, sans-serif;

    color: var(--tp-ink);
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 48px;
}

.team-page a {
    color: var(--tp-grass);
}

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

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

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

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

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

.intro-header .team-country {
    font-style: normal;
    white-space: nowrap;
}

.intro-header .team-country img {
    vertical-align: -3px;
    padding-bottom: 0;
}

/*
 * Die Vereinskarte: links der Verein und was ich von ihm gesehen habe, rechts
 * hinter der Perforation der Abriss mit den Spielen. Auf dem Telefon sitzt der
 * Abriss unten.
 */
.team-pass {
    --tp-notch: 18px;

    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--tp-paper);
    border-radius: 8px;
    margin: 4px 0 8px;
}

.team-pass__main {
    min-width: 0;
    padding: 18px 20px 16px;
}

.team-pass__club {
    display: flex;
    align-items: center;
    gap: 16px;
}

.team-pass__crest {
    flex: none;
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.team-pass__identity {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.team-pass__kind {
    color: var(--tp-muted);
    font-size: 14px;
}

.team-pass__name {
    font-family: var(--tp-numeral);
    font-weight: 700;
    font-size: 28px;
    line-height: 1.1;
    color: var(--tp-night);
}

.team-pass__country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-family: var(--tp-numeral);
    font-weight: 600;
    font-size: 19px;
    line-height: 1.2;
    color: var(--tp-muted);
}

.team-pass__names {
    margin: 10px 0 0;
    font-size: 15px;
    color: var(--tp-muted);
}

.team-pass__former {
    font-family: var(--tp-numeral);
    font-weight: 700;
    font-size: 18px;
    color: var(--tp-night);
}

.team-pass__period {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Was ich von ihm gesehen habe — abgesetzt vom Verein darüber. */
.team-pass__seen {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(37, 48, 50, .12);
}

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

/* Alle Wettbewerbe, umgebrochen wird zwischen ihnen, nicht in einem Namen. */
.team-pass__league {
    white-space: nowrap;
}

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

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

/*
 * Die Bilanz: erst die Summe, darunter jedes Spiel als Feld in der Reihenfolge,
 * in der ich es gesehen habe. Grün, Grau, Rot wie in einer Tabelle — und der
 * Buchstabe darin, damit es nicht an der Farbe allein hängt.
 */
.team-form {
    margin-top: 12px;
}

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

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

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

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

.team-form__result--s > * {
    background: var(--tp-grass);
}

.team-form__result--u > * {
    background: var(--tp-draw);
}

.team-form__result--n > * {
    background: var(--tp-loss);
}

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

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

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

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

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

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

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

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

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

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

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

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

    .team-pass__crest {
        width: 72px;
        height: 72px;
    }

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

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

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

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

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

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

.team-report .matchreport {
    text-align: left;
}

/* Eine Saison unter „Meine Spiele": eine Linie wie die Jahre der Groundseite. */
.season-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px 12px;
}

.season-groups__season {
    min-width: 0;
}

.season-groups .ticket-list {
    margin: 0;
}

/* Allein in der Saison füllt die Kachel ihre halbe Spalte ganz. */
.season-groups__season:not(.season-groups__season--wide) .ticket-list {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .season-groups {
        grid-template-columns: 1fr 1fr;
    }

    .season-groups__season--wide {
        grid-column: 1 / -1;
    }
}

.season-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(37, 48, 50, .12);
    font-family: var(--tp-numeral);
    font-weight: 700;
    font-size: 20px;
    color: var(--tp-night);
    font-variant-numeric: tabular-nums;
}

.season-heading__count {
    font-weight: 600;
    font-size: 15px;
    color: var(--tp-muted);
}

/*
 * Abschluss: Statistik und Karte, ab lg nebeneinander. Bricht eine Zeile der
 * Statistik um, steht der Anteil bündig unter dem Text, nicht unter dem Icon.
 * Ohne Statistik nimmt die Karte die ganze Breite.
 */
.team-closing {
    display: grid;
    gap: 24px;
}

.team-closing > section {
    border-top: 2px solid var(--tp-night);
    padding-top: 14px;
}

.team-closing .stat-box {
    margin: 0;
}

.team-closing .stat-box > li {
    padding-left: 1.5em;
}

.team-closing .stat-box .stat-icon {
    margin-left: -1.5em;
}

.team-closing .stat-box .stat-suffix {
    display: inline-block;
}

.team-page #team-map.team-map {
    height: 320px;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 14px;
}

@media (min-width: 992px) {
    .team-closing {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .team-closing > .team-location--alone {
        grid-column: 1 / -1;
    }
}
