@charset "UTF-8";

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');

html {
    scroll-behavior: smooth;
}

/* general */
body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: rgba(54, 56, 61, 0.05);
    font-size: 16px;
    margin: 0;
}

.bracket-container {
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.bracket-container a {
    text-decoration: none;
    color: #00205c;
}

.bracket-container a:hover {
    color: #1b7ea6;
}

.rounds {
    display: flex;
}

.round {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.5em;
}

.round-name {
    font-weight: bold;
    padding: 10px;
    display: flex;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9em;
}

.matchups,
.pod {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
    width: 100%;
    gap: 2em;
}

.pod-wrapper {
    display: flex;
    height: 100%;
}

.post-bracket {
    height: 50%;
    min-width: 8px;
    align-self: center;
    border: 2px solid rgb(205, 205, 205);
    border-left: unset;
    border-radius: 0 6px 6px 0;
}

.preBracket {
    min-width: 8px;
    height: 2px;
    align-self: center;
    background-color: rgb(205, 205, 205);
}

.round:first-child .preBracket,
.round:last-child .post-bracket {
    display: none;
}

.matchupWrap {
    display: flex;
}

.matchup {
    padding: 10px;
    background-color: white;
    width: 100%;
    border: 1px solid rgba(54, 56, 61, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.matchup .contest-info,
.matchup .contest-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
}

.matchup .matchup-status,
.matchup .contest-link {
    justify-self: flex-end;
}

.matchup-number {
    color: #a0a0a0;
}

.matchup-status {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.matchup .team {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.matchup .team.winner {
    font-weight: bold;
}

.contest-team {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.contest-logo {
    width: 20px;
    height: 20px;
}

.contest-seed {
    width: 15px;
    text-align: center;
    font-size: 0.9em;
    color: rgb(101, 102, 103);
}

.contest-score {
    margin-left: auto;
    width: 25px;
    text-align: center;
}

.bracket-notes {
    width: 100%;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-sizing: border-box;
    border: 1px solid rgba(54, 56, 61, 0.15);
}

.notes-container {
    display: flex;
    justify-content: space-between;
}

.notes-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notes-logo img {
    width: 150px;
}

.note-head {
    font-weight: bold;
}

.download {
    border-radius: 8px;
    padding: 7px;
    border: 1px solid grey;
    cursor: pointer;
    margin-top: 10px;
    font-size: 0.9em;
    display: block;
}

.bracket-menu {
    display: none;
}

.tickets::before {
    font-family: 'FontAwesome';
    content: '\f145';
    margin-right: 5px;
}

.bracket-header,
.bracket {
    width: 100%;
}

#yearHeader {
    display: none;
}

@media screen and (min-width: 1001px) {
    .play-in-bracket .matchups {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, auto);
        gap: 1em;
    }

    .play-in-bracket .matchups .matchup {
        width: 100%;
    }

    .play-in-bracket .round {
        padding: 1em;
        border-radius: 8px;
    }
}

.bracket.play-in-bracket.top {
    order: -1;
}

/* Ensure the header, main bracket, and play-in bracket have explicit order values */
.bracket-container>.bracket-header {
    order: 1;
}

.bracket:not(.play-in-bracket) {
    order: 3;
}

/* Default: play-in bracket appears after the main bracket */
.bracket.play-in-bracket {
    order: 4;
}

/* When condition is met, move the play-in bracket to just after the header */
.bracket.play-in-bracket.top {
    order: 2;
}


/* Responsive adjustments */
@media screen and (max-width: 1000px) {
    .bracket-menu {
        display: flex;
        justify-content: center;
        padding: 10px;
    }

    .bracket-menu select {
        font-family: 'Inter', Arial, sans-serif;
        font-size: 16px;
        border-radius: 8px;
        border: none;
        padding: 2px;
        color: #00205c;
    }

    .rounds {
        flex-direction: column;
        gap: 2em;
    }

    .play-in-bracket .rounds {
        flex-direction: column;
    }

    .post-bracket,
    .preBracket {
        display: none;
    }

    .matchups,
    .pod {
        gap: 1em;
    }

    .bracket.play-in-bracket {
        order: 4;
    }
}