/* ======================================================
   TRANSFERS PAGE STYLES - Yousuf Raissi
   Matches YsScores layout: Full-width stacked table rows,
   perfect geometric alignment, purple/cyan gradients.
   ====================================================== */

.transfer-page {
    width: 93%;
    max-width: 980px;
    margin: 20px auto 40px auto;
    box-sizing: border-box;
}

@media (max-width: 720px) {
    .transfer-page {
        width: 96% !important;
        margin: 10px auto 30px auto !important;
    }
}

.transformation-wrapper {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ── Page Header Banner ── */
.transfer-header-banner {
    background: #15191d;
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.transfer-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.transfer-header-title h2 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.transfer-badge {
    background: rgba(0, 223, 162, 0.12);
    color: var(--Primary-A-Color);
    border: 1px solid rgba(0, 223, 162, 0.25);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
}

/* ── Filters Card ── */
.transfer-filters-card {
    background: #151b26;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
}

.transfer-filters-card .block-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--Primary-C-Color, #707488);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-tags-wrap {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    padding-bottom: 6px !important;
}

.filter-tags-wrap::-webkit-scrollbar {
    height: 4px;
}

.filter-tags-wrap::-webkit-scrollbar-thumb {
    background: var(--Primary-A-Color);
    border-radius: 4px;
}

.search-tags {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    align-items: center !important;
    width: max-content !important;
}

.transfer-filter-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 34px !important;
    padding: 0 14px !important;
    border-radius: 20px !important;
    background: #1a2232 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--Primary-C-Color) !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
}

.transfer-filter-pill:hover {
    border-color: rgba(57, 219, 191, 0.45) !important;
    color: #fff !important;
    background: rgba(57, 219, 191, 0.06) !important;
}

.transfer-filter-pill.active {
    background: rgba(57, 219, 191, 0.12) !important;
    border-color: #39dbbf !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(57, 219, 191, 0.18) !important;
}

.transfer-filter-pill .img img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
}

.transfer-teams-wrap {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.transfer-teams-wrap.is-hidden {
    display: none !important;
}

/* ── Content Section Titles ── */
.transform-content {
    width: 100%;
    box-sizing: border-box;
}

.transform-content .block-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #fff !important;
    margin: 26px 0 14px 0 !important;
}

.transform-content #imp_trans_title.block-title::before {
    content: '' !important;
    width: 4px !important;
    height: 20px !important;
    border-radius: 4px !important;
    background: linear-gradient(180deg, #7c569a, #4766c4) !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.transform-content .block-title:not(#imp_trans_title)::before {
    content: '' !important;
    width: 4px !important;
    height: 20px !important;
    border-radius: 4px !important;
    background: #39dbbf !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.transform-content .block-title.is-hidden {
    display: none !important;
}

/* ── STACKED FULL-WIDTH ROWS (NOT MULTI-COLUMN CARDS) ── */
#transfers_important,
#transfers {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.transform-item {
    display: grid !important;
    grid-template-columns: 1fr 200px 1fr !important;
    align-items: center !important;
    column-gap: 16px !important;
    padding: 12px 20px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: #161a24 !important;
    text-decoration: none !important;
    color: inherit !important;
    box-sizing: border-box !important;
    width: 100% !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.transform-item:hover {
    transform: translateY(-2px) !important;
    background: #1b202e !important;
    border-color: rgba(57, 219, 191, 0.3) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}

