/**
 * Main schedule basketball row correction.
 * Loaded after home.css.
 *
 * Children:
 * 1 select, 2 time/status, 3 home, 4 score,
 * 5 away, 6 odds.
 */

.bp-match-row.bp-basketball-home-row {
    display: grid !important;
    grid-template-columns:
        0
        72px
        minmax(145px, 1fr)
        104px
        minmax(145px, 1fr)
        235px !important;
    column-gap: 12px !important;
    align-items: center !important;
    min-height: 86px;
    padding: 12px 14px !important;
}

.bp-match-row.bp-basketball-home-row.bp-collector-active {
    grid-template-columns:
        34px
        72px
        minmax(145px, 1fr)
        104px
        minmax(145px, 1fr)
        235px !important;
}

.bp-basketball-home-row > .bp-match-select {
    grid-column: 1;
}

.bp-basketball-home-row > .bp-match-time {
    grid-column: 2;
    min-width: 0;
}

.bp-basketball-home-row > .bp-match-team.home {
    grid-column: 3;
}

.bp-basketball-home-row > .bp-match-score {
    grid-column: 4;
}

.bp-basketball-home-row > .bp-match-team.away {
    grid-column: 5;
}

.bp-basketball-home-row > .bp-match-odds-side {
    grid-column: 6;
}

.bp-basketball-home-row .bp-match-time {
    align-self: center;
}

.bp-basketball-home-row .bp-match-time > span {
    display: block;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
}

.bp-basketball-home-row .bp-match-time > em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 70px;
    min-height: 22px;
    margin-top: 6px;
    padding: 4px 8px;
    overflow: hidden;
    border-radius: 999px;
    font-size: .85rem;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-basketball-home-row .bp-match-time > em.live {
    background: rgba(245, 158, 11, .16);
    color: #fbbf24;
}

.bp-basketball-home-row .bp-match-time > em.finished {
    background: rgba(148, 163, 184, .12);
    color: #cbd5e1;
}

.bp-basketball-home-row .bp-match-time > em.scheduled {
    background: rgba(56, 189, 248, .13);
    color: #7dd3fc;
}

.bp-basketball-home-row .bp-match-team {
    min-width: 0;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
    text-align: left !important;
}

.bp-basketball-home-row .bp-team-logo {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, .045);
}

.bp-basketball-home-row .bp-team-logo img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.bp-basketball-home-row .bp-match-team strong {
    grid-column: 2;
    min-width: 0;
    color: #f8fafc;
    font-size: 1rem;
    line-height: 1.25;
}

.bp-basketball-home-row .bp-match-team small {
    grid-column: 2;
    margin-top: 2px;
    color: #71829b;
    font-size: .75rem;
    font-weight: 800;
}

.bp-basketball-home-row .bp-match-score {
    min-width: 0;
    display: grid !important;
    justify-items: center;
    gap: 5px;
    text-align: center;
}

.bp-basketball-home-row .bp-match-score strong {
    color: #f8fafc;
    font-size: 1.25rem;
    line-height: 1;
    white-space: nowrap;
}

.bp-basketball-home-row .bp-match-score span {
    color: #38bdf8;
    font-size: .85rem;
    font-weight: 900;
    white-space: nowrap;
}

.bp-basketball-home-row .bp-match-odds-side {
    min-width: 0 !important;
    width: 235px;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 6px;
    align-self: stretch;
    padding-left: 14px !important;
    border-top: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, .08) !important;
}

.bp-basketball-home-row .bp-odds-line {
    display: grid !important;
    grid-template-columns: 48px 1fr 1fr;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap !important;
}

.bp-basketball-home-row .bp-odds-title {
    width: auto !important;
    overflow: hidden;
    color: #8292a8;
    font-size: .75rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-basketball-home-row .bp-odds-chip {
    min-width: 0;
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
    padding: 4px 6px;
    border: 1px solid rgba(56, 189, 248, .25);
    border-radius: 6px;
    background: rgba(56, 189, 248, .06);
    color: #8cb4d8;
    font-size: .75rem;
    white-space: nowrap;
}

.bp-basketball-home-row .bp-odds-chip b {
    color: #38bdf8;
    font-size: .75rem;
}

.bp-basketball-home-row .bp-odds-empty {
    display: flex;
    align-items: center;
    min-height: 100%;
    color: #71829b;
    font-size: .85rem;
    white-space: nowrap;
}

/* Central content gets narrower before the viewport itself is small. */
@media (max-width: 1280px) {
    .bp-match-row.bp-basketball-home-row {
        grid-template-columns:
            0
            66px
            minmax(120px, 1fr)
            90px
            minmax(120px, 1fr)
            205px !important;
        column-gap: 9px !important;
    }

    .bp-match-row.bp-basketball-home-row.bp-collector-active {
        grid-template-columns:
            30px
            66px
            minmax(120px, 1fr)
            90px
            minmax(120px, 1fr)
            205px !important;
    }

    .bp-basketball-home-row .bp-match-odds-side {
        width: 205px;
        padding-left: 10px !important;
    }

    .bp-basketball-home-row .bp-odds-line {
        grid-template-columns: 42px 1fr 1fr;
    }
}

@media (max-width: 980px) {
    .bp-match-row.bp-basketball-home-row,
    .bp-match-row.bp-basketball-home-row.bp-collector-active {
        grid-template-columns:
            0
            60px
            minmax(100px, 1fr)
            76px
            minmax(100px, 1fr)
            178px !important;
        column-gap: 7px !important;
    }

    .bp-basketball-home-row .bp-match-odds-side {
        width: 178px;
        padding-left: 8px !important;
    }

    .bp-basketball-home-row .bp-odds-line {
        grid-template-columns: 36px 1fr 1fr;
        gap: 3px;
    }

    .bp-basketball-home-row .bp-odds-title,
    .bp-basketball-home-row .bp-odds-chip {
        font-size: 8px;
    }

    .bp-basketball-home-row .bp-team-logo {
        width: 36px;
        height: 36px;
    }

    .bp-basketball-home-row .bp-team-logo img {
        width: 33px;
        height: 33px;
    }
}

@media (max-width: 720px) {
    .bp-match-row.bp-basketball-home-row,
    .bp-match-row.bp-basketball-home-row.bp-collector-active {
        grid-template-columns:
            54px
            minmax(0, 1fr)
            68px
            minmax(0, 1fr) !important;
        grid-template-rows: auto auto;
        row-gap: 10px !important;
        min-height: 112px;
    }

    .bp-basketball-home-row > .bp-match-select {
        display: none;
    }

    .bp-basketball-home-row > .bp-match-time {
        grid-column: 1;
        grid-row: 1;
    }

    .bp-basketball-home-row > .bp-match-team.home {
        grid-column: 2;
        grid-row: 1;
    }

    .bp-basketball-home-row > .bp-match-score {
        grid-column: 3;
        grid-row: 1;
    }

    .bp-basketball-home-row > .bp-match-team.away {
        grid-column: 4;
        grid-row: 1;
    }

    .bp-basketball-home-row > .bp-match-odds-side {
        grid-column: 1 / -1;
        grid-row: 2;
        width: auto;
        align-self: auto;
        padding: 9px 0 0 !important;
        border-top: 1px solid rgba(255, 255, 255, .08) !important;
        border-left: 0 !important;
    }

    .bp-basketball-home-row .bp-odds-line {
        grid-template-columns: 54px 1fr 1fr;
    }
}
