/* KDB_HOME_LIVE_BRACKET_BRIDGE_V1 */

[data-kdb-home-live-v59]
[data-kdb-home-live-v59-body] {
    display: block;
    width: 100%;
}

[data-kdb-home-live-v59]
[data-kdb-home-live-v59-body][hidden] {
    display: none;
}

/* The phase must never be clipped in the compact first LIVE cell. */
#kdb-live-v18 .kdb-live-v18__status {
    flex-wrap: wrap !important;
    align-content: center !important;
}

#kdb-live-v18 .kdb-live-v18__division {
    flex: 0 0 calc(100% - 21px) !important;
    margin-left: 21px !important;
}

.kdb-home-bracket-v1 {
    display: grid;
    width: 100%;
}

.kdb-home-bracket-v1__row {
    position: relative;
    min-height: 47px;
    padding: 0 14px;

    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        22px
        minmax(0, 1fr)
        18px;
    align-items: center;
    gap: 8px;

    color: #f3f8fa;
    border-top: 1px solid rgba(56, 200, 242, .16);
    background: rgba(7, 47, 60, .72);

    text-decoration: none;
    transition:
        background .16s ease,
        border-color .16s ease;
}

.kdb-home-bracket-v1__row:first-child {
    border-top: 0;
}

.kdb-home-bracket-v1__row:hover,
.kdb-home-bracket-v1__row:focus-visible {
    background: rgba(12, 70, 86, .9);
    border-color: rgba(56, 200, 242, .5);
    outline: none;
}

.kdb-home-bracket-v1__row.is-live {
    border-left: 3px solid #f02e64;
    background:
        linear-gradient(
            90deg,
            rgba(240, 46, 100, .16),
            rgba(7, 47, 60, .78) 42%
        );
}

.kdb-home-bracket-v1__pilot {
    min-width: 0;
    overflow: hidden;

    color: #edf5f8;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.kdb-home-bracket-v1__pilot.is-winner {
    color: #62e6a7;
}

.kdb-home-bracket-v1__versus {
    color: #5d8999;
    font-size: 9px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.kdb-home-bracket-v1__arrow {
    color: #38c8f2;
    font-size: 18px;
    font-weight: 900;
    text-align: right;
}

.kdb-home-qualification-v1 .kdb-home-bracket-v1__row {
    /* Qualification is a queue, not a pair: reserve space only for status
       and the small direction mark so each driver's full name is readable. */
    grid-template-columns: minmax(0, 1fr) max-content 14px;
    min-height: 58px;
    gap: 10px;
}

.kdb-home-qualification-v1 .kdb-home-bracket-v1__row:not(.is-live) {
    grid-template-columns: minmax(0, 1fr);
}

.kdb-home-qualification-v1 .kdb-home-bracket-v1__pilot {
    overflow: visible;
    font-size: 13px;
    line-height: 1.22;
    text-overflow: clip;
    white-space: normal;
}

.kdb-home-qualification-v1 .kdb-home-bracket-v1__versus {
    color: #62e6a7;
    font-size: 10px;
    letter-spacing: .04em;
    white-space: nowrap;
}

.kdb-home-qualification-v1 .kdb-home-bracket-v1__row.is-live {
    border-left-color: #62e6a7;
    background: linear-gradient(90deg, rgba(98, 230, 167, .16), rgba(7, 47, 60, .78) 42%);
}

.kdb-home-qualification-v1 .kdb-home-bracket-v1__row.is-live .kdb-home-bracket-v1__arrow {
    display: block;
    color: #f02e64;
    font-size: 15px;
    text-shadow: 0 0 10px rgba(240, 46, 100, .62);
}

.kdb-home-bracket-v1__state {
    grid-column: 1 / -1;

    padding: 22px 16px;

    color: #82a4b1;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.kdb-home-bracket-v1--idle .kdb-home-bracket-v1__state {
    padding: 18px 16px;
    color: #b8d4de;
    letter-spacing: .04em;
}

.kdb-home-bracket-v1--idle .kdb-home-bracket-v1__state small {
    display: block;
    margin-top: 6px;
    color: #7296a4;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.kdb-home-bracket-v1__footer {
    min-height: 36px;
    padding: 0 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    color: #7798a5;
    border-top: 1px solid rgba(56, 200, 242, .17);
    background: rgba(0, 22, 31, .8);

    font-size: 9px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.kdb-home-bracket-v1__footer strong {
    color: #38c8f2;
}

@media (max-width: 720px) {
    .kdb-home-bracket-v1__row {
        min-height: 44px;
        padding-inline: 11px;

        grid-template-columns:
            minmax(0, 1fr)
            18px
            minmax(0, 1fr)
            15px;
        gap: 5px;
    }

    .kdb-home-bracket-v1__pilot {
        font-size: 10px;
    }

    .kdb-home-bracket-v1__footer {
        padding-inline: 11px;
    }
}
