/* KISURE FE894 — final solid entity identity + transparent portrait integration.
 * Loaded after FE893 so old light/dark profile skins cannot recolour entity heroes.
 */

/* --------------------------------------------------------------------------
 * Solid entity identity: the same saved/extracted colour owns light + dark.
 * -------------------------------------------------------------------------- */
html[data-kisure-design="865"] body [data-kisure-solid-hero="club"].football-club-hero,
html[data-kisure-design="865"] body [data-kisure-solid-hero="player"].football-player-hero,
html[data-kisure-design="865"] body [data-kisure-solid-hero="coach"].football-player-hero,
html[data-kisure-design="865"] body [data-kisure-solid-hero="referee"].football-player-hero,
html[data-theme="dark"][data-kisure-design="865"] body [data-kisure-solid-hero="club"].football-club-hero,
html[data-theme="dark"][data-kisure-design="865"] body [data-kisure-solid-hero="player"].football-player-hero,
html[data-theme="dark"][data-kisure-design="865"] body [data-kisure-solid-hero="coach"].football-player-hero,
html[data-theme="dark"][data-kisure-design="865"] body [data-kisure-solid-hero="referee"].football-player-hero {
    background: var(--ks-hero-accent, #087C78) !important;
    background-color: var(--ks-hero-accent, #087C78) !important;
    background-image: none !important;
    border-color: var(--ks-hero-border, rgba(255,255,255,.24)) !important;
    color: var(--ks-hero-on-color, #FFFFFF) !important;
    box-shadow: none !important;
}

html[data-kisure-design="865"] body [data-kisure-solid-hero] :is(
    h1, h2, h3, strong, b, .site-kicker, .football-page-live-indicator,
    .football-player-team-link, .football-player-team-link span,
    .football-hero__actions .site-button, .football-hero__actions .site-button i
) {
    color: var(--ks-hero-on-color, #FFFFFF) !important;
}

html[data-kisure-design="865"] body [data-kisure-solid-hero] :is(
    p, small, .football-player-hero__content > p, .football-club-hero__content > p
) {
    color: var(--ks-hero-muted, rgba(255,255,255,.80)) !important;
}

html[data-kisure-design="865"] body [data-kisure-solid-hero] :is(
    .football-club-hero__quick > span,
    .football-player-hero__quick > span,
    .football-player-team-link,
    .site-button--ghost,
    .ks-member-follow-button
) {
    background: var(--ks-hero-panel, rgba(0,0,0,.18)) !important;
    background-image: none !important;
    border-color: var(--ks-hero-border, rgba(255,255,255,.24)) !important;
    box-shadow: none !important;
}

/* Portrait container must become part of the solid hero. No white card or ring. */
html[data-kisure-design="865"] body [data-kisure-solid-hero="player"] .football-player-hero__photo,
html[data-kisure-design="865"] body [data-kisure-solid-hero="coach"] .football-player-hero__photo,
html[data-kisure-design="865"] body [data-kisure-solid-hero="referee"] .football-player-hero__photo {
    background: var(--ks-hero-accent, #087C78) !important;
    background-color: var(--ks-hero-accent, #087C78) !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
}

html[data-kisure-design="865"] body [data-kisure-solid-hero="player"] .football-player-hero__photo img,
html[data-kisure-design="865"] body [data-kisure-solid-hero="coach"] .football-player-hero__photo img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    object-fit: contain !important;
    object-position: center bottom !important;
}

html[data-kisure-design="865"] body :is(
    .ks-player-face-img.is-kisure-white-trimmed-v893,
    .ks-player-face-img.is-kisure-white-trimmed,
    [data-kisure-player-trim="1"]
) {
    background: transparent !important;
}

/* --------------------------------------------------------------------------
 * League/competition hero: solid extracted league colour in every theme.
 * -------------------------------------------------------------------------- */
html[data-kisure-design="865"] body [data-kisure-solid-hero="league"].football-league-hero,
html[data-theme="dark"][data-kisure-design="865"] body [data-kisure-solid-hero="league"].football-league-hero {
    background: var(--ks-competition-accent, #087C78) !important;
    background-color: var(--ks-competition-accent, #087C78) !important;
    background-image: none !important;
    border-color: var(--ks-competition-border, rgba(255,255,255,.24)) !important;
    color: var(--ks-competition-on-accent, #FFFFFF) !important;
    box-shadow: none !important;
}

html[data-kisure-design="865"] body [data-kisure-solid-hero="league"].football-league-hero :is(
    h1, h2, h3, strong, .site-kicker, .football-page-live-indicator
) {
    color: var(--ks-competition-on-accent, #FFFFFF) !important;
}

html[data-kisure-design="865"] body [data-kisure-solid-hero="league"].football-league-hero :is(p, small) {
    color: var(--ks-competition-muted, rgba(255,255,255,.80)) !important;
}

/* Fix the country / World badge that became pale-on-pale on dark league heroes. */
html[data-kisure-design="865"] body [data-kisure-solid-hero="league"] .football-league-hero__country {
    display: inline-flex !important;
    align-items: center !important;
    gap: .42rem !important;
    width: max-content !important;
    max-width: 100% !important;
    margin: .12rem 0 .28rem !important;
    padding: .34rem .62rem !important;
    border: 1px solid var(--ks-competition-border, rgba(255,255,255,.24)) !important;
    border-radius: 999px !important;
    background: var(--ks-competition-panel, rgba(0,0,0,.18)) !important;
    color: var(--ks-competition-on-accent, #FFFFFF) !important;
    box-shadow: none !important;
}
html[data-kisure-design="865"] body [data-kisure-solid-hero="league"] .football-league-hero__country span {
    color: var(--ks-competition-on-accent, #FFFFFF) !important;
    opacity: 1 !important;
}
html[data-kisure-design="865"] body [data-kisure-solid-hero="league"] .football-league-hero__country img {
    flex: 0 0 auto !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

html[data-kisure-design="865"] body [data-kisure-solid-hero="league"] :is(
    .football-league-hero__meta > span,
    .football-season-switcher--dropdown,
    .football-hero__actions .site-button,
    .ks-member-follow-button
) {
    border-color: var(--ks-competition-border, rgba(255,255,255,.24)) !important;
    box-shadow: none !important;
}

/* --------------------------------------------------------------------------
 * Stadium identity body: same solid home-team colour in light and dark.
 * -------------------------------------------------------------------------- */
html[data-kisure-design="865"] body [data-kisure-solid-hero="stadium"] .ks-stadium-hero__body,
html[data-theme="dark"][data-kisure-design="865"] body [data-kisure-solid-hero="stadium"] .ks-stadium-hero__body {
    background: var(--ks-hero-accent, #087C78) !important;
    background-color: var(--ks-hero-accent, #087C78) !important;
    background-image: none !important;
}

/* --------------------------------------------------------------------------
 * Honours / competition assignments: main-column content, not sidebar cards.
 * -------------------------------------------------------------------------- */
html[data-kisure-design="865"] body .football-player-main-stack > :is(
    .football-player-honours-panel,
    .football-coach-honours-panel,
    .football-referee-competitions-main
) {
    width: 100% !important;
    min-width: 0 !important;
    position: static !important;
}
html[data-kisure-design="865"] body :is(.football-coach-sidebar-ad, .football-referee-sidebar-ad) .football-sidebar-ad-slot {
    min-height: 250px !important;
}

/* --------------------------------------------------------------------------
 * Frontend logout: available in desktop settings and mobile drawer.
 * -------------------------------------------------------------------------- */
html[data-kisure-design="865"] body .ks-ref-settings-panel__logout {
    margin: -.12rem 0 .34rem !important;
    padding: 0 .15rem .48rem !important;
    border-bottom: 1px solid rgba(15, 23, 42, .08) !important;
}
html[data-kisure-design="865"] body .ks-ref-settings-panel__logout button {
    width: 100% !important;
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: .62rem !important;
    padding: .55rem .68rem !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #33454d !important;
    cursor: pointer !important;
    font: inherit !important;
    font-weight: 700 !important;
}
html[data-kisure-design="865"] body .ks-ref-settings-panel__logout button:hover {
    background: #E8F7F7 !important;
    color: #087C78 !important;
}
html[data-theme="dark"][data-kisure-design="865"] body .ks-ref-settings-panel__logout {
    border-bottom-color: rgba(255,255,255,.10) !important;
}
html[data-theme="dark"][data-kisure-design="865"] body .ks-ref-settings-panel__logout button {
    color: #EAF5F5 !important;
}
html[data-theme="dark"][data-kisure-design="865"] body .ks-ref-settings-panel__logout button:hover {
    background: rgba(11,156,160,.16) !important;
    color: #8DE5E3 !important;
}
html[data-kisure-design="865"] body .ks-ref-mobile-logout {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
}
html[data-kisure-design="865"] body .ks-ref-mobile-logout .ks-ref-mobile-setting {
    width: 100% !important;
    font: inherit !important;
    cursor: pointer !important;
}

@media (max-width: 760px) {
    html[data-kisure-design="865"] body [data-kisure-solid-hero="league"] .football-league-hero__country {
        padding: .3rem .54rem !important;
    }
}
