/* KISURE FE890 — targeted visual polish only.
 * Scope: prediction model-input spacing, Match Centre event surface consistency,
 * Match scoreboard crest scale, footer copyright contrast, fixture flag circles,
 * and global team-logo containment. No layout/data/route changes.
 */

/* --------------------------------------------------------------------------
 * Prediction detail: keep Model Inputs icons away from the card edge.
 * -------------------------------------------------------------------------- */
html[data-kisure-design="865"] body .football-prediction-detail-page .football-side-panel .football-link-list span {
    box-sizing: border-box !important;
    gap: .78rem !important;
    min-height: 58px !important;
    padding: .72rem 1rem !important;
}
html[data-kisure-design="865"] body .football-prediction-detail-page .football-side-panel .football-link-list span > i {
    align-items: center !important;
    display: inline-flex !important;
    flex: 0 0 1.35rem !important;
    justify-content: center !important;
    margin: 0 !important;
    width: 1.35rem !important;
}

/* --------------------------------------------------------------------------
 * Match timeline: one coherent card surface. The old dark/light cascade was
 * painting the card, header and person row as three unrelated shades.
 * Preserve team-colour card identity but make nested rows transparent.
 * -------------------------------------------------------------------------- */
html[data-kisure-design="865"] body .football-commentary-card__head,
html[data-kisure-design="865"] body .football-commentary-person-row,
html[data-kisure-design="865"] body .football-commentary-substitution,
html[data-kisure-design="865"] body .football-commentary-substitution .football-commentary-person,
html[data-kisure-design="865"] body .football-commentary-card .football-commentary-person {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}
html[data-kisure-design="865"] body .football-commentary-substitution .football-commentary-person,
html[data-kisure-design="865"] body .football-commentary-card .football-commentary-person {
    border-color: color-mix(in srgb, currentColor 10%, transparent) !important;
}
html[data-kisure-design="865"] body .football-commentary-person.is-out em {
    align-items: center !important;
    background: rgba(220, 38, 38, .09) !important;
    border: 1px solid rgba(220, 38, 38, .10) !important;
    border-radius: 999px !important;
    color: #c81e1e !important;
    display: inline-flex !important;
    justify-content: center !important;
    min-height: 30px !important;
    padding: .2rem .55rem !important;
}
html[data-theme="dark"][data-kisure-design="865"] body .football-commentary-card__head,
html[data-theme="dark"][data-kisure-design="865"] body .football-commentary-person-row,
html[data-theme="dark"][data-kisure-design="865"] body .football-commentary-substitution,
html[data-theme="dark"][data-kisure-design="865"] body .football-commentary-substitution .football-commentary-person,
html[data-theme="dark"][data-kisure-design="865"] body .football-commentary-card .football-commentary-person {
    background: transparent !important;
    background-image: none !important;
    border-color: rgba(255,255,255,.10) !important;
    box-shadow: none !important;
}
html[data-theme="dark"][data-kisure-design="865"] body .football-commentary-card :where(.football-commentary-person strong,.football-commentary-player-name,.football-commentary-player-name strong,.football-commentary-card__head strong) {
    color: #f4f8f8 !important;
    -webkit-text-fill-color: #f4f8f8 !important;
}
html[data-theme="dark"][data-kisure-design="865"] body .football-commentary-card :where(.football-commentary-person small,.football-commentary-card__body) {
    color: #d2dddd !important;
    -webkit-text-fill-color: #d2dddd !important;
}
html[data-theme="dark"][data-kisure-design="865"] body .football-commentary-person.is-out em {
    background: rgba(239, 68, 68, .16) !important;
    border-color: rgba(248, 113, 113, .18) !important;
    color: #ff8d86 !important;
    -webkit-text-fill-color: #ff8d86 !important;
}

/* --------------------------------------------------------------------------
 * Match hero: team crests +20% while keeping the existing FE884 geometry.
 * Desktop 40 -> 48px; tablet 44 -> 53px; phone 36 -> 43px.
 * -------------------------------------------------------------------------- */
