/*
 * Groundseite in der Sprache von Spieldetailseite, „Alle Spiele", „Sportarten",
 * Startseite und Karte: dieselben Farben, dieselbe Schrift für Zahlen und Namen.
 * Das Eigene der Seite ist die Besuchskarte oben — wen und was ich dort gesehen
 * habe, unter welchen Namen, und wie oft ich dort war. Mobil zuerst. Die Versprechen
 * stehen in specs/ground.md.
 */

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

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

.ground-page a {
    color: var(--gp-grass);
}

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

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

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

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

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

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

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

/* Vorgänger- und Nachfolgerbau: ein Satz, kein Alarmkasten. */
.ground-lineage {
    margin: 0 0 12px;
    padding-left: 12px;
    border-left: 3px solid var(--gp-grass);
    color: var(--gp-muted);
}

.ground-lineage a {
    font-weight: 600;
}

/*
 * Die Besuchskarte, gebaut wie die Eintrittskarte der Spieldetailseite: links
 * wen und was ich dort gesehen habe, rechts hinter der Perforation der Abriss mit den
 * Besuchen. Auf dem Telefon sitzt der Abriss unten.
 */
.ground-pass {
    --gp-notch: 18px;

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

.ground-pass__main {
    padding: 18px 20px 16px;
}

.ground-pass__sports {
    display: block;
    color: var(--gp-muted);
    font-size: 14px;
}

/* Der Ground zuerst und am größten, wie auf der Eintrittskarte des Spiels. */
.ground-pass__place {
    margin-top: 6px;
}

.ground-pass__ground {
    display: block;
    font-family: var(--gp-numeral);
    font-weight: 700;
    font-size: 28px;
    line-height: 1.1;
    color: var(--gp-night);
}

.ground-pass__where {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 14px;
    margin-top: 4px;
    font-family: var(--gp-numeral);
    font-weight: 600;
    font-size: 19px;
    line-height: 1.2;
    color: var(--gp-muted);
}

.ground-pass__country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Was ich hier gesehen habe: die Heimteams, das häufigste zuerst, und die
   Wettbewerbe — abgesetzt vom Ort darüber. */
.ground-pass__seen {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(37, 48, 50, .12);
}

.ground-pass__seen > :first-child {
    margin-top: 0;
}

.ground-pass__teams {
    margin: 0;
    font-family: var(--gp-numeral);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
    color: var(--gp-ink);
}

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

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

/* Mehrere Sportarten: jede vor ihrer Zeile, wie eine Beschriftung. */
.ground-pass__sport {
    display: block;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--gp-muted);
}

.ground-pass__teams + .ground-pass__leagues,
.ground-pass__leagues + .ground-pass__leagues {
    margin-top: 8px;
}

/* Frühere Namen: die Geschichte des Grounds, und der Schlüssel zu den Kacheln
   darunter, die beim Besuch den damaligen Namen tragen. */
.ground-pass__names {
    margin: 8px 0 0;
    font-size: 15px;
    color: var(--gp-muted);
}

.ground-pass__name {
    font-family: var(--gp-numeral);
    font-weight: 700;
    font-size: 18px;
    color: var(--gp-night);
}

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

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

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

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

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

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

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

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

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

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

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

    .ground-pass__ground {
        font-size: 32px;
    }

    .ground-pass__where {
        font-size: 21px;
    }

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

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

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

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

/* Bericht über den Ort. */
.ground-report .matchreport {
    text-align: left;
}

/* Die Karte im Abschluss: so breit wie ihre Spalte, nicht höher als ein Blick. */
.ground-page #map.ground-map {
    height: 320px;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 14px;
}

/* Ein Jahr unter „Hier war ich dabei": eine Linie wie die Monate auf „Alle Spiele". */
.visit-years {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px 12px;
}

.visit-years__year {
    min-width: 0;
}

.visit-years .ticket-list {
    margin: 0;
}

/* Allein im Jahr füllt die Kachel ihre halbe Spalte ganz. */
.visit-years__year:not(.visit-years__year--wide) .ticket-list {
    grid-template-columns: 1fr;
}

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

    .visit-years__year--wide {
        grid-column: 1 / -1;
    }
}

.visit-year {
    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(--gp-numeral);
    font-weight: 700;
    font-size: 20px;
    color: var(--gp-night);
    font-variant-numeric: tabular-nums;
}

.visit-year__count {
    font-weight: 600;
    font-size: 15px;
    color: var(--gp-muted);
}

/*
 * Abschluss: Statistik und Lage, ab lg nebeneinander. Bricht eine Zeile der
 * Statistik um, wandert der Anteil als Ganzes in die nächste Zeile und steht
 * bündig unter dem Text, nicht unter dem Icon — wie auf der Spieldetailseite.
 */
.ground-closing {
    display: grid;
    gap: 24px;
}

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

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

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

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

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

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