/* =====================================================
   TRANSFERS PAGE — transfers.css
   ===================================================== */

/* ── Page hero ── */
.tf-hero {
    margin-bottom: 20px;
}
.tf-hero__title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 4px;
}
.tf-hero__sub {
    font-size: 13px;
    color: #6b7280;
}

/* ── Filters bar ── */
.tf-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.tf-filter-select {
    appearance: none;
    background: #1a1d2e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    color: #d1d5db;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    padding: 9px 36px 9px 14px;
    cursor: pointer;
    min-width: 160px;
    transition: border-color .15s;
}
.tf-filter-select:hover, .tf-filter-select:focus {
    border-color: rgba(255,255,255,.2);
    outline: none;
}
.tf-filter-type {
    display: flex;
    gap: 4px;
    background: #1a1d2e;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,.08);
}
.tf-type-btn {
    padding: 6px 14px;
    border: none;
    background: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: background .15s, color .15s;
    font-family: inherit;
}
.tf-type-btn.active {
    background: #e8192c;
    color: #fff;
}
.tf-type-btn:hover:not(.active) {
    background: rgba(255,255,255,.05);
    color: #d1d5db;
}
.tf-filter-search {
    flex: 1;
    min-width: 180px;
    max-width: 260px;
    background: #1a1d2e;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    color: #d1d5db;
    font-size: 13px;
    font-family: inherit;
    padding: 9px 14px;
    transition: border-color .15s;
}
.tf-filter-search::placeholder { color: #4b5563; }
.tf-filter-search:focus {
    outline: none;
    border-color: rgba(255,255,255,.2);
}

/* ── Table card ── */
.tf-card {
    background: #1a1d2e;
    border-radius: 12px;
    /* No overflow:hidden — would block horizontal scroll on iOS Safari */
}
/* Scroll wrapper — separate from card so border-radius still clips */
.tf-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.15) transparent;
}
.tf-table-wrap::-webkit-scrollbar { height: 4px; }
.tf-table-wrap::-webkit-scrollbar-track { background: transparent; }
.tf-table-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }
.tf-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}
.tf-table thead tr {
    border-bottom: 2px solid rgba(255,255,255,.06);
}
.tf-table th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .06em;
    text-align: left;
    white-space: nowrap;
}
.tf-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    vertical-align: middle;
}
.tf-table tbody tr:last-child td { border-bottom: none; }
.tf-table tbody tr { transition: background .1s; }
.tf-table tbody tr:hover { background: rgba(255,255,255,.025); }

