/* Kisure Sports v393
   Sports Desk topic tags, responsive full league tables, accessibility and
   low-risk agentic browsing refinements. */

/* Full league table on desktop: Pos, Team, P, W, D, L, GF, GA, GD, Pts, Form. */
.ks-desk .ks-desk-table-card--expanded .ks-desk-table-card__row {
    grid-template-columns:
        2.5rem
        minmax(10rem, 1.65fr)
        repeat(4, minmax(2.25rem, .34fr))
        repeat(3, minmax(2.55rem, .38fr))
        minmax(3rem, .42fr)
        minmax(9rem, 1fr) !important;
    gap: .45rem !important;
    padding-inline: .8rem !important;
}

.ks-desk .ks-desk-table-card--expanded .ks-desk-table-card__row > :not(strong) {
    text-align: center;
}

.ks-desk .ks-desk-table-card--expanded .ks-desk-table-card__row--head {
    min-height: 2.4rem;
    color: var(--text-soft, #53606d);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.ks-desk-table-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .22rem;
    min-width: 0;
}

.ks-desk-table-form i {
    display: inline-flex;
    width: 1.32rem;
    height: 1.32rem;
    align-items: center;
    justify-content: center;
    border-radius: .36rem;
    color: #fff;
    font-size: .62rem;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
}

.ks-desk-table-form i.is-w { background: #087f5b; }
.ks-desk-table-form i.is-d { background: #667085; }
.ks-desk-table-form i.is-l { background: #c92a2a; }
.ks-desk-table-form em {
    color: var(--text-soft, #667085);
    font-style: normal;
}

/* Topic tags sourced from the articles in the selected Sports Desk category. */
.ks-desk-tags a {
    grid-template-columns: minmax(0, 1fr) auto 1rem;
}

.ks-desk-tags a > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ks-desk-tags a small {
    color: var(--text-soft, #5f6b76);
    font-size: .7rem;
    font-weight: 800;
    white-space: nowrap;
}

/* Tablet and mobile stay compact: Pos, Team, P, Pts. */
@media (max-width: 1024px) {
    .ks-desk .ks-desk-table-card--expanded .ks-desk-table-stat--desktop {
        display: none !important;
    }

    .ks-desk .ks-desk-table-card--expanded .ks-desk-table-card__row {
        grid-template-columns: 2.2rem minmax(0, 1fr) 2.25rem 2.65rem !important;
        gap: .5rem !important;
        padding-inline: .7rem !important;
    }
}

@media (max-width: 620px) {
    .ks-desk .ks-desk-table-card--expanded .ks-desk-table-card__row {
        grid-template-columns: 1.8rem minmax(0, 1fr) 1.75rem 2.1rem !important;
        gap: .36rem !important;
        padding-inline: .58rem !important;
    }

    .ks-desk-tags a {
        grid-template-columns: minmax(0, 1fr) auto .8rem;
    }

    .ks-desk-tags a small {
        font-size: .65rem;
    }
}

/* Stronger contrast for labels called out by Lighthouse. */
.story-badge,
.sports-desk-page .story-badge,
.site-body.is-sports-desk-page .story-badge {
    background: #d8f3f1;
    color: #075d5d;
}

.ks-top-transfers-card__head span {
    color: #4b5563;
}

.gdpr-cookie-settings-link,
.gdpr-cookie-banner a,
a[aria-label="Learn more about our cookie policy"] {
    color: #075f63 !important;
}

html[data-theme="dark"] .story-badge,
html[data-theme="dark"] .sports-desk-page .story-badge,
html[data-theme="dark"] .site-body.is-sports-desk-page .story-badge {
    background: rgba(45, 212, 191, .18);
    color: #bff8ef;
}

html[data-theme="dark"] .ks-top-transfers-card__head span,
html[data-theme="dark"] .ks-desk-tags a small {
    color: #c6ced8;
}

/* Predictable dimensions and keyboard focus for people and browsing agents. */
img[loading="lazy"] {
    height: auto;
}

.ks-desk a:focus-visible,
.football-header-leagues a:focus-visible,
.football-header-leagues button:focus-visible,
.search-modal button:focus-visible,
.search-modal input:focus-visible,
.newsletter-form input:focus-visible,
.newsletter-form button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary, #0d8a85) 70%, #fff);
    outline-offset: 3px;
}

/* Keep the more-menu label descriptive without widening the whole header. */
.football-header-league--more .football-header-league__tab strong {
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
