/**
 * Player Statistics archive
 * Colour tokens: #071B36 / #0B2342 / #F5B800 / #F4F6F8 / #FFFFFF / #E4E7EC
 */

body.btfc-player-statistics .btfc-hero-section,
body.btfc-player-statistics .btfc-hero-section.btfc-hero-title-only {
    display: none !important;
}

.btfc-pstats-filters {
    background: #ffffff;
    border: 1px solid #E4E7EC;
    padding: 1rem 1.1rem 0.85rem;
    margin: 0 0 0.85rem;
}

.btfc-pstats-filter-row {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 1.2fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.btfc-pstats-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
}

.btfc-pstats-field span {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.btfc-pstats-field select {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid #E4E7EC;
    border-radius: 2px;
    background: #F4F6F8;
    color: #071B36;
    font-size: 0.9rem;
}

.btfc-pstats-field select:focus {
    outline: 2px solid #F5B800;
    outline-offset: 1px;
    background: #ffffff;
}

.btfc-pstats-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.btfc-pstats-reset {
    background: #ffffff;
    color: #071B36;
    border-color: #E4E7EC;
}

.btfc-pstats-reset:hover,
.btfc-pstats-reset:focus {
    border-color: #071B36;
    color: #071B36;
}

.btfc-pstats-filter-note {
    margin: 0.7rem 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #6b7280;
}

.btfc-pstats-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    background: #071B36;
    margin: 0 0 1rem;
    -webkit-overflow-scrolling: touch;
}

.btfc-pstats-tabs .btfc-player-tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: #d1d5db;
    padding: 0.75rem 1.1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.btfc-pstats-tabs .btfc-player-tab.is-active {
    color: #ffffff;
    border-bottom-color: #F5B800;
}

.btfc-player-statistics-archive .btfc-player-panel {
    display: none;
}

.btfc-player-statistics-archive .btfc-player-panel.is-active,
.btfc-player-statistics-archive .btfc-player-panel.is-active[hidden] {
    display: block;
}

.btfc-pstats-summary {
    margin: 0 0 0.9rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.btfc-pstats-summary strong {
    color: #071B36;
    font-weight: 700;
}

.btfc-pstats-empty {
    margin: 0;
    padding: 1.25rem 1rem;
    background: #ffffff;
    border: 1px solid #E4E7EC;
    color: #6b7280;
}

.btfc-pstats-group {
    background: #ffffff;
    border: 1px solid #E4E7EC;
    margin: 0 0 0.85rem;
}

.btfc-pstats-group-summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.9rem;
    cursor: pointer;
    list-style: none;
}

.btfc-pstats-group-summary::-webkit-details-marker {
    display: none;
}

.btfc-pstats-group-summary::after {
    content: "▾";
    margin-left: auto;
    color: #6b7280;
    font-size: 0.8rem;
}

.btfc-pstats-group:not([open]) .btfc-pstats-group-summary::after {
    content: "▸";
}

.btfc-pstats-group-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.btfc-pstats-group-name {
    font-family: var(--font-heading, 'Bebas Neue', sans-serif);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #071B36;
}

.btfc-pstats-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    padding: 0.1rem 0.4rem;
    background: #F4F6F8;
    color: #071B36;
    font-size: 0.75rem;
    font-weight: 700;
}