@media (min-width: 901px) {
    html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__crest,
    html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__crest img {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        max-width: 48px !important;
        max-height: 48px !important;
    }
    html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__main {
        grid-template-columns: minmax(0,1fr) 50px minmax(108px,auto) 50px minmax(0,1fr) !important;
    }
}
@media (min-width: 561px) and (max-width: 900px) {
    html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__crest,
    html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__crest img {
        width: 53px !important;
        height: 53px !important;
        min-width: 53px !important;
        min-height: 53px !important;
        max-width: 53px !important;
        max-height: 53px !important;
    }
}
@media (max-width: 560px) {
    html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__crest,
    html body.site-body main.football-page .article-match-scoreboard--match-page .article-match-scoreboard__crest img {
        width: 43px !important;
        height: 43px !important;
        min-width: 43px !important;
        min-height: 43px !important;
        max-width: 43px !important;
        max-height: 43px !important;
    }
}

/* --------------------------------------------------------------------------
 * Team logos: never crop a crest into a circle. Team artwork must remain fully
 * visible with natural transparency across Match Centre, fixtures, tables,
 * lineups, history, transfer records and score strips.
 * -------------------------------------------------------------------------- */
html[data-kisure-design="865"] body :where(
    .article-match-scoreboard__crest,
    .football-prematch-team__crest,
    .football-lineup-card__crest,
    .football-match-history-h2h-v618__crest,
    .football-player-transfer-record__crest,
    .football-two-leg-modal__crest,
    .football-header-ticker__crest,
    .news-card-match-strip__crest,
    .ks-team__logo-wrap
) {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}
html[data-kisure-design="865"] body :where(
    .article-match-scoreboard__crest img,
    .football-prematch-team__crest img,
    .football-lineup-card__crest img,
    .football-match-history-h2h-v618__crest img,
    .football-player-transfer-record__crest img,
    .football-two-leg-modal__crest img,
    .football-header-ticker__crest img,
    .news-card-match-strip__crest img,
    .football-team-logo,
    .ks-team__logo,
    .ks-stadium-team-logo,
    .ks-transfer-team-logo,
    .football-schedule-row__team img
) {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    object-fit: contain !important;
    object-position: center !important;
    overflow: visible !important;
}

/* --------------------------------------------------------------------------
 * Fixture competition flags: circular, edge-to-edge flag crop, no white frame.
 * Applied to the shared fixture competition identity so every fixture surface
 * gets the same treatment.
 * -------------------------------------------------------------------------- */
html[data-kisure-design="865"] body .football-competition-identity__flag {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    display: inline-flex !important;
    flex: 0 0 30px !important;
    height: 30px !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 0 !important;
    width: 30px !important;
}
html[data-kisure-design="865"] body .football-competition-identity__flag-image {
    background: transparent !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    display: block !important;
    height: 100% !important;
    max-height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    width: 100% !important;
}
html[data-theme="dark"][data-kisure-design="865"] body .football-competition-identity__flag,
html[data-theme="dark"][data-kisure-design="865"] body .football-competition-identity__flag-image {
    background: transparent !important;
}
@media (max-width: 640px) {
    html[data-kisure-design="865"] body .football-competition-identity__flag {
        flex-basis: 26px !important;
        height: 26px !important;
        width: 26px !important;
    }
}

/* --------------------------------------------------------------------------
 * Footer copyright: explicit contrast in both themes.
 * -------------------------------------------------------------------------- */
html[data-kisure-design="865"] body .footer-bottom,
html[data-kisure-design="865"] body .footer-bottom > div:first-child {
    color: #f4ffff !important;
    -webkit-text-fill-color: #f4ffff !important;
    opacity: 1 !important;
}
html[data-theme="dark"][data-kisure-design="865"] body .footer-bottom,
html[data-theme="dark"][data-kisure-design="865"] body .footer-bottom > div:first-child {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Catch shared/older football crest wrappers not enumerated above. Crests are
 * identity artwork, not avatars: never circle-crop them. */
html[data-kisure-design="865"] body :where(
    [class*="football-"][class*="crest"],
    [class*="ks-"][class*="crest"],
    [class*="news-"][class*="crest"]
) {
    border-radius: 0 !important;
    overflow: visible !important;
}
html[data-kisure-design="865"] body :where(
    [class*="football-"][class*="crest"],
    [class*="ks-"][class*="crest"],
    [class*="news-"][class*="crest"]
) img {
    border-radius: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
}
