/*
 * „Alle Spiele" in der Sprache der Spieldetailseite (match.css): dieselben
 * Farben, dieselbe Schrift für Zahlen und Namen. Die Kachel selbst steht in
 * match-ticket.css. Die Versprechen stehen in specs/all-matches.md.
 */

/* Vorspann: der Kasten aus intro-text.md, in der ruhigen Form der Detailseite. */

.all-matches .collection-intro {
    margin: 4px 0 22px;
    background: transparent;
    border: 0;
}

.all-matches .collection-intro .card-header {
    padding: 0;
    background: transparent;
    border: 0;
    font-family: var(--gh-numeral);
    font-weight: 700;
    font-size: 22px;
    color: var(--gh-night);
}

.all-matches .collection-intro .card-body {
    padding: 4px 0 0;
    font-style: normal;
    font-size: 16px;
    line-height: 1.55;
    color: var(--gh-ink);
}

.collection-numbers {
    display: block;
    margin-top: 6px;
    font-family: var(--gh-numeral);
    font-weight: 600;
    font-size: 17px;
    color: var(--gh-muted);
    font-variant-numeric: tabular-nums;
}

/*
 * Das Diagramm: eine Säule je Jahr, die Höhe ist die Spielzahl im Verhältnis zum
 * stärksten Jahr (`--share` setzt die Vorlage). Die ganze Spaltenhöhe ist der
 * Link, nicht nur die Füllung — auf dem Telefon ist eine Säule schmal genug.
 */
.year-chart {
    margin: 0 0 26px;
    padding: 16px 14px 8px;
    background: var(--gh-paper);
    border-radius: 8px;
}

.year-chart__years {
    display: flex;
    align-items: stretch;
    gap: 2px;
    height: 150px;
    margin: 0;
    padding: 0 0 22px;
    list-style: none;
}

.year-chart__year {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
}

.year-chart__bar {
    display: flex;
    align-items: flex-end;
    height: 100%;
    border-radius: 2px 2px 0 0;
}

.year-chart__fill {
    display: block;
    width: 100%;
    height: max(var(--share), 4px);
    background: rgba(46, 125, 50, .45);
    border-radius: 2px 2px 0 0;
}

a.year-chart__bar:hover .year-chart__fill,
a.year-chart__bar:focus-visible .year-chart__fill {
    background: var(--gh-grass);
}

a.year-chart__bar:focus-visible {
    outline: 2px solid var(--gh-night);
    outline-offset: 1px;
}

/* Ein leeres Jahr ist eine Lücke auf der Grundlinie, keine niedrige Säule. */
.year-chart__bar--empty {
    border-bottom: 1px dotted var(--gh-muted);
    height: 100%;
}

.year-chart__year--shown .year-chart__fill {
    background: var(--gh-night);
}

.year-chart__label {
    position: absolute;
    left: 50%;
    bottom: -20px;
    transform: translateX(-50%);
    font-family: var(--gh-numeral);
    font-weight: 600;
    font-size: 13px;
    color: var(--gh-muted);
    white-space: nowrap;
    pointer-events: none;
}

.year-chart__year:first-child .year-chart__label {
    left: 0;
    transform: none;
}

.year-chart__year:last-child .year-chart__label {
    left: auto;
    right: 0;
    transform: none;
}

/* Das gezeigte Jahr */

.year-heading {
    margin: 0 0 4px;
    font-family: var(--gh-numeral);
    font-weight: 700;
    font-size: 34px;
    line-height: 1.1;
    color: var(--gh-night);
    font-variant-numeric: tabular-nums;
    scroll-margin-top: 90px;
}

.year-heading__count {
    font-weight: 600;
    font-size: 19px;
    color: var(--gh-muted);
}

.year-section {
    margin-bottom: 30px;
    scroll-margin-top: 90px;
}

.month-rule {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 10px;
    font-family: var(--gh-numeral);
    font-weight: 600;
    font-size: 17px;
    color: var(--gh-muted);
}

.month-rule::after {
    content: "";
    flex: 1;
    border-top: 1px solid rgba(37, 48, 50, .18);
}

.year-pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
    font-family: var(--gh-numeral);
    font-weight: 600;
    font-size: 17px;
}

.year-pager--bottom {
    margin: 4px 0 18px;
}

.year-pager a,
.all-matches .year-all {
    color: var(--gh-grass);
    text-decoration: none;
}

.year-pager a:hover,
.all-matches .year-all:hover {
    color: var(--gh-grass);
    text-decoration: underline;
}

.year-pager a:focus-visible,
.all-matches .year-all:focus-visible {
    outline: 2px solid var(--gh-night);
    outline-offset: 2px;
}

.all-matches .year-all-row {
    margin: 8px 0 24px;
    text-align: right;
    font-size: 14px;
}

@media (min-width: 768px) {
    .year-chart__years {
        height: 190px;
    }
}
