/*
 * `/playoff/bracket` -- the twelve-team bracket. The field tables under it are
 * the list view's (resume.css); this sheet is the bracket.
 *
 * White boxes on gold lines, as the CFP's own bracket graphic draws it, in the
 * site's tokens. Colours come from theme.css; this sheet writes no hex value.
 */

.lede { margin-bottom: 18px; }

/* The bracket is as wide as it is; a phone scrolls it in its own box rather
   than the page scrolling sideways. */
.bracket-scroll {
    overflow-x: auto;
    margin: 0 auto 30px;
    padding-bottom: 6px;
}

/* Only where the bracket does not fit: its min-width plus the gutters. */
.bracket-hint { display: none; }

@media (max-width: 1200px) {
    .bracket-hint {
        display: block;
        margin: 0 0 8px;
        text-align: center;
        font-size: 0.85rem;
        color: var(--text-muted);
    }
}

.bracket {
    display: grid;
    /* A box must hold "12.", a logo and a four-digit rating side by side: 118px
       does, 96px cropped the logo. The joins narrow to pay for it, so the
       bracket, padding and border included, still fits a 1200px window. */
    min-width: 1064px;
    grid-template-columns:
        minmax(118px, 1fr) 20px minmax(118px, 1fr) 20px minmax(118px, 1fr) 20px
        minmax(118px, 1fr) minmax(118px, 1fr)
        20px minmax(118px, 1fr) 20px minmax(118px, 1fr) 20px minmax(118px, 1fr);
    grid-template-rows: auto repeat(13, 32px);
    column-gap: 0;
    padding: 18px 16px 22px;
    border-radius: var(--radius-lg);
    background: rgba(10, 36, 99, 0.32);
    border: 1px solid rgba(62, 146, 204, 0.18);
}

.round-label {
    align-self: end;
    margin-bottom: 10px;
    text-align: center;
    font-family: 'Barlow Condensed', var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
}

/* A box: seed, logo, [rank], as the CFP graphic sets them. Inset from its two
   rows so stacked boxes do not touch. */
.slot {
    margin: 4px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 0 8px;
    border: 3px solid var(--gold);
    border-radius: var(--radius-md);
    background: var(--brand-paper);
    color: var(--brand-ink);
    min-width: 0;
}

/* The two finalists' boxes meet in the middle; a gap keeps them apart. */
.slot[style*="grid-column: 7;"] { margin-right: 6px; }
.slot[style*="grid-column: 8;"] { margin-left: 6px; }

.slot-seed,
.slot-rating {
    font-family: 'Barlow Condensed', var(--font-sans);
    font-weight: 700;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}

.slot-rating { color: var(--ink-muted); }

.slot-team {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brand-ink);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Shrinks rather than overflows: `.slot-team` hides what overflows, and a
   fixed-width logo in too narrow a box was cut off at both edges. */
.slot-logo {
    flex: 0 1 40px;
    min-width: 0;
    height: 40px;
    object-fit: contain;
}

.slot-open { background: var(--brand-paper); }

.slot-champion {
    justify-content: center;
    margin: 8px 0;
}

.champion-label {
    font-family: 'Barlow Condensed', var(--font-sans);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* The line joining a game's two boxes, and the stub to the box it feeds: a
   bracket "]" on the left half, "[" on the right. It spans from the middle of
   one box to the middle of the other, so its own middle is the next box's. */
.join { position: relative; }

.join::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    border: 3px solid var(--gold);
}

.join::after {
    content: "";
    position: absolute;
    top: calc(50% - 1.5px);
    width: 50%;
    border-top: 3px solid var(--gold);
}

.join-left::before { left: 0; border-left: 0; border-radius: 0 6px 6px 0; }
.join-left::after { right: 0; }
.join-right::before { right: 0; border-right: 0; border-radius: 6px 0 0 6px; }
.join-right::after { left: 0; }

/* From the final down to the champion. */
.final-link {
    background: linear-gradient(var(--gold), var(--gold)) center / 3px 100% no-repeat;
    margin: -4px 0 -8px;
}

.playoff-heading {
    max-width: 980px;
    margin: 10px auto 6px;
    font-family: 'Barlow Condensed', var(--font-sans);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-strong);
}

/* These tables do not sort. */
.field-table th { cursor: default; }
.field-table th:hover { color: var(--text-muted); }

.field-table .col-bid {
    text-align: left;
    color: var(--text-muted);
}

.field-table .col-bid.bid-auto { color: var(--gold); font-weight: 700; }

@media (max-width: 640px) {
    .field-table .col-bid { white-space: normal; }
}
