/* Kisure Sports v637 — Transfer Centre site-theme navigation and exact-row focus. */
.ks-transfer-scope-tabs {
    align-items: center;
    gap: .65rem;
}

.ks-transfer-scope-tabs a {
    background: rgba(14, 165, 164, .09) !important;
    border: 1px solid rgba(14, 165, 164, .30) !important;
    color: var(--primary-strong) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ks-transfer-scope-tabs a:hover,
.ks-transfer-scope-tabs a:focus-visible {
    background: rgba(14, 165, 164, .16) !important;
    border-color: var(--primary) !important;
    color: var(--primary-strong) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(14, 165, 164, .12);
}

.ks-transfer-scope-tabs a.is-active {
    background: var(--primary-strong, #087f7c) !important;
    border-color: var(--primary-strong) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(14, 165, 164, .22);
}

.ks-transfer-table__row {
    scroll-margin-top: 170px;
}

.ks-transfer-table__row:target,
.ks-transfer-table__row.is-transfer-target {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(14, 165, 164, .16), 0 16px 34px rgba(15, 23, 42, .08);
}

html[data-theme="dark"] .ks-transfer-scope-tabs a {
    background: rgba(79, 209, 197, .09) !important;
    border-color: rgba(79, 209, 197, .28) !important;
    color: var(--primary) !important;
}

html[data-theme="dark"] .ks-transfer-scope-tabs a:hover,
html[data-theme="dark"] .ks-transfer-scope-tabs a:focus-visible {
    background: rgba(79, 209, 197, .16) !important;
    color: var(--primary) !important;
}

html[data-theme="dark"] .ks-transfer-scope-tabs a.is-active {
    background: var(--primary-strong, #087f7c) !important;
    color: #03131b !important;
}

/* v639 — Transfer Centre position-badge placement polish.
   v638 identity/media fixes remain intact; only the badge anchor changes. */

/* v638 — Transfer Centre identity/media polish.
   Keep provider IDs out of public navigation at the PHP layer, and normalize
   visual media here without touching logos/photos elsewhere on the site. */
.ks-transfer-table .ks-transfer-team-logo {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    box-sizing: border-box;
    padding: 3px;
    overflow: hidden;
    border-radius: 10px;
}

.ks-transfer-table .ks-transfer-team-logo img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 28px !important;
    max-height: 28px !important;
    margin: auto !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
}

/* The face remains circular/cropped, while the position badge is deliberately
   allowed to sit above the photo rather than being clipped behind it. */
.ks-transfer-table .ks-transfer-player-photo {
    overflow: visible !important;
    isolation: isolate;
}

.ks-transfer-table .ks-transfer-player-photo img.ks-player-face-img {
    position: relative;
    z-index: 1;
    border-radius: 50% !important;
    clip-path: circle(50% at 50% 50%);
}

.ks-transfer-table .ks-transfer-player-photo small {
    top: auto !important;
    right: -7px !important;
    bottom: -2px !important;
    z-index: 5 !important;
    min-width: 26px;
    padding: 4px 6px;
    border: 1px solid color-mix(in srgb, var(--primary, #0ea5a4) 28%, var(--border, #dbe4ea));
    background: var(--surface, #fff) !important;
    color: var(--primary-strong, #087f7c) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
    pointer-events: none;
}

html[data-theme="dark"] .ks-transfer-table .ks-transfer-player-photo small,
body.dark-mode .ks-transfer-table .ks-transfer-player-photo small {
    background: var(--surface, #101827) !important;
    color: var(--primary, #4fd1c5) !important;
}

@media (max-width: 680px) {
    .ks-transfer-table .ks-transfer-team-logo {
        width: 32px !important;
        height: 32px !important;
        flex-basis: 32px !important;
        padding: 3px;
    }

    .ks-transfer-table .ks-transfer-team-logo img {
        max-width: 26px !important;
        max-height: 26px !important;
    }
}

/* v641 — keep the transfer position badge clear of the player's face.
   Anchor the pill immediately below the circular portrait instead of over it. */
.ks-transfer-table .ks-transfer-player-photo small {
    top: calc(100% - 1px) !important;
    right: -5px !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    z-index: 6 !important;
}
