/*
 * Public bracket styles for Battle of Brackets.
 */

.ssbb-bracket {
    --ssbb-maroon: var(--e-global-color-secondary);
    --ssbb-gold: var(--e-global-color-accent);
    --ssbb-teal: var(--e-global-color-primary);
    --ssbb-cream: #f5f2eb;
    --ssbb-gray: #777777;
    --ssbb-line: #c8c4bc;
    --ssbb-text: var(--e-global-color-primary);

    box-sizing: border-box;
    /* max-width: 1200px; */
    margin: 0 auto;
    /* padding: 20px; */
    /* font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif; */
    color: var(--ssbb-text);
    background: var(--ssbb-cream);
    border-radius: 8px;
}

.ssbb-bracket *,
.ssbb-bracket *::before,
.ssbb-bracket *::after {
    box-sizing: border-box;
}

/* Header */
.ssbb-header {
    text-align: center;
    margin-bottom: 16px;
}

.ssbb-header-title {
    font-family: 'PT Serif', Sans-serif;
    display: inline-block;
    width: 100%;
    padding: 10px 16px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--ssbb-maroon);
    border-radius: 6px;
}

/* Round labels */
.ssbb-round-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.ssbb-round-labels-group {
    display: flex;
    flex: 1 1 0;
}

.ssbb-round-labels-group.ssbb-labels-left {
    flex-direction: row;
}

.ssbb-round-labels-group.ssbb-labels-right {
    flex-direction: row-reverse;
}

.ssbb-round-label {
    flex: 1;
    text-align: center;
    padding: 0 12px;
}

.ssbb-round-label-number {
    display: block;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--e-global-color-primary);
}

.ssbb-round-label-name {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--ssbb-gold);
    line-height: 1.3;
    margin-top: 2px;
    max-width: 130px;
    margin-left: auto;
    margin-right: auto;
}

.ssbb-final-label {
    flex: 0 0 160px;
    text-align: center;
    padding: 0 16px;
}

.ssbb-final-label .ssbb-round-label-number {
    color: var(--ssbb-gold);
}

.ssbb-final-name {
    color: var(--ssbb-maroon);
}
.ssbb-round-logo {
    display: block;
    margin-bottom: 8px;
}
.ssbb-round-logo img {
    max-width: 100px;
}

/* Body layout */
.ssbb-body {
    display: flex;
    align-items: stretch;
    min-height: 520px;
}

.ssbb-side {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
}

.ssbb-side-left {
    flex-direction: row;
}

.ssbb-side-right {
    flex-direction: row-reverse;
}

.ssbb-center {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    position: relative;
}

/* Round column */
.ssbb-round {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 12px;
    position: relative;
}

.ssbb-round-meta {
    display: none;
    text-align: center;
    margin-bottom: 12px;
}

.ssbb-round-number {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ssbb-maroon);
}

.ssbb-round-name {
    display: block;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--ssbb-gold);
    line-height: 1.3;
    margin-top: 2px;
}

.ssbb-matches {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

/* Match pair and match */
.ssbb-match-pair {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    position: relative;
    padding: 1px 0;
}

.ssbb-match {
    position: relative;
    width: 100%;
    margin: 10px 0;
}

.ssbb-team {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    padding: 3px 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ssbb-text);
    background: #ffffff;
    border-left: 3px solid transparent;
    line-height: 1.4;
}

.ssbb-team.ssbb-winner {
    color: var(--ssbb-gold);
    border-left-color: var(--ssbb-gold);
}

.ssbb-team small {
    flex: 0 0 auto;
    font-size: 10px;
}

.ssbb-team.ssbb-highlight {
    background: #fff8dc;
    color: var(--ssbb-maroon);
    border-left-color: var(--ssbb-maroon);
}

/* Connector lines */
.ssbb-match-pair::after {
    content: '';
    position: absolute;
    top: calc(25% + 3px);
    width: 2px;
    height: calc(50% - 4px);
    background: var(--ssbb-line);
}

.ssbb-side-left .ssbb-match-pair::after {
    right: -12px;
}

.ssbb-side-right .ssbb-match-pair::after {
    left: -12px;
}

