/* ============================================
   BOULDERCORE — Rangliste, Wall of Fame, Top-Boulder
   Geladen auf /wertung/ und auf Seiten mit [bouldercore].
   Markup: inc/bouldercore.php, Seite: page-wertung.php
   Handy zuerst; Breakpoints 600px / 900px (Projekt-Standard).
   ============================================ */

/* --- Seite /wertung/: Karte breiter, Inhalt scrollt mit der Seite --- */
.page-wertung .legal-card {
    max-width: 960px;
}

.page-wertung .legal-card-content {
    max-height: none;
    overflow: visible;
}

.bc-intro,
.bc-intro p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 24px;
}

.bc-datenschutz {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 24px 0 0;
}

.bc-datenschutz a {
    color: var(--brand-orange-text);
}

/* --- Gemeinsam --- */
.bc {
    font-size: 14px;
    color: var(--text-primary);
}

.bc .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bc-block-titel {
    font-family: var(--font-headline);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin: 0 0 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

.bc-block-sub {
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0;
    color: var(--text-secondary);
}

.bc-leer {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 12px 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin: 0;
}

.bc-hinweis {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 16px 18px;
    background: var(--bg-cream);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--brand-orange);
    border-radius: 10px;
    margin: 0;
}

.bc-fuss {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 16px 0 0;
}

.bc-fuss a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    color: var(--brand-orange-text);
    font-weight: 600;
    text-decoration: none;
}

.bc-fuss a:hover {
    text-decoration: underline;
}

/* Platz-Marke; 1-3 als Medaille (dunkle Schrift auf hellem Grund, WCAG AA) */
.bc-platz {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 14px;
    background: #efefef;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.bc-medaille-1 {
    background: var(--brand-orange);
}

.bc-medaille-2 {
    background: #d6d6d6;
}

.bc-medaille-3 {
    background: #e2b48a;
}

.bc-punkte {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bc-einheit {
    font-weight: 400;
    color: var(--text-secondary);
}

/* --- Rangliste --- */
.bc-rangliste {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

.bc-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.bc-tabelle th {
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    color: var(--text-secondary);
    padding: 6px 6px 6px 0;
    border-bottom: 1px solid var(--border-color);
}

.bc-tabelle td {
    padding: 8px 6px 8px 0;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.bc-tabelle tr:last-child td {
    border-bottom: none;
}

.bc-tabelle .bc-sp-platz {
    width: 44px;
}

.bc-tabelle .bc-sp-name {
    overflow-wrap: anywhere;
}

.bc-tabelle .bc-sp-zahl {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    padding-right: 0;
    padding-left: 8px;
}

.bc-kurz {
    display: none;
}

/* --- Wall of Fame --- */
.bc-wof {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.bc-wof-karte {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
}

.bc-wof-liste {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bc-wof-liste li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
}

.bc-wof-liste li:first-child {
    border-top: none;
}

.bc-wof-name {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
}

.bc-wof-bester {
    display: block;
    font-weight: 400;
    font-size: 12px;
    color: var(--text-secondary);
}

/* --- Top-Boulder --- */
.bc-top {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

/* Kacheln einer Reihe gleich hoch */
.bc-top > li {
    display: flex;
}

.bc-top-eintrag {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bc a.bc-top-eintrag {
    color: var(--text-primary);
    text-decoration: none;
}

.bc a.bc-top-eintrag:hover {
    border-color: var(--brand-orange);
    box-shadow: var(--shadow-card);
    text-decoration: none;
}

.bc-top-nr {
    flex: 0 0 auto;
    min-width: 18px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.bc-top-farbe {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #cccccc;
    border: 2px solid rgba(0, 0, 0, 0.18);
}

.bc-top-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bc-top-titel {
    font-weight: 700;
}

.bc-top-zusatz {
    font-size: 13px;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.bc-top-werte {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Kleine Phones: kurze Spaltenkoepfe (Langfassung bleibt fuer Screenreader) --- */
@media (max-width: 480px) {
    .bc-lang {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .bc-kurz {
        display: inline;
    }

    .bc-tabelle .bc-sp-platz {
        width: 38px;
    }
}

/* --- Ab 600px: zwei Spalten fuer Wall of Fame und Top-Boulder --- */
@media (min-width: 600px) {
    .bc-wof,
    .bc-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --- Ab 900px: Ranglisten zeilenweise zu zweit (Heute | Woche, Monat | Saison, Jahr) --- */
@media (min-width: 900px) {
    .bc-rangliste {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 32px;
    }

    /* Bleibt die letzte Liste allein in ihrer Zeile (Jahr; bei altem Feed die Saison), nimmt sie die volle Breite */
    .bc-rangliste > .bc-block:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}
