﻿/* --- BASIS-LAYOUT --- */
.tournament-wrapper-main {
    max-width: 1000px;
    margin: 1rem auto;
    padding: 0 12px;
    font-family: system-ui, -apple-system, sans-serif;
}

.d-none-view {
    display: none !important;
}

/* --- SWITCHER-BAR --- */
.view-switcher-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #eef1f6;
}

.switcher-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
}

.btn-group-switcher {
    display: flex;
    background: #e9ecef;
    padding: 2px;
    border-radius: 4px;
}

.btn-switch {
    background: transparent;
    border: none;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    color: #495057;
}

    .btn-switch.active {
        background: #ffffff;
        color: #212529;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

/* --- ANSICHT 1: LISTENANSICHT --- */
.round-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0 0.5rem 0;
}

    .round-divider h2 {
        font-size: 0.9rem;
        font-weight: 700;
        text-transform: uppercase;
        color: #495057;
        margin: 0 10px 0 0;
    }

    .round-divider::after {
        content: "";
        flex-grow: 1;
        height: 1px;
        background: #e9ecef;
    }

.flex-matches-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-list-card {
    background: #ffffff;
    border: 1px solid #eef1f6;
    border-radius: 6px;
    padding: 8px 12px;
}

.match-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tag-ko {
    color: #6c757d;
}

.tag-playoff {
    color: #CD7F32;
}
.tag-finale {
    color: #fd7e14;
}

.status-badge {
    padding: 1px 6px;
    border-radius: 10px;
    background: #f1f3f5;
    color: #495057;
}

    .status-badge.live {
        background: #e3fafc;
        color: #0b7285;
    }

    .status-badge.done {
        background: #ebfbee;
        color: #2b8a3e;
    }

.match-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* --- ANSICHT 2: COMPACT K.O.-BAUM (OHNE LINIEN) --- */
.bracket-viewport {
    display: flex;
    gap: 16px; /* Enger Spaltenabstand */
    padding: 12px;
    background-color: #ffffff;
    overflow-x: auto;
}

.tournament-round {
    display: flex;
    flex-direction: column;
    width: 200px; /* Schmalere, kompakte Boxen-Breite */
    flex-shrink: 0;
}

.round-header {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #8a94a6;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f1f3f5;
}

.round-matches {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex-grow: 1;
    gap: 8px;
}

.match-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 4px 0;
}

/* GEMEINSAME ZEILEN-STYLINGS (Für beide Ansichten) */
.match-card-ko {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    width: 100%;
    overflow: hidden;
}

.match-row-ko {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px; /* Sehr flaches Padding */
    height: 32px; /* Reduzierte Zeilenhöhe */
    box-sizing: border-box;
    background-color: #ffffff;
}

    .match-row-ko:first-child {
        border-bottom: 1px solid #edf2f7;
    }

.team-name-ko {
    color: #4a5568;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-score-ko {
    font-weight: 700;
    font-size: 0.85rem;
    color: #2d3748;
    background: #edf2f7;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

/* ZUSTÄNDE (Gewinner / Verlierer) */
.competitor-row.is-winner, .match-row-ko.is-winner {
    background-color: #f8fafc;
}

.is-winner .team-name-ko, .is-winner .competitor-name {
    font-weight: 600;
    color: #1a202c;
}

.is-winner .team-score-ko {
    background-color: #2d3748;
    color: #ffffff;
}

.is-loser {
    opacity: 0.4;
}

    .is-loser .team-name-ko, .is-loser .competitor-name {
        /*text-decoration: line-through;*/
    }
/* Zusätzliche Meta-Informationen für die Listen-Kopfzeile */
.match-meta-text {
    font-size: 0.7rem;
    color: #718096;
    font-weight: 500;
}

/* Die neue kompakte Info-Leiste direkt über den Spielern im Baum */
.match-ko-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 600;
    color: #a0aec0;
    padding: 3px 10px;
    background: #fafafa;
    border-bottom: 1px solid #edf2f7;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Farbliche Anpassung für das Platz 3 Meta-Feld im Baum */
.meta-playoff-bg {
    background: #fffbf7;
}

    .meta-playoff-bg span:first-child {
        color: #CD7F32; /* Setzt das Wort PLATZ 3 in Bronze ab */
    }

/* Farbliche Anpassung für das Finale Meta-Feld im Baum */
.meta-finale-bg {
    background: #fffbf7;
    
}

    .meta-finale-bg span:first-child {
        color: #fd7e14; /* Setzt das Wort PLATZ 3 in Orange ab */
    }
/* Erweitert die Umschaltleiste zu einer flexiblen Reihe */
.view-switcher-bar {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Verteilt Suche nach links, Buttons nach rechts */
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #eef1f6;
}

/* Suchleiste Styling */
.search-container-box {
    flex-grow: 1;
    max-width: 300px; /* Begrenzt die Breite auf großen Bildschirmen */
}

    .search-container-box input {
        width: 100%;
        padding: 5px 10px;
        font-size: 0.85rem;
        border: 1px solid #cbd5e0;
        border-radius: 4px;
        outline: none;
        box-sizing: border-box;
        transition: border-color 0.15s ease;
    }

        .search-container-box input:focus {
            border-color: #4a5568;
        }

/* Responsive Anpassung für sehr kleine Smartphones */
@media (max-width: 480px) {
    .view-switcher-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container-box {
        max-width: 100%;
    }
}
/* Effekt 1: Das gesuchte Match leuchtet weich auf */
.match-highlighted {
    border-color: #ffd43b !important; /* Kräftiges Gelb für den Rahmen */
    box-shadow: 0 0 10px rgba(253, 216, 53, 0.4) !important; /* Sanfter Leuchteffekt */
    background-color: #fffdf5 !important; /* Minimal gelblicher Kartenhintergrund */
    transform: scale(1.02); /* Lässt die Karte minimal hervortreten */
    transition: all 0.2s ease;
}

/* Effekt 2: Nicht passende Matches treten dezent in den Hintergrund */
.match-dimmed {
    opacity: 0.3; /* Macht nicht gesuchte Teams transparent, löscht aber das Layout nicht */
    transition: opacity 0.2s ease;
}

/* Pokale bei Sieger */
.tournament-bracket__medal {
    display: inline-flex;
    align-items: center;
}
/* Genereller Pokal-Stift für alle qualifizierten Plätze */
.medal-finale .tournament-bracket__medal::after,
.medal-playoff .tournament-bracket__medal::after {
    font-family: "Bootstrap-icons";
    content: "\F5E6"; /* Bootstrap-Icon Code für bi-trophy */
    font-style: normal;
    font-weight: bold;
    padding-left: 8px; /* Abstand nach links zum Text */
    font-size: 0.85rem;
}

/* --- IHR FARBSCHEMA FÜR DIE PLÄTZE --- */

/* 1. Platz: Gold (Gewinner im Finale) */
.medal-finale .is-winner .tournament-bracket__medal::after {
    color: #FFD700;
}

/* 2. Platz: Silber (Verlierer im Finale) */
.medal-finale .is-loser .tournament-bracket__medal::after {
    color: #C0C0C0;
}

/* 3. Platz: Bronze (Gewinner im Spiel um Platz 3) */
.medal-playoff .is-winner .tournament-bracket__medal::after {
    color: #CD7F32;
}

/* 4. Platz: Komplett ausblenden (Verlierer im Spiel um Platz 3) */
.medal-playoff .is-loser .tournament-bracket__medal::after {
    content: none !important; /* Entfernt den Pokal für den 4. Platz */
}