/* Purple Gradient for Important Transfers */
.transform-item.colored {
    background: linear-gradient(135deg, #503572 0%, #6f498c 50%, #3e5ab7 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 18px rgba(111, 73, 140, 0.25) !important;
}

.transform-item.colored:hover {
    box-shadow: 0 6px 24px rgba(111, 73, 140, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* ── Column 1: Source Team & Player ── */
.transform-item .from {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
    width: 100% !important;
}

.transform-item .from .club {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.transform-item .from .club img {
    max-width: 30px !important;
    max-height: 30px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.transform-item .from .player {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.transform-item .from .player .img {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #1a1d28 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.transform-item .from .player .img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.transform-item .from .player .text {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    text-align: start !important;
}

.transform-item .from .player .text h5 {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
}

.transform-item .from .player .text span {
    font-size: 11.5px !important;
    color: var(--Primary-C-Color, #707488) !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    line-height: 1.3 !important;
}

.transform-item.colored .from .player .text span {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* ── Column 2: Centered Arrow & Pill Badge ── */
.transform-item .cost-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    margin: 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
}

.transform-item .cost-wrap .exch-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 180px !important;
    height: 28px !important;
}

.transform-item .cost-wrap .exch-wrap svg {
    width: 100% !important;
    max-width: 180px !important;
    height: 10px !important;
    fill: #39dbbf !important;
    opacity: 0.65 !important;
}

.transform-item.colored .cost-wrap .exch-wrap svg {
    fill: #ffffff !important;
    opacity: 0.45 !important;
}

.transform-item .cost-wrap .exch-wrap span {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 24px !important;
    padding: 0 16px !important;
    border-radius: 50px !important;
    background: #39dbbf !important;
    color: #0b0d10 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    z-index: 2 !important;
    box-shadow: 0 2px 8px rgba(57, 219, 191, 0.35) !important;
}

.transform-item .cost-wrap .price {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #39dbbf !important;
    white-space: nowrap !important;
    text-align: center !important;
}

.transform-item.colored .cost-wrap .price {
    color: #fff !important;
}

/* ── Column 3: Destination Team & Contract Date ── */
.transform-item .to {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    min-width: 0 !important;
    width: 100% !important;
}

.transform-item .to .to-date {
    width: 85px !important;
    min-width: 85px !important;
    min-height: 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--Primary-C-Color, #707488) !important;
    white-space: nowrap !important;
    text-align: start !important;
    display: inline-block !important;
}

.transform-item.colored .to .to-date {
    color: rgba(255, 255, 255, 0.75) !important;
}

.transform-item .to .club {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.transform-item .to .club img {
    max-width: 30px !important;
    max-height: 30px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* ── Empty State ── */
.transfer-empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: #15191d;
    border-radius: 16px;
    margin: 20px 0;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.transfer-empty-state.is-visible {
    display: flex !important;
}

.transfer-empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--Primary-C-Color, #707488);
    margin-bottom: 12px;
    opacity: 0.6;
}

.transfer-empty-state p {
    font-size: 15px;
    color: var(--Primary-E-Color, #b4bec7);
    margin: 0;
}

/* ── Load More Button ── */
.transfer-load-more-wrap {
    text-align: center;
    margin: 25px auto 10px auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.transfer-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 36px;
    background: #15191d;
    border: 1px solid rgba(57, 219, 191, 0.35);
    border-radius: 12px;
    color: #39dbbf;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    user-select: none;
}

.transfer-load-more-btn:hover {
    background: rgba(57, 219, 191, 0.12);
    border-color: #39dbbf;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(57, 219, 191, 0.2);
}

.transfer-load-more-btn.is-hidden {
    display: none !important;
}

.inline-loader {
    min-height: 24px;
}

.inline-loader .spinner {
    width: 26px;
    height: 26px;
    border: 3px solid rgba(57, 219, 191, 0.2);
    border-top-color: #39dbbf;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Responsive Behavior on Mobile ── */
@media (max-width: 768px) {
    .transfer-header-banner {
        padding: 14px 16px !important;
        border-radius: 12px !important;
        margin-bottom: 14px !important;
    }

    .transfer-filters-card {
        padding: 14px !important;
        border-radius: 12px !important;
        margin-bottom: 16px !important;
    }

    .transform-item {
        grid-template-columns: minmax(0, 1fr) 88px 64px !important;
        column-gap: 8px !important;
        padding: 10px 12px !important;
        border-radius: 12px !important;
    }

    .transform-item .cost-wrap {
        width: 88px !important;
        min-width: 88px !important;
        max-width: 88px !important;
        margin: 0 auto !important;
    }

    .transform-item .cost-wrap .exch-wrap {
        width: 100% !important;
        height: auto !important;
    }

    .transform-item .cost-wrap .exch-wrap svg {
        display: none !important;
    }

    .transform-item .cost-wrap .exch-wrap span {
        position: static !important;
        transform: none !important;
        height: auto !important;
        min-height: 22px !important;
        padding: 3px 8px !important;
        font-size: 11px !important;
        border-radius: 20px !important;
        white-space: nowrap !important;
    }

    .transform-item .from .club {
        width: 26px !important;
        height: 26px !important;
        flex: 0 0 26px !important;
    }

    .transform-item .from .club img {
        max-width: 24px !important;
        max-height: 24px !important;
    }

    .transform-item .from .player .img {
        width: 36px !important;
        height: 36px !important;
        flex: 0 0 36px !important;
        border-radius: 6px !important;
    }

    .transform-item .from .player .text h5 {
        font-size: 12.5px !important;
    }

    .transform-item .from .player .text span {
        font-size: 10px !important;
    }

    .transform-item .to {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        width: 64px !important;
    }

    .transform-item .to .to-date {
        font-size: 10px !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        text-align: center !important;
        line-height: 1 !important;
    }

    .transform-item .to .club {
        width: 26px !important;
        height: 26px !important;
        flex: 0 0 26px !important;
    }

    .transform-item .to .club img {
        max-width: 24px !important;
        max-height: 24px !important;
    }
}

@media (max-width: 480px) {
    .transform-item {
        grid-template-columns: minmax(0, 1fr) 78px 58px !important;
        column-gap: 6px !important;
        padding: 8px 10px !important;
    }

    .transform-item .cost-wrap {
        width: 78px !important;
        min-width: 78px !important;
        max-width: 78px !important;
    }

    .transform-item .cost-wrap .exch-wrap span {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }

    .transform-item .to {
        width: 58px !important;
    }
}

/* ============================================================
   LIGHT MODE FOR TRANSFERS
   ============================================================ */
html.light-mode .transfer-header-banner {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

html.light-mode .transfer-header-title h2 {
    color: #0f172a !important;
}

html.light-mode .transfer-badge {
    background: rgba(13, 148, 136, 0.1) !important;
    color: #0d9488 !important;
    border-color: rgba(13, 148, 136, 0.25) !important;
}

html.light-mode .transfer-filters-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

html.light-mode .transfer-filters-card .block-title {
    color: #64748b !important;
}

html.light-mode .transfer-filter-pill {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}

html.light-mode .transfer-filter-pill:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

html.light-mode .transfer-filter-pill.active {
    background: rgba(13, 148, 136, 0.12) !important;
    border-color: #0d9488 !important;
    color: #0d9488 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.18) !important;
}

html.light-mode .transform-content .block-title {
    color: #0f172a !important;
}

html.light-mode .transform-item {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    color: #0f172a !important;
}

html.light-mode .transform-item:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06) !important;
}

html.light-mode .transform-item .player .text h5 {
    color: #0f172a !important;
}

html.light-mode .transform-item .player .text span {
    color: #64748b !important;
}

html.light-mode .transform-item .cost-wrap .exch-wrap span {
    background: #f0fdf4 !important;
    color: #0d9488 !important;
    border: 1px solid #bbf7d0 !important;
}

html.light-mode .transform-item .cost-wrap svg path {
    fill: #94a3b8 !important;
    opacity: 0.7 !important;
}

html.light-mode .transform-item .cost-wrap .price {
    background: rgba(13, 148, 136, 0.1) !important;
    color: #0d9488 !important;
    border: 1px solid rgba(13, 148, 136, 0.25) !important;
}

html.light-mode .transform-item .to .to-date {
    color: #64748b !important;
}

/* Important transfers: soft, elegant lavender/violet gradient */
html.light-mode .transform-item.colored {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #e0e7ff 100%) !important;
    border: 1px solid #ddd6fe !important;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08) !important;
}

html.light-mode .transform-item.colored:hover {
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.15) !important;
    border-color: #c4b5fd !important;
}

html.light-mode .transform-item.colored .player .text h5 {
    color: #1e1b4b !important;
}

html.light-mode .transform-item.colored .player .text span {
    color: #6b21a8 !important;
}

html.light-mode .transform-item.colored .cost-wrap .exch-wrap span {
    background: rgba(124, 58, 237, 0.1) !important;
    color: #7c3aed !important;
    border: 1px solid rgba(124, 58, 237, 0.25) !important;
}

html.light-mode .transform-item.colored .cost-wrap svg path {
    fill: #8b5cf6 !important;
    opacity: 0.6 !important;
}

html.light-mode .transform-item.colored .to .to-date {
    color: #6d28d9 !important;
}