/* ── Date cell ── */
.tf-date {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

/* ── Player cell ── */
.tf-player {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tf-player--link {
    text-decoration: none;
    transition: opacity .15s;
}
.tf-player--link:hover { opacity: .75; }
.tf-player--link:hover .tf-player__name { color: #e8192c; }
.tf-player__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #374151, #1f2937);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #9ca3af;
    flex-shrink: 0;
}
.tf-player__avatar--photo {
    object-fit: cover;
    background: #1f2937;
}
.tf-player__name {
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.2;
}
.tf-player__position {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

/* ── Club cell (from/to) ── */
.tf-club {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tf-club__logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}
.tf-club__placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    flex-shrink: 0;
}
.tf-club__name {
    font-size: 13px;
    font-weight: 600;
    color: #d1d5db;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}
.tf-club__league {
    font-size: 11px;
    color: #6b7280;
    margin-top: 1px;
    white-space: nowrap;
}

/* ── Type cell ── */
.tf-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
}
.tf-type__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tf-type--transfer .tf-type__arrow { background: rgba(232,25,44,.18); color: #e8192c; }
.tf-type--loan     .tf-type__arrow { background: rgba(255,107,53,.15); color: #ff6b35; }
.tf-type--free     .tf-type__arrow { background: rgba(107,114,128,.2); color: #9ca3af; }
.tf-type--contract .tf-type__arrow { background: rgba(148,163,184,.15); color: #94a3b8; }
.tf-type--transfer { color: #e8192c; }
.tf-type--loan     { color: #ff6b35; }
.tf-type--free     { color: #9ca3af; }
.tf-type--contract { color: #94a3b8; }

/* ── Amount cell ── */
.tf-amount {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
}
.tf-amount--free { color: #9ca3af; }
.tf-amount--dash { color: #4b5563; }

/* ── League logo (dark bg) ── */
.tf-league-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    background: #fff;
    border-radius: 3px;
    padding: 2px;
    flex-shrink: 0;
}

/* ── No results ── */
.tf-empty {
    text-align: center;
    padding: 48px;
    color: #6b7280;
    font-size: 14px;
}

/* ── Loader ── */
.tf-loader {
    display: flex;
    justify-content: center;
    padding: 48px;
}
.tf-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,.08);
    border-top-color: #e8192c;
    border-radius: 50%;
    animation: tf-spin .7s linear infinite;
}
@keyframes tf-spin { to { transform: rotate(360deg); } }

/* ── Upcoming matches sidebar widget ── */
.tf-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}
.tf-layout > aside {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.tf-upcoming-card {
    background: #1a1d2e;
    border-radius: 12px;
    overflow: hidden;
}
.tf-upcoming-card__head {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.tf-upcoming-card__title {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
}
.tf-upcoming-card__all {
    font-size: 12px;
    color: #e8192c;
    text-decoration: none;
    font-weight: 600;
}
.tf-upcoming-card__all:hover { text-decoration: underline; }
.tf-upcoming-list { padding: 4px 0; }
.tf-upcoming-match {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    text-decoration: none;
    transition: background .1s;
}
.tf-upcoming-match:last-child { border-bottom: none; }
.tf-upcoming-match:hover { background: rgba(255,255,255,.03); }
.tf-upcoming-teams {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.tf-upcoming-team {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #d1d5db;
}
.tf-upcoming-team img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}
.tf-upcoming-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.tf-upcoming-goal {
    font-size: 13px;
    font-weight: 800;
    color: #f1f5f9;
    width: 16px;
    text-align: center;
}
.tf-upcoming-time {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
}
.tf-live-badge {
    background: #e05454;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: .03em;
}
.tf-upcoming-loader {
    padding: 24px;
    text-align: center;
    color: #4b5563;
    font-size: 12px;
}

/* ── Breadcrumb ── */
.tf-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tf-breadcrumb a { color: #9ca3af; text-decoration: none; }
.tf-breadcrumb a:hover { color: #f1f5f9; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .tf-layout { grid-template-columns: 1fr; }
    .tf-upcoming-card { position: static; order: -1; }
}
@media (max-width: 640px) {
    /* Show only Player / From / To — all 3 fit on screen */
    .tf-table { min-width: unset; width: 100%; }
    .tf-table th:nth-child(1), .tf-table td:nth-child(1) { display: none; } /* Date   */
    .tf-table th:nth-child(4), .tf-table td:nth-child(4) { display: none; } /* Type   */
    .tf-table th:nth-child(6), .tf-table td:nth-child(6) { display: none; } /* Amount */
    /* Compact padding */
    .tf-table th, .tf-table td { padding: 10px 8px; }
    /* Player cell — hide avatar, keep name+position */
    .tf-player__avatar { display: none; }
    .tf-player { gap: 0; }
    .tf-player__name { font-size: 12px; }
    .tf-player__position { font-size: 10px; }
    /* Club cells — hide league line, compact name */
    .tf-club__league { display: none; }
    .tf-club__name { font-size: 12px; max-width: 80px; }
    .tf-club__logo { width: 18px; height: 18px; }
    .tf-club { gap: 5px; }
    /* Filters */
    .tf-filters { gap: 8px; }
    .tf-filter-search { max-width: 100%; width: 100%; }
    .tf-filter-select { flex: 1; min-width: 0; }
    .tf-filter-type { flex-wrap: wrap; gap: 4px; width: 100%; }
    .tf-type-btn { flex: 1; text-align: center; }
    .tf-hero__title { font-size: 22px; }
}
@media (max-width: 420px) {
    .tf-hero__title { font-size: 18px; }
    .tf-hero { margin-bottom: 14px; }
    .tf-table th, .tf-table td { padding: 8px 6px; font-size: 11px; }
    .tf-club__name { font-size: 11px; max-width: 68px; }
    .tf-player__name { font-size: 11px; }
    .tf-filters { flex-wrap: wrap; gap: 8px; }
    .tf-filter-select { min-width: 0; flex: 1; }
    .tf-filter-search { width: 100%; min-width: 0; max-width: 100%; }
    .tf-filter-type { flex-wrap: wrap; }
}
