/* Playoff Bracket Styles */

.playoff-bracket-container {
    padding: 2rem 0;
    overflow-x: auto;
    background-color: #ffffff;
    position: relative;
}

/* Conference Separator - spans all rounds */
.bracket-conference-separator {
    position: absolute;
    left: 2rem;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #667eea 10%, #667eea 90%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.bracket-conference-separator::before {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    border: 2px solid #667eea;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.playoff-bracket {
    display: flex;
    justify-content: space-between;
    min-width: 900px;
    gap: 2rem;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

/* Bracket Round Column */
.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-height: 600px;
}

/* Conference group within round */
.bracket-conference-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1rem 0;
}

.bracket-conference-group:first-of-type {
    padding-bottom: 2rem;
}

.bracket-conference-group:last-of-type {
    padding-top: 2rem;
}

/* Championship round - center vertically */
.bracket-round:last-child {
    justify-content: center;
}

/* Bracket alignment - each round doubles spacing from previous */
/* Each matchup is ~7rem tall (2 games + margins), BYE boxes match this height */
.bracket-round:nth-child(1) .bracket-matchup {
    margin: 0.5rem 0;
}

/* Round 2: Center between 2 Round 1 matchups */
.bracket-round:nth-child(2) .bracket-matchup {
    margin: 4rem 0;
}

.bracket-round:nth-child(2) .bracket-matchup:first-child {
    margin-top: 3.75rem;
}

/* Round 3: Center between 2 Round 2 matchups */
.bracket-round:nth-child(3) .bracket-matchup {
    margin: 8rem 0;
}

.bracket-round:nth-child(3) .bracket-matchup:first-child {
    margin-top: 11.5rem;
}

/* Round 4: Center between 2 Round 3 matchups */
.bracket-round:nth-child(4) .bracket-matchup {
    margin: 16rem 0;
}

.bracket-round:nth-child(4) .bracket-matchup:first-child {
    margin-top: 27rem;
}

/* Round 5: For sports with more rounds */
.bracket-round:nth-child(5) .bracket-matchup {
    margin: 32rem 0;
}

.bracket-round:nth-child(5) .bracket-matchup:first-child {
    margin-top: 58rem;
}

.bracket-round-title {
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #667eea;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

/* Matchup Container */
.bracket-matchup {
    display: flex;
    flex-direction: column;
    position: relative;
}


/* BYE Matchup */
.bracket-matchup.bracket-bye {
    opacity: 0.7;
    /* BYE matchups have one game, so add height to match regular matchup (2 games) */
    min-height: 7rem;  /* Approximate height of 2 game boxes with margins */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bracket-matchup.bracket-bye .bracket-game {
    border-style: dashed;
    background-color: #f8f9fa;
}

/* Matchup Game/Team Box */
.bracket-game {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    transition: all 0.3s ease;
    min-width: 200px;
}

.bracket-game:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transform: translateX(4px);
}

.bracket-game.winner {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
    border-width: 2px;
}

.bracket-game.loser {
    opacity: 0.6;
    background-color: #f8f9fa;
}

/* Team Info */
.bracket-team-seed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #6c757d;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 4px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.bracket-game.winner .bracket-team-seed {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bracket-team-name {
    flex: 1;
    font-weight: 600;
    color: #212529;
    font-size: 0.9rem;
}

.bracket-team-score {
    font-weight: 700;
    color: #212529;
    font-size: 1rem;
    min-width: 30px;
    text-align: right;
}

.bracket-game.winner .bracket-team-score {
    color: #667eea;
    font-size: 1.1rem;
}

/* Series Score */
.bracket-series-score {
    text-align: center;
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0.25rem 0;
    font-weight: 600;
}

/* Connector Lines */
.bracket-connector {
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2px;
    background-color: #dee2e6;
    z-index: -1;
}

.bracket-connector::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 8px;
    height: 8px;
    background-color: #667eea;
    border-radius: 50%;
}

/* Conference Headers */
.bracket-conference {
    margin-bottom: 3rem;
}

.bracket-conference-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #667eea;
}

/* Championship */
.bracket-championship {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.bracket-championship-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bracket-champion {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 2rem 3rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.bracket-champion-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.bracket-champion-team {
    font-size: 2rem;
    font-weight: 700;
}

.bracket-champion-record {
    font-size: 1.25rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* TBD/Placeholder Games */
.bracket-game.tbd {
    border-style: dashed;
    opacity: 0.5;
}

.bracket-game.tbd .bracket-team-name {
    color: #6c757d;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .playoff-bracket {
        min-width: 700px;
        gap: 1.5rem;
        padding: 1rem;
    }

    .bracket-round-title {
        font-size: 0.875rem;
    }

    .bracket-game {
        padding: 0.5rem 0.75rem;
        min-width: 150px;
    }

    .bracket-team-name {
        font-size: 0.8rem;
    }

    .bracket-team-score {
        font-size: 0.9rem;
    }

    .bracket-championship-title {
        font-size: 1.25rem;
    }

    .bracket-champion-team {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .playoff-bracket {
        min-width: 600px;
        gap: 1rem;
    }

    .bracket-game {
        min-width: 120px;
        font-size: 0.75rem;
    }

    .bracket-team-seed {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
        margin-right: 0.5rem;
    }
}

/* Alert for incomplete data */
.bracket-alert {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.bracket-alert-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.bracket-alert-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
}

.bracket-alert-text {
    color: #6c757d;
    font-size: 1rem;
}
