/*
 * EB Live Results
 * Styled after the results site's live timing: a navy header with the yellow
 * Live tag, group-coloured chips and place tiles. Uses the theme's font.
 */
.ebl {
    --ebl-accent: #002856;
    --ebl-navy: #002856;
    --ebl-royal: #0066B3;
    --ebl-yellow: #F8DB00;
    --ebl-magenta: #DA1884;
    --ebl-green: #1E8E3E;
    --ebl-ink: #0B1F3A;
    --ebl-grey: #55565A;
    --ebl-line: #E3E7ED;
    --ebl-soft: #E9EEF5;
    --ebl-radius: 18px;
    --ebl-shadow: 0 1px 2px rgba(0, 40, 86, .06), 0 6px 20px rgba(0, 40, 86, .07);
    margin: 1.5em 0;
    color: var(--ebl-ink);
    line-height: 1.35;
    text-align: left;
}

.ebl[hidden],
.ebl [hidden] {
    display: none !important;
}

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

.ebl ol,
.ebl ul,
.ebl li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ebl li::before,
.ebl li::marker {
    content: none;
}

.ebl a {
    text-decoration: none;
    box-shadow: none;
}

.ebl a:focus-visible,
.ebl button:focus-visible {
    outline: 2px solid var(--ebl-royal);
    outline-offset: 2px;
}

.ebl__title {
    margin: 0 0 .75em;
    color: var(--ebl-navy);
}

.ebl__body {
    display: grid;
    gap: 16px;
}

.ebl__grid {
    display: grid;
    gap: 16px;
}

.ebl__grid--many {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    align-items: start;
}

/* Card ---------------------------------------------------------------------- */

.ebl__card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--ebl-radius);
    background: #fff;
    box-shadow: var(--ebl-shadow);
}

.ebl__head {
    padding: 14px 18px;
    background: var(--ebl-accent);
    color: #fff;
}

.ebl__head--plain {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ebl-line);
    background: #fff;
    color: var(--ebl-navy);
}

.ebl__headline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.ebl .ebl__name {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: normal;
    text-transform: none;
}

.ebl__tag {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.5;
    text-transform: uppercase;
    white-space: nowrap;
}

.ebl__tag--live {
    padding-left: 8px;
    background: var(--ebl-yellow);
    color: var(--ebl-navy);
}

.ebl__dot {
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--ebl-magenta);
    animation: ebl-pulse 1.4s ease-in-out infinite;
}

@keyframes ebl-pulse {
    50% {
        opacity: .25;
    }
}

.ebl__practice {
    flex: 0 0 auto;
    font-size: .8125rem;
    opacity: .8;
}

.ebl__clock {
    margin-top: 10px;
}

.ebl__clock-text {
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
    opacity: .9;
}

.ebl__bar {
    height: 5px;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(255, 255, 255, .22);
}

.ebl__bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 3px;
    background: var(--ebl-yellow);
    transition: width .6s ease;
}

/* Chips --------------------------------------------------------------------- */

.ebl__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 18px 4px;
}

.ebl .ebl__chip {
    --ebl-chip: var(--ebl-navy);
    --ebl-chip-fg: #fff;
    min-height: 32px;
    margin: 0;
    padding: 4px 12px;
    border: 1px solid var(--ebl-line);
    border-radius: 999px;
    background: #fff;
    box-shadow: none;
    color: var(--ebl-navy);
    cursor: pointer;
    font: inherit;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.3;
    text-transform: none;
    white-space: nowrap;
}

.ebl .ebl__chip:hover {
    border-color: var(--ebl-chip);
    background: #fff;
    color: var(--ebl-navy);
}

.ebl .ebl__chip[aria-pressed="true"] {
    border-color: var(--ebl-chip);
    background: var(--ebl-chip);
    color: var(--ebl-chip-fg);
}

/* Rows ---------------------------------------------------------------------- */

.ebl .ebl__rows {
    padding: 6px 0 0;
}

.ebl__row + .ebl__row {
    border-top: 1px solid var(--ebl-line);
}

.ebl__rowlink {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: var(--ebl-ink);
}

.ebl a.ebl__rowlink:hover {
    background: #F7F9FC;
    color: var(--ebl-ink);
}

.ebl__row--changed .ebl__rowlink {
    animation: ebl-flash 2.4s ease-out;
}

@keyframes ebl-flash {
    0%,
    30% {
        background: #FFF7BF;
    }
}

.ebl__place {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 5px;
    border-radius: 10px;
    color: var(--ebl-navy);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ebl__place--podium {
    background: var(--ebl-soft);
}

.ebl__place--first {
    background: var(--ebl-navy);
    color: #fff;
}

.ebl .ebl__logo {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
}

.ebl__who {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.ebl__team {
    color: var(--ebl-navy);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ebl__sub,
.ebl__mainsub {
    color: var(--ebl-grey);
    font-size: .8125rem;
}

.ebl__sub {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.ebl__moved {
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}

.ebl__moved--up {
    color: var(--ebl-green);
}

.ebl__moved--down {
    color: var(--ebl-magenta);
}

.ebl__value {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    max-width: 45%;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ebl__main {
    color: var(--ebl-navy);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
}

.ebl .ebl__waiting,
.ebl .ebl__empty {
    margin: 0;
    padding: 18px;
    color: var(--ebl-grey);
}

.ebl .ebl__empty {
    border-radius: var(--ebl-radius);
    background: #fff;
    box-shadow: var(--ebl-shadow);
}

/* Footer -------------------------------------------------------------------- */

.ebl__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
    padding: 12px 18px;
    border-top: 1px solid var(--ebl-line);
    font-size: .875rem;
}

.ebl a.ebl__more {
    color: var(--ebl-royal);
    font-weight: 700;
}

.ebl a.ebl__more::after {
    content: " \203A";
}

.ebl a.ebl__more:hover {
    text-decoration: underline;
}

.ebl__updated {
    color: var(--ebl-grey);
    font-size: .8125rem;
}

/* Next on track ------------------------------------------------------------- */

.ebl .ebl__nextrow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
}

.ebl .ebl__nextrow + .ebl__nextrow {
    border-top: 1px solid var(--ebl-line);
}

.ebl__groups {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

.ebl__group {
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--ebl-navy);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}

.ebl__countdown {
    color: var(--ebl-navy);
    font-weight: 700;
}

/* Editor preview ------------------------------------------------------------ */

.ebl__preview {
    padding: 18px;
    border: 1px dashed #A3ADBA;
    border-radius: var(--ebl-radius);
    background: #F7F9FC;
    color: var(--ebl-ink);
}

@media (max-width: 480px) {
    .ebl__head,
    .ebl__rowlink,
    .ebl .ebl__nextrow,
    .ebl__foot {
        padding-left: 14px;
        padding-right: 14px;
    }

    .ebl__chips {
        padding-left: 14px;
        padding-right: 14px;
    }

    .ebl__rowlink {
        gap: 10px;
    }

    .ebl__main {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ebl__dot,
    .ebl__row--changed .ebl__rowlink {
        animation: none;
    }

    .ebl__bar span {
        transition: none;
    }
}
