.team-form-strip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.team-form-marker {
    width: 17px;
    height: 17px;
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 2px;
    background: rgba(255,255,255,0.035);
    color: rgba(255,255,255,0.78);
    font-family: monospace;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}

.team-form-marker[data-result="win"] {
    border-color: rgba(75, 190, 120, 0.48);
    background: rgba(75, 190, 120, 0.11);
    color: rgba(170, 235, 195, 0.95);
}

.team-form-marker[data-result="draw"] {
    border-color: rgba(170, 180, 190, 0.34);
    background: rgba(170, 180, 190, 0.08);
    color: rgba(220, 225, 230, 0.88);
}

.team-form-marker[data-result="loss"] {
    border-color: rgba(210, 90, 90, 0.45);
    background: rgba(210, 90, 90, 0.10);
    color: rgba(245, 180, 180, 0.94);
}

.team-form-empty {
    color: rgba(255,255,255,0.38);
    font-family: monospace;
    font-size: 9px;
    line-height: 1.2;
}

/*
The form-strip component is reusable.

This host places it inside single-table standings and controls
the table-level Recent results disclosure.
*/

.team-form-inline {
    position: absolute;
    left: 10px;
    bottom: 9px;

    display: inline-flex;
    max-width: calc(100% - 20px);
    max-height: 0;
    margin: 0;

    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-4px);

    transition:
        max-height 0.20s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.14s ease,
        transform 0.20s cubic-bezier(0.4, 0, 0.2, 1);
}

.recent-results-toggle[hidden] {
    display: none !important;
}

.single-table-workbench-main .group-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
    align-items: baseline;
    width: 100%;
}

.single-table-workbench-main
    .group-header-inner > .g-name {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-self: baseline;
}

.single-table-workbench-main .recent-results-toggle {
    grid-column: 3;
    grid-row: 1;
    position: static;
    justify-self: center;
    align-self: baseline;

    display: inline-block;
    border: 0;
    padding: 2px 0;
    margin: 0;
    background: transparent;
    color: rgba(255,255,255,0.52);

    font: inherit;
    font-family: monospace;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;

    cursor: pointer;
}

.single-table-workbench-main
    .group-header-inner > .table-embedded-pill {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    align-self: baseline;
}

.single-table-workbench-main
    .recent-results-toggle:hover:not(:disabled) {
    color: rgba(255,255,255,0.86);
}

.single-table-workbench-main
    .recent-results-toggle:focus-visible {
    outline: 1px solid rgba(61, 209, 220, 0.55);
    outline-offset: 3px;
}

.single-table-workbench-main
    .recent-results-toggle:disabled {
    color: rgba(255,255,255,0.32);
    cursor: default;
}

.single-table-workbench-main .team-name-with-form {
    position: relative;
}

.single-table-workbench-main
    .team-form-row > td {
    transition:
        padding-bottom 0.20s cubic-bezier(0.4, 0, 0.2, 1);
}

.single-table-workbench-main .team-name-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.single-table-workbench-main
    .group-table.recent-results-expanded
    .team-form-row > td {
    padding-bottom: 30px;
}

.single-table-workbench-main
    .group-table.recent-results-expanded
    .team-form-inline {
    max-height: 17px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .single-table-workbench-main
        .team-form-row > td,
    .team-form-inline {
        transition: none;
    }

    .team-form-inline {
        transform: none;
    }
}

/*
On narrow screens the disclosure gets its own centered line.
This prevents overlap with longer competition names while keeping
the competition name centered.
*/
@media (max-width: 520px) {
    .single-table-workbench-main .group-header-inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center;
        row-gap: 5px;
    }

    .single-table-workbench-main
        .group-header-inner > .g-name {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
    }

    .single-table-workbench-main
        .group-header-inner > .recent-results-toggle {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
        align-self: center;

        font-size: 8px;
        letter-spacing: 0.03em;
    }

    .single-table-workbench-main
        .group-header-inner > .table-embedded-pill {
        grid-column: 1;
        grid-row: 2;
    }
}


@media (max-width: 600px) {
    .single-table-workbench-main .team-form-inline {
        left: 3px;
        max-width: calc(100% - 6px);
    }
}