/* Kisure Sports v349: transfer centre, homepage transfer card and mobile scorecard balance. */

.ks-top-transfers-card {
    overflow: hidden;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 22px;
    background: var(--surface, #fff);
    box-shadow: 0 14px 36px rgba(15, 23, 42, .05);
}
.ks-top-transfers-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--border, #edf0f3);
}
.ks-top-transfers-card__head h3 {
    margin: 0;
    color: var(--text, #111827);
    font-family: var(--font-display, "Space Grotesk", sans-serif);
    font-size: 1.04rem;
    font-weight: 800;
    line-height: 1.15;
}
.ks-top-transfers-card__head span {
    display: block;
    margin-top: 4px;
    color: var(--muted, #7b8490);
    font-size: .82rem;
    font-weight: 700;
}
.ks-top-transfers-card__icon {
    display: inline-flex;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text, #111827) 5%, var(--surface, #fff));
    color: color-mix(in srgb, var(--text, #111827) 68%, transparent);
    transition: transform .18s ease, background .18s ease, color .18s ease;
}
.ks-top-transfers-card__icon:hover {
    transform: translateY(-2px);
    background: var(--primary, #0d8a85);
    color: #fff;
}
.ks-top-transfer-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 86px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border, #edf0f3);
}
.ks-top-transfer-row__player {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    color: inherit;
}
.ks-top-transfer-row__photo {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text, #111827) 6%, var(--surface, #fff));
    color: var(--muted, #7b8490);
}
.ks-top-transfer-row__photo img,
.ks-top-transfer-team-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ks-top-transfer-row__photo img { object-fit: cover; }
.ks-top-transfer-row__info {
    display: grid;
    min-width: 0;
    gap: 7px;
}
.ks-top-transfer-row__info > strong {
    overflow: hidden;
    color: var(--text, #111827);
    font-size: .96rem;
    font-weight: 800;
    line-height: 1.22;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ks-top-transfer-row__info small {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ks-top-transfer-team-mark {
    display: inline-flex;
    width: 21px;
    height: 21px;
    align-items: center;
    justify-content: center;
    color: var(--muted, #7b8490);
    font-size: .86rem;
}
.ks-top-transfer-row__arrow {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary, #0d9b87);
    color: #fff;
    font-size: .62rem;
}
.ks-top-transfer-row__fee {
    color: var(--text, #111827);
    font-size: .94rem;
    font-weight: 900;
    white-space: nowrap;
}
.ks-top-transfers-card__footer {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 16px 20px;
    color: var(--text, #111827);
    font-size: .92rem;
    font-weight: 900;
}
.ks-top-transfers-card__footer i {
    color: var(--primary, #0d8a85);
    transition: transform .18s ease;
}
.ks-top-transfers-card__footer:hover i { transform: translateX(3px); }

.ks-transfer-centre-page {
    display: grid;
    gap: 20px;
    padding-bottom: 48px;
}
.ks-transfer-centre-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 94px;
    padding: 20px 24px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 24px;
    background: var(--surface, #fff);
    box-shadow: 0 16px 44px rgba(15, 23, 42, .05);
}
.ks-transfer-centre-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text, #111827);
    font-family: var(--font-display, "Space Grotesk", sans-serif);
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-style: italic;
    line-height: 1;
    letter-spacing: -.05em;
}
.ks-transfer-centre-brand strong { font-weight: 950; }
.ks-transfer-centre-brand__mark {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 3px solid currentColor;
    border-radius: 50%;
    font-size: .8rem;
}
.ks-transfer-centre-rumours {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 18px;
    border-radius: 999px;
    background: var(--text, #171717);
    color: var(--surface, #fff);
    font-size: .88rem;
    font-weight: 900;
    white-space: nowrap;
}
.ks-transfer-centre-rumours:hover { opacity: .86; }
.ks-transfer-centre-layout {
    display: grid;
    grid-template-columns: minmax(245px, 310px) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
}
.ks-transfer-filters,
.ks-transfer-results {
    overflow: hidden;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 24px;
    background: var(--surface, #fff);
    box-shadow: 0 16px 44px rgba(15, 23, 42, .05);
}
.ks-transfer-filters { position: sticky; top: 112px; }
.ks-transfer-filters__title,
.ks-transfer-results__title {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.ks-transfer-filters__title h2 {
    margin: 0;
    color: var(--text, #111827);
    font-size: 1.1rem;
    font-weight: 900;
}
.ks-transfer-filters__title a {
    color: var(--primary, #0d8a85);
    font-size: .78rem;
    font-weight: 900;
}
.ks-transfer-filter-group {
    display: grid;
    gap: 14px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.ks-transfer-filter-group > label {
    color: var(--text, #111827);
    font-size: .94rem;
    font-weight: 900;
}
.ks-transfer-select-wrap { position: relative; }
.ks-transfer-select-wrap select {
    width: 100%;
    min-height: 48px;
    appearance: none;
    padding: 10px 42px 10px 14px;
    border: 1px solid var(--border, #dfe4e8);
    border-radius: 14px;
    outline: none;
    background: var(--surface, #fff);
    color: var(--text, #111827);
    font: inherit;
    font-size: .88rem;
    font-weight: 800;
}
.ks-transfer-select-wrap select:focus {
    border-color: var(--primary, #0d8a85);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #0d8a85) 18%, transparent);
}
.ks-transfer-select-wrap > i {
    position: absolute;
    top: 50%;
    right: 15px;
    color: var(--muted, #7b8490);
    font-size: .72rem;
    pointer-events: none;
    transform: translateY(-50%);
}
.ks-transfer-fee-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted, #65707c);
    font-size: .82rem;
}
.ks-transfer-fee-values strong { color: var(--text, #111827); }
.ks-transfer-range {
    position: relative;
    height: 28px;
}
.ks-transfer-range__rail,
.ks-transfer-range__fill {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 4px;
    border-radius: 999px;
    transform: translateY(-50%);
}
.ks-transfer-range__rail { background: color-mix(in srgb, var(--text, #111827) 13%, transparent); }
.ks-transfer-range__fill { background: var(--text, #111827); }
.ks-transfer-range input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 28px;
    margin: 0;
    appearance: none;
    outline: none;
    background: transparent;
    pointer-events: none;
}
.ks-transfer-range input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    appearance: none;
    border: 1px solid var(--border, #dfe4e8);
    border-radius: 50%;
    background: var(--surface, #fff);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .16);
    cursor: grab;
    pointer-events: auto;
}
.ks-transfer-range input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 1px solid var(--border, #dfe4e8);
    border-radius: 50%;
    background: var(--surface, #fff);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .16);
    cursor: grab;
    pointer-events: auto;
}
.ks-transfer-filter-submit {
    width: calc(100% - 40px);
    min-height: 46px;
    margin: 20px;
    border: 0;
    border-radius: 14px;
    background: var(--primary, #0d8a85);
    color: #fff;
    font-size: .86rem;
    font-weight: 900;
    cursor: pointer;
}
.ks-transfer-filter-submit:hover { filter: brightness(.94); }
.ks-transfer-results__title {
    justify-content: center;
    text-align: center;
}
.ks-transfer-results__title > div {
    display: grid;
    gap: 3px;
}
.ks-transfer-results__title > div > span {
    color: var(--text, #111827);
    font-size: .94rem;
    font-weight: 900;
}
.ks-transfer-results__title > div > span i { margin-right: 8px; }
.ks-transfer-results__title small {
    color: var(--muted, #65707c);
    font-size: .72rem;
    font-weight: 700;
}
.ks-transfer-results__sort {
    position: absolute;
    right: 24px;
    color: var(--muted, #65707c);
    font-size: .76rem;
    font-weight: 800;
}
.ks-transfer-results__title { position: relative; }
.ks-transfer-table__head,
.ks-transfer-table__row {
    display: grid;
    grid-template-columns: minmax(150px, 1.05fr) 42px minmax(150px, 1.05fr) minmax(220px, 1.45fr) minmax(110px, .72fr) minmax(100px, .72fr);
    align-items: center;
}
.ks-transfer-table__head {
    min-height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    color: var(--muted, #68727e);
    font-size: .78rem;
    font-weight: 900;
}
.ks-transfer-table__head span:nth-child(1) { grid-column: 1; }
.ks-transfer-table__head span:nth-child(2) { grid-column: 3; }
.ks-transfer-table__head span:nth-child(3) { grid-column: 4; }
.ks-transfer-table__head span:nth-child(4) { grid-column: 5; }
.ks-transfer-table__head span:nth-child(5) { grid-column: 6; text-align: right; }
.ks-transfer-table__row {
    min-height: 78px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    color: var(--text, #111827);
}
.ks-transfer-table__row[hidden] { display: none !important; }
.ks-transfer-table__row:hover {
    background: color-mix(in srgb, var(--primary, #0d8a85) 4%, var(--surface, #fff));
}
.ks-transfer-team-cell > a,
.ks-transfer-team-cell > span,
.ks-transfer-player-cell > a,
.ks-transfer-player-cell > span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: inherit;
}
.ks-transfer-team-logo {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
}
.ks-transfer-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ks-transfer-team-logo.is-placeholder {
    border-radius: 50%;
    background: color-mix(in srgb, var(--text, #111827) 7%, transparent);
    color: var(--muted, #65707c);
}
.ks-transfer-team-cell strong,
.ks-transfer-player-cell > a > strong,
.ks-transfer-player-cell > span > strong {
    overflow: hidden;
    font-size: .86rem;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ks-transfer-direction {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    justify-self: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text, #111827) 6%, transparent);
    color: var(--text, #111827);
    font-size: .72rem;
}
.ks-transfer-player-cell {
    padding-left: 14px;
}
.ks-transfer-player-photo {
    position: relative;
    display: inline-flex;
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text, #111827) 6%, transparent);
    color: var(--muted, #65707c);
}
.ks-transfer-player-photo img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}
.ks-transfer-player-photo small {
    position: absolute;
    right: -7px;
    bottom: -2px;
    min-width: 25px;
    padding: 4px 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface, #fff) 92%, var(--text, #111827));
    color: var(--muted, #65707c);
    font-size: .62rem;
    font-weight: 950;
    line-height: 1;
    text-align: center;
}
.ks-transfer-player-cell > a > strong,
.ks-transfer-player-cell > span > strong { font-size: .97rem; }
.ks-transfer-fee-cell strong {
    font-size: .87rem;
    font-weight: 900;
}
.ks-transfer-date-cell {
    color: var(--text, #111827);
    font-size: .82rem;
    font-weight: 750;
    text-align: right;
}
.ks-transfer-show-more {
    display: flex;
    width: 100%;
    min-height: 62px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    background: transparent;
    color: var(--text, #111827);
    font-size: .88rem;
    font-weight: 900;
    cursor: pointer;
}
.ks-transfer-show-more:hover { background: color-mix(in srgb, var(--text, #111827) 3%, transparent); }
.ks-transfer-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 72px 24px;
    text-align: center;
}
.ks-transfer-empty > i {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary, #0d8a85) 11%, transparent);
    color: var(--primary, #0d8a85);
}
.ks-transfer-empty h2 { margin: 0; font-size: 1.15rem; }
.ks-transfer-empty p { margin: 0 0 6px; color: var(--muted, #65707c); }

html[data-theme="dark"] .ks-top-transfers-card,
html[data-theme="dark"] .ks-transfer-centre-hero,
html[data-theme="dark"] .ks-transfer-filters,
html[data-theme="dark"] .ks-transfer-results {
    box-shadow: 0 18px 44px rgba(0, 0, 0, .2);
}
html[data-theme="dark"] .ks-transfer-centre-rumours {
    background: #f8fafc;
    color: #0f172a;
}

/* Keep red-card recipients in the same left/right lanes as scorers and assists. */
@media (max-width: 1024px) {
    .article-match-scoreboard .article-match-scoreboard__support--red-cards,
    .article-match-scoreboard--match-page .article-match-scoreboard__support--red-cards {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        grid-template-areas:
            "red-card-title red-card-title"
            "home-red-cards away-red-cards" !important;
        align-items: start !important;
        gap: 10px 22px !important;
        padding-top: 14px !important;
    }
    .article-match-scoreboard .article-match-scoreboard__support--red-cards .article-match-scoreboard__support-center,
    .article-match-scoreboard--match-page .article-match-scoreboard__support--red-cards .article-match-scoreboard__support-center {
        grid-area: red-card-title !important;
        grid-column: 1 / -1 !important;
        order: initial !important;
        width: 100% !important;
        min-width: 0 !important;
        justify-content: center !important;
    }
    .article-match-scoreboard .article-match-scoreboard__support--red-cards .article-match-scoreboard__support-col--home,
    .article-match-scoreboard--match-page .article-match-scoreboard__support--red-cards .article-match-scoreboard__support-col--home {
        grid-area: home-red-cards !important;
        grid-column: 1 !important;
        width: 100% !important;
        justify-content: flex-end !important;
        text-align: right !important;
    }
    .article-match-scoreboard .article-match-scoreboard__support--red-cards .article-match-scoreboard__support-col--away,
    .article-match-scoreboard--match-page .article-match-scoreboard__support--red-cards .article-match-scoreboard__support-col--away {
        grid-area: away-red-cards !important;
        grid-column: 2 !important;
        width: 100% !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }
    .article-match-scoreboard .article-match-scoreboard__support--red-cards .article-match-scoreboard__support-col strong,
    .article-match-scoreboard--match-page .article-match-scoreboard__support--red-cards .article-match-scoreboard__support-col strong {
        width: 100% !important;
        min-width: 0 !important;
    }
    .article-match-scoreboard .article-match-scoreboard__support--red-cards .article-match-scoreboard__support-col strong:empty,
    .article-match-scoreboard--match-page .article-match-scoreboard__support--red-cards .article-match-scoreboard__support-col strong:empty {
        display: none !important;
    }
}

@media (max-width: 1180px) {
    .ks-transfer-table__head,
    .ks-transfer-table__row {
        grid-template-columns: minmax(125px, 1fr) 34px minmax(125px, 1fr) minmax(190px, 1.35fr) minmax(95px, .7fr) minmax(90px, .65fr);
    }
    .ks-transfer-table__head,
    .ks-transfer-table__row { padding-right: 14px; padding-left: 14px; }
    .ks-transfer-player-cell { padding-left: 8px; }
}

@media (max-width: 900px) {
    .ks-transfer-centre-layout { grid-template-columns: 1fr; }
    .ks-transfer-filters { position: static; }
    .ks-transfer-filters form {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: end;
    }
    .ks-transfer-filter-group { height: 100%; border-right: 1px solid var(--border, #e5e7eb); }
    .ks-transfer-filter-group:nth-child(3) { border-right: 0; }
    .ks-transfer-filter-submit { grid-column: 1 / -1; width: auto; }
    .ks-transfer-table__head { display: none; }
    .ks-transfer-table__row {
        grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
        grid-template-areas:
            "player player player"
            "from arrow to"
            "fee fee date";
        gap: 13px 8px;
        padding: 16px;
    }
    .ks-transfer-player-cell { grid-area: player; padding: 0 0 2px; }
    .ks-transfer-team-cell--from { grid-area: from; }
    .ks-transfer-direction { grid-area: arrow; }
    .ks-transfer-team-cell--to { grid-area: to; }
    .ks-transfer-fee-cell { grid-area: fee; }
    .ks-transfer-date-cell { grid-area: date; }
    .ks-transfer-team-cell--from > a,
    .ks-transfer-team-cell--from > span { justify-content: flex-end; text-align: right; }
    .ks-transfer-team-cell--from > a { flex-direction: row-reverse; }
    .ks-transfer-team-cell--from > span { flex-direction: row-reverse; }
    .ks-transfer-team-cell--to > a,
    .ks-transfer-team-cell--to > span { justify-content: flex-start; text-align: left; }
    .ks-transfer-fee-cell,
    .ks-transfer-date-cell {
        padding-top: 11px;
        border-top: 1px solid var(--border, #e5e7eb);
    }
}

@media (max-width: 680px) {
    .ks-transfer-centre-page { gap: 14px; }
    .ks-transfer-centre-hero {
        align-items: flex-start;
        padding: 18px;
    }
    .ks-transfer-centre-rumours {
        min-width: 44px;
        width: 44px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
    }
    .ks-transfer-centre-rumours i { font-size: .85rem; }
    .ks-transfer-filters form { grid-template-columns: 1fr; }
    .ks-transfer-filter-group { border-right: 0; }
    .ks-transfer-filter-submit { grid-column: auto; }
    .ks-transfer-results__title { justify-content: flex-start; text-align: left; }
    .ks-transfer-results__sort { right: 16px; font-size: 0; }
    .ks-transfer-results__sort i { font-size: .8rem; }
    .ks-top-transfer-row { padding-right: 16px; padding-left: 16px; }
}

@media (max-width: 460px) {
    .ks-transfer-centre-brand { font-size: 1.12rem; }
    .ks-transfer-centre-brand__mark { width: 29px; height: 29px; }
    .ks-transfer-table__row { padding: 15px 12px; }
    .ks-transfer-team-cell strong { font-size: .78rem; white-space: normal; }
    .ks-transfer-team-logo { width: 28px; height: 28px; flex-basis: 28px; }
    .ks-transfer-player-cell > a > strong,
    .ks-transfer-player-cell > span > strong { font-size: .91rem; }
    .ks-top-transfer-row__photo { width: 44px; height: 44px; flex-basis: 44px; }
    .ks-top-transfer-row__fee { font-size: .84rem; }
}
