/* Kisure v517: simple readable homepage fixture cards + wrapped transfer centre text. */

/* --- Homepage match-centre cards: simple, professional and readable --- */
.football-home-board .football-fixture-strip--scroll {
    grid-auto-columns: minmax(276px, 308px) !important;
    gap: .75rem !important;
}

.football-home-board .football-fixture-tile {
    min-width: 276px !important;
    min-height: 0 !important;
    border: 1px solid var(--border, #e5e7eb) !important;
    border-radius: 14px !important;
    background: var(--surface, #fff) !important;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .045) !important;
    overflow: hidden !important;
}

/* The legacy card header sets color:#fff!important. v516 changed the header
   background to a light surface without resetting that color, making the
   competition name/round look invisible. Set both background and text here. */
.football-home-board .football-fixture-tile__league {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 48px !important;
    gap: .65rem !important;
    padding: .58rem .7rem !important;
    border-bottom: 1px solid var(--border, #e5e7eb) !important;
    background: color-mix(in srgb, var(--primary, #0d8a85) 5%, var(--surface, #fff)) !important;
    color: var(--text, #111827) !important;
    text-decoration: none !important;
}

.football-home-board .football-fixture-tile__league-title {
    display: flex !important;
    min-width: 0 !important;
    align-items: center !important;
    gap: .5rem !important;
    color: var(--text, #111827) !important;
}

.football-home-board .football-fixture-tile__league-title img,
.football-home-board .football-fixture-tile__league-title i {
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
    padding: 2px !important;
    border: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 85%, transparent) !important;
    border-radius: 50% !important;
    background: #fff !important;
    object-fit: contain !important;
}

.football-home-board .football-fixture-tile__league-title > span {
    display: block !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    color: var(--text, #111827) !important;
    font-size: .84rem !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

.football-home-board .football-fixture-tile__league small {
    flex: 0 1 42% !important;
    max-width: 42% !important;
    padding: .22rem .38rem !important;
    border: 1px solid var(--border, #e5e7eb) !important;
    border-radius: 7px !important;
    background: var(--surface, #fff) !important;
    color: var(--muted, #65707c) !important;
    font-size: .65rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    text-align: right !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
}

.football-home-board .football-fixture-tile__body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 72px !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0 !important;
}

.football-home-board .football-fixture-tile__teams {
    display: grid !important;
    gap: .48rem !important;
    padding: .68rem .7rem !important;
}

.football-home-board .football-fixture-tile__teams > span {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: .5rem !important;
}

.football-home-board .football-fixture-tile__teams img {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain !important;
}

.football-home-board .football-fixture-tile__teams strong {
    display: block !important;
    min-width: 0 !important;
    overflow: visible !important;
    color: var(--text, #111827) !important;
    font-size: .82rem !important;
    font-weight: 850 !important;
    line-height: 1.18 !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

.football-home-board .football-fixture-tile__kickoff {
    display: grid !important;
    min-width: 72px !important;
    min-height: 72px !important;
    place-content: center !important;
    justify-items: center !important;
    gap: .12rem !important;
    padding: .45rem !important;
    border-left: 1px solid var(--border, #e5e7eb) !important;
    background: color-mix(in srgb, var(--surface, #fff) 96%, var(--text, #111827)) !important;
    color: var(--text, #111827) !important;
}

.football-home-board .football-fixture-tile__kickoff strong {
    color: var(--text, #111827) !important;
    font-size: .92rem !important;
    font-weight: 950 !important;
}

.football-home-board .football-fixture-tile__kickoff small {
    color: var(--muted, #65707c) !important;
    font-size: .62rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: normal !important;
}

.football-home-board .football-fixture-tile__venue {
    min-height: 0 !important;
    padding: .4rem .7rem !important;
    border-top: 1px solid var(--border, #e5e7eb) !important;
    color: var(--muted, #65707c) !important;
    font-size: .68rem !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
}

.football-home-board .football-fixture-tile__actions {
    padding: .45rem .7rem .55rem !important;
    border-top: 1px solid var(--border, #e5e7eb) !important;
}

.football-home-board .football-fixture-tile__actions a {
    width: 100% !important;
    justify-content: center !important;
}

/* --- Transfer Centre: no ellipses; let real words wrap naturally --- */
.ks-transfer-table__row {
    align-items: start !important;
}

.ks-transfer-team-cell > a,
.ks-transfer-team-cell > span,
.ks-transfer-player-cell > a,
.ks-transfer-player-cell > span {
    align-items: center !important;
}

.ks-transfer-team-cell strong,
.ks-transfer-player-cell > a > strong,
.ks-transfer-player-cell > span > strong,
.ks-transfer-type-cell strong,
.ks-transfer-type-cell small,
.ks-transfer-fee-cell strong,
.ks-transfer-fee-cell small,
.ks-transfer-date-cell {
    max-width: 100% !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

.ks-transfer-team-cell strong,
.ks-transfer-player-cell > a > strong,
.ks-transfer-player-cell > span > strong {
    line-height: 1.28 !important;
}

.ks-transfer-type-cell,
.ks-transfer-fee-cell {
    min-width: 0 !important;
}

.ks-transfer-fee-cell .ks-transfer-record-link {
    width: fit-content !important;
}

html[data-theme="dark"] .football-home-board .football-fixture-tile__league {
    background: rgba(15, 23, 42, .8) !important;
    color: var(--text, #e5f2ff) !important;
}

html[data-theme="dark"] .football-home-board .football-fixture-tile__league-title,
html[data-theme="dark"] .football-home-board .football-fixture-tile__league-title > span,
html[data-theme="dark"] .football-home-board .football-fixture-tile__kickoff,
html[data-theme="dark"] .football-home-board .football-fixture-tile__kickoff strong {
    color: var(--text, #e5f2ff) !important;
}

html[data-theme="dark"] .football-home-board .football-fixture-tile__league small,
html[data-theme="dark"] .football-home-board .football-fixture-tile__kickoff {
    background: rgba(15, 23, 42, .72) !important;
    border-color: rgba(148, 163, 184, .2) !important;
}

@media (max-width: 720px) {
    .football-home-board .football-fixture-strip--scroll {
        grid-auto-columns: minmax(250px, 84vw) !important;
    }

    .football-home-board .football-fixture-tile__league small {
        max-width: 46% !important;
        flex-basis: 46% !important;
    }
}

@media (max-width: 760px) {
    .ks-transfer-table__row {
        align-items: stretch !important;
    }

    .ks-transfer-team-cell strong,
    .ks-transfer-player-cell > a > strong,
    .ks-transfer-player-cell > span > strong,
    .ks-transfer-type-cell strong,
    .ks-transfer-type-cell small,
    .ks-transfer-fee-cell strong,
    .ks-transfer-fee-cell small {
        text-align: inherit !important;
    }
}
