/*
 * Bisons Display 1.2.0 – schlankes Stylesheet.
 * Erbt bewusst Schrift/Farben vom Theme und setzt nur Struktur:
 * responsive Tabellen (horizontales Scrollen auf Mobil), dezente Linien;
 * ab 1.2.0 zusaetzlich das Sponsoren-Grid ([bisons_sponsoren]).
 */

.bisons-display {
    margin: 0 0 1.5em;
}

/* Kontaktformular ([bisons_kontakt], v1.13) – dezente Struktur, Farben vom Theme */
.bisons-contact-form .bisons-contact-field {
    margin: 0 0 0.9em;
}

.bisons-contact-form label {
    display: block;
    font-weight: 600;
}

.bisons-contact-form input[type="text"],
.bisons-contact-form input[type="email"],
.bisons-contact-form textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.25em;
    padding: 0.55em 0.7em;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    font: inherit;
}

/* Pflichtfeld-Sternchen und Legende */
.bisons-req {
    color: var(--bs-red, #b00020);
    margin-left: 0.15em;
    font-weight: 700;
}

.bisons-contact-legend {
    margin: 0 0 0.9em;
    font-size: 0.85em;
    opacity: 0.8;
}

/* Inline-Fehler unter einem ungültigen Feld */
.bisons-field-error {
    display: none;
    margin-top: 0.25em;
    color: var(--bs-red, #b00020);
    font-size: 0.85em;
    font-weight: 600;
}

.bisons-contact-field.has-error .bisons-field-error {
    display: block;
}

.bisons-contact-field.has-error input,
.bisons-contact-field.has-error textarea {
    border-color: var(--bs-red, #b00020);
}

/*
 * Absenden-Button: übernimmt den Stil des aktiven Themes über die Klasse
 * .bs-btn. Der folgende Fallback steht in :where() (Spezifität 0), damit JEDE
 * Theme-Button-Regel ihn übersteuert – er greift also nur, wenn das Theme den
 * Button nicht selbst gestaltet.
 */
:where(.bisons-contact-submit) {
    display: inline-block;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.65em 1.5em;
    border: 0;
    border-radius: 6px;
    background: var(--bs-red, var(--bs-navy, #10233f));
    color: #fff;
}

:where(.bisons-contact-submit:hover) {
    filter: brightness(1.08);
}

.bisons-contact-submit[disabled] {
    opacity: 0.6;
    cursor: default;
}

.bisons-contact-status {
    margin: 0 0 0.6em;
    font-weight: 600;
}

.bisons-contact-status.ok {
    color: #1a7f37;
}

.bisons-contact-status.err {
    color: #b00020;
}

.bisons-contact-status:empty {
    display: none;
}

/* Wrapper: auf schmalen Screens horizontal scrollen statt umbrechen */
.bisons-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 1.25em;
}

.bisons-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 0.95em;
    line-height: 1.4;
}

.bisons-table-standings {
    min-width: 620px;
}

.bisons-table th,
.bisons-table td {
    padding: 0.45em 0.6em;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.bisons-table thead th {
    border-bottom-width: 2px;
    font-weight: 700;
}

.bisons-table td.bisons-name {
    white-space: normal;
    min-width: 10em;
}

/* Zahlenspalten zentriert */
.bisons-table th.bisons-num,
.bisons-table td.bisons-num {
    text-align: center;
}

.bisons-table td.bisons-points {
    font-weight: 700;
}

/* Eigene Mannschaft in der Tabelle hervorheben */
.bisons-table tr.bisons-row-own td {
    font-weight: 600;
    background: rgba(0, 0, 0, 0.05);
}

/* Vereinslogo-Kopf im Kader (v1.8) */
.bisons-team-header {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin: 0 0 0.75em;
}

.bisons-team-logo {
    height: 56px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.bisons-team-name {
    font-size: 1.25em;
    font-weight: 700;
}

/* Zwischenueberschriften (Goalies / Verteidigung / Sturm / Staff) */
.bisons-subheading {
    margin: 1.25em 0 0.4em;
}

/* Statusanzeigen im Spielplan */
.bisons-status-live {
    color: #b00020;
    font-weight: 700;
}

.bisons-status-cancelled {
    opacity: 0.7;
    text-decoration: line-through;
}

/* Dezenter Hinweis bei fehlenden Daten */
.bisons-hint {
    font-style: italic;
    opacity: 0.75;
}

/* --------------------------------------------------------------------
 * Sponsoren ([bisons_sponsoren], 1.2.0)
 * ------------------------------------------------------------------ */

.bisons-sponsor-level {
    margin: 1.5em 0 0.5em;
}

/* Responsives Karten-Grid: so viele Spalten wie passen, min. 220 px
 * (1.2.0: 160 px). Groessere Kacheln, damit die Logos mehr Platz haben. */
.bisons-sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25em;
    margin: 0 0 1.5em;
}

/* Karten: weiss, dezente Linie, Inhalt zentriert; als <a> ohne Unterstrich.
 * Wenig Innenabstand, damit das Logo die Box moeglichst ausfuellt. */
.bisons-sponsor-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 0.75em;
    min-height: 9em;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: none;
}

a.bisons-sponsor-card:hover,
a.bisons-sponsor-card:focus {
    border-color: rgba(0, 0, 0, 0.35);
    text-decoration: none;
}

/* Logo fuellt die Box weitgehend aus (Proportionen bleiben erhalten):
 * volle Breite/Hoehe bis max. 6.5 rem, zentriert. */
.bisons-sponsor-logo {
    display: block;
    width: 100%;
    height: auto;
    max-height: 6.5rem;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

/* Spielplan: Runde/Spielphase (z. B. Playoff) unter dem Gegner (v1.5.0) */
.bisons-stage {
    display: block;
    margin-top: 0.15em;
    font-size: 0.8em;
    font-weight: 600;
    color: #8a1520;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Ohne Logo: Firmenname als Text */
.bisons-sponsor-name {
    font-weight: 600;
    font-size: 1.05em;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

/* Hervorgehobene Level (die hoechsten drei): 1,5-fache Darstellung
 * (v1.4.0). Groessere Kacheln, groessere Logos, groesserer Name. */
.bisons-sponsor-grid--featured {
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.75em;
    margin-bottom: 2em;
}

.bisons-sponsor-grid--featured .bisons-sponsor-card {
    min-height: 13.5em;
    padding: 1em;
    border-radius: 10px;
}

.bisons-sponsor-grid--featured .bisons-sponsor-logo {
    max-height: 9.75rem;
}

.bisons-sponsor-grid--featured .bisons-sponsor-name {
    font-size: 1.55em;
}

/* Auf schmalen Screens die Hervorhebung etwas zuruecknehmen, damit die
 * Kacheln nicht ueberbreit werden. */
@media (max-width: 480px) {
    .bisons-sponsor-grid--featured {
        grid-template-columns: 1fr;
    }
    .bisons-sponsor-grid--featured .bisons-sponsor-card {
        min-height: 11em;
    }
}