.btfc-pstats-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.btfc-pstats-table {
    width: 100%;
    min-width: 44rem;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.btfc-pstats-group .btfc-pstats-table-wrap {
    width: 100%;
}

.btfc-pstats-table--position {
    table-layout: fixed;
    width: 100%;
    min-width: 48rem;
}

.btfc-pstats-table--position .btfc-pstats-colw-player {
    width: 32%;
}

.btfc-pstats-table--position .btfc-pstats-colw-stat {
    width: 9%;
}

.btfc-pstats-table--position .btfc-pstats-colw-minutes {
    width: 14%;
}

.btfc-pstats-table--position thead th,
.btfc-pstats-table--position tbody td {
    box-sizing: border-box;
    text-align: center;
}

.btfc-pstats-table--position thead th.btfc-pstats-col-player,
.btfc-pstats-table--position tbody td.btfc-pstats-col-player {
    text-align: left;
}

.btfc-pstats-table--position .btfc-pstats-col-player {
    width: 32%;
    min-width: 0;
}

.btfc-pstats-table--position .btfc-pstats-num {
    width: 9%;
}

.btfc-pstats-table--position thead th:last-child,
.btfc-pstats-table--position tbody td:last-child {
    width: 14%;
}

.btfc-pstats-table--position .btfc-pstats-player {
    min-width: 0;
}

.btfc-pstats-table--position .btfc-pstats-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.btfc-pstats-table th,
.btfc-pstats-table td {
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid #E4E7EC;
    white-space: nowrap;
    vertical-align: middle;
}

.btfc-pstats-table thead th {
    background: #071B36;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
}

.btfc-pstats-table thead th.btfc-table-sortable {
    color: #ffffff;
}

.btfc-pstats-table thead th.btfc-table-sortable:hover {
    background: #0B2342;
}

.btfc-pstats-table thead th.btfc-table-sortable::after {
    opacity: 0.55;
}

.btfc-pstats-table thead th:first-child,
.btfc-pstats-table td.btfc-pstats-col-player {
    text-align: left;
}

.btfc-pstats-table th.btfc-pstats-num,
.btfc-pstats-table td.btfc-pstats-num,
.btfc-pstats-table th.btfc-pstats-col-rank,
.btfc-pstats-table td.btfc-pstats-col-rank,
.btfc-pstats-table th.btfc-pstats-col-pos,
.btfc-pstats-table td.btfc-pstats-col-pos {
    text-align: center;
}

.btfc-pstats-table tbody tr:nth-child(even) {
    background: #F4F6F8;
}

.btfc-pstats-table tbody tr:hover {
    background: #eef1f4;
}

.btfc-pstats-col-player {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 11rem;
    box-shadow: 4px 0 8px -6px rgba(7, 27, 54, 0.18);
    background: #ffffff;
}

.btfc-pstats-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #071B36;
}

.btfc-pstats-table tbody tr:nth-child(even) .btfc-pstats-col-player {
    background: #F4F6F8;
}

.btfc-pstats-table tbody tr:hover .btfc-pstats-col-player {
    background: #eef1f4;
}

.btfc-pstats-player {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.btfc-pstats-photo {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
    background: #E4E7EC;
    flex: 0 0 36px;
}

.btfc-pstats-name {
    color: #071B36;
    font-weight: 650;
    text-decoration: none;
}

.btfc-pstats-name:hover {
    color: #0B2342;
    text-decoration: underline;
}

.btfc-pstats-badge {
    display: inline-block;
    min-width: 2.1rem;
    padding: 0.12rem 0.4rem;
    border-radius: 9999px;
    background: #F4F6F8;
    color: #071B36;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.btfc-pstats-badge--gk {
    background: #e8eef6;
}

.btfc-pstats-badge--df {
    background: #e7f3ea;
}

.btfc-pstats-badge--mf {
    background: #f7f0dc;
}

.btfc-pstats-badge--fw {
    background: #f8e8e4;
}

.btfc-pstats-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin: 1rem 0 0;
}

.btfc-pstats-page {
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0 0.65rem;
    border: 1px solid #E4E7EC;
    background: #ffffff;
    color: #071B36;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.btfc-pstats-page:hover {
    border-color: #071B36;
}

.btfc-pstats-page.is-active {
    background: #071B36;
    border-color: #071B36;
    color: #ffffff;
}

.btfc-pstats-page-ellipsis {
    padding: 0 0.25rem;
    color: #6b7280;
}

.btfc-pstats-club {
    margin: 0 0 1rem;
    padding: 1rem 1.1rem 0.9rem;
    background: #071B36;
    color: #ffffff;
}

.btfc-pstats-club-title {
    margin: 0;
    font-family: var(--font-heading, 'Bebas Neue', sans-serif);
    font-size: clamp(1.7rem, 3.5vw, 2.35rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.btfc-pstats-club-title::after {
    content: "";
    display: block;
    width: 2.5rem;
    height: 3px;
    margin: 0.55rem 0 0;
    background: #F5B800;
}

.btfc-pstats-club-lede {
    margin: 0.7rem 0 0;
    max-width: 38rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #d1d5db;
}

.btfc-pstats-club .btfc-pstats-summary {
    margin: 0.65rem 0 0;
    color: #d1d5db;
}

.btfc-pstats-club .btfc-pstats-summary strong {
    color: #F5B800;
}

.btfc-pstats-table-wrap--club {
    border: 1px solid #E4E7EC;
}

.btfc-pstats-club-row--top .btfc-pstats-col-rank {
    color: #D4A000;
    font-weight: 800;
}

.btfc-pstats-col-rank.is-top {
    font-weight: 800;
}

@media (max-width: 768px) {
    .btfc-pstats-filter-row {
        grid-template-columns: 1fr;
    }

    .btfc-pstats-tabs .btfc-player-tab {
        padding: 0.7rem 0.9rem;
        font-size: 0.7rem;
    }

    .btfc-pstats-table {
        min-width: 40rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .btfc-pstats-photo {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }
}