.ssbb-match::before {
    content: '';
    position: absolute;
    top: 50%;
    height: 2px;
    width: 12px;
    background: var(--ssbb-line);
}

.ssbb-side-left .ssbb-round:not(:first-child) .ssbb-match::before {
    left: -12px;
}

.ssbb-side-right .ssbb-round:not(:first-child) .ssbb-match::before {
    right: -12px;
}

.ssbb-match::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 2px;
    width: 12px;
    background: var(--ssbb-line);
}

.ssbb-side-left .ssbb-match::after {
    right: -12px;
}

.ssbb-side-right .ssbb-match::after {
    left: -12px;
}

/* Hide outer lines on body edges */
.ssbb-side-left .ssbb-round:first-child .ssbb-match::before,
.ssbb-side-right .ssbb-round:first-child .ssbb-match::before {
    display: none;
}

/* Final and champion */
.ssbb-final {
    width: 100%;
    /* margin-bottom: 24px; */
    position: relative;
}

.ssbb-final .ssbb-match::before,
.ssbb-final .ssbb-match::after {
    display: none;
}
/* .ssbb-final .ssbb-match::before,
.ssbb-final .ssbb-match::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 2px;
    width: 16px;
    background: var(--ssbb-line);
}

.ssbb-final .ssbb-match::before {
    left: -16px;
}

.ssbb-final .ssbb-match::after {
    right: -16px;
} */

.ssbb-champion {
    text-align: center;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    position: absolute;
    top: 10%;
}

.ssbb-champion-label {
    display: block;
    padding: 5px 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--ssbb-maroon);
}

.ssbb-champion-name {
    display: block;
    padding: 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--ssbb-teal);
}
.ssbb-round.round-2 .ssbb-match-pair {
    height: 50%;
}
.ssbb-round.round-3 .ssbb-match-pair {
    height: 100%;
}
.ssbb-round.round-4 .ssbb-match-pair::after {
    display: none;
}
/* Responsive */
@media (max-width: 1024px) {
    .ssbb-bracket {
        padding: 0;
    }
    .ssbb-body-wrap {
        overflow-x: auto;
    }
    .ssbb-body-wrap-inner {
        min-width: 1000px;
    }
    .ssbb-round-label-number {
        font-size: 16px;
    }
    .ssbb-round-label-name {
        font-size: 12px;
    }
    .ssbb-team {
        padding-top: 1px;
        padding-bottom: 1px;
    }
    /* .ssbb-body {
        flex-direction: column;
        min-height: auto;
    }

    .ssbb-side {
        width: 100%;
        margin-bottom: 24px;
    }

    .ssbb-side-left,
    .ssbb-side-right {
        flex-direction: row;
    }

    .ssbb-center {
        flex: 0 0 auto;
        width: 100%;
        margin-bottom: 24px;
        flex-direction: row;
        justify-content: center;
        gap: 24px;
    }

    .ssbb-final {
        width: 140px;
        margin-bottom: 0;
    }

    .ssbb-champion {
        width: 140px;
    }

    .ssbb-round-labels {
        display: none;
    }

    .ssbb-round-meta {
        display: block;
    } */
}
/* 
@media (max-width: 640px) {
    .ssbb-team {
        font-size: 10px;
        padding: 2px 4px;
    }

    .ssbb-round {
        padding: 0 4px;
    }

    .ssbb-match-pair::after,
    .ssbb-match::before,
    .ssbb-match::after {
        width: 6px;
    }

    .ssbb-side-left .ssbb-match-pair::after {
        right: -6px;
    }

    .ssbb-side-right .ssbb-match-pair::after {
        left: -6px;
    }

    .ssbb-side-left .ssbb-round:not(:first-child) .ssbb-match::before,
    .ssbb-side-left .ssbb-match::after {
        right: -6px;
    }

    .ssbb-side-right .ssbb-round:not(:first-child) .ssbb-match::before,
    .ssbb-side-right .ssbb-match::after {
        left: -6px;
    }

    .ssbb-center {
        flex-direction: column;
        gap: 12px;
    }
} */
