/**
 * Shared archive chrome for Records + Archive Overview.
 *
 * Frame only: section titles, panels, ranked lists, navy data tables.
 * Page-specific layouts stay in each page stylesheet.
 *
 * @package BTFC_Stats
 */

/* -------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------- */

.btfc-archive-section {
    margin: 0 0 1.5rem;
}

.btfc-archive-section-title {
    margin: 0 0 0.75rem;
    font-family: var(--font-heading, inherit);
    font-size: 1.35rem;
    font-weight: var(--font-weight-normal, 400);
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--color-primary);
}

.btfc-archive-section-title::after {
    content: "";
    display: block;
    width: 2.25rem;
    height: 3px;
    margin: 0.4rem 0 0;
    background: var(--color-secondary);
}

/* -------------------------------------------------------------------------
   Panels
   ------------------------------------------------------------------------- */

.btfc-archive-panel {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    box-shadow: 0 1px 4px rgba(7, 27, 54, 0.06);
    min-width: 0;
}

.btfc-archive-card-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-heading, inherit);
    font-size: 1.15rem;
    font-weight: var(--font-weight-normal, 400);
    letter-spacing: 0.06em;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--color-primary);
}

.btfc-archive-card-title::after {
    content: "";
    display: block;
    width: 1.75rem;
    height: 2px;
    margin: 0.35rem 0 0;
    background: var(--color-secondary);
}

.btfc-archive-link {
    color: var(--color-primary);
    text-decoration: none;
}

.btfc-archive-link:hover {
    color: var(--color-secondary-dark);
}

/* -------------------------------------------------------------------------
   Ranked lists (Team / Player records)
   ------------------------------------------------------------------------- */

.btfc-archive-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.btfc-archive-rank-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-gray-200);
}

.btfc-archive-rank-row:last-child {
    border-bottom: none;
}

.btfc-archive-rank {
    flex-shrink: 0;
    width: 1.35rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--color-secondary);
    padding-top: 0.08rem;
}

.btfc-archive-rank-copy {
    flex: 1;
    min-width: 0;
}

.btfc-archive-rank-main {
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.3;
    color: var(--color-primary);
}

.btfc-archive-rank-meta {
    margin-top: 0.12rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--color-gray-500);
}

.btfc-archive-rank-value {
    flex-shrink: 0;
    min-width: 2.4rem;
    text-align: right;
    font-family: var(--font-heading, inherit);
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--color-primary);
}

/* -------------------------------------------------------------------------
   Data tables (navy header — archive identity, not .btfc-table)
   ------------------------------------------------------------------------- */

.btfc-archive-table-wrap {
    overflow-x: auto;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    box-shadow: 0 1px 4px rgba(7, 27, 54, 0.06);
    -webkit-overflow-scrolling: touch;
}

.btfc-archive-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.btfc-archive-table th,
.btfc-archive-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--color-gray-200);
    white-space: nowrap;
    vertical-align: middle;
}

.btfc-archive-table thead th {
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.btfc-archive-table tbody tr:nth-child(even) {
    background: var(--color-gray-100);
}

.btfc-archive-table tbody tr:hover {
    background: #eef1f4;
}

/* Sticky first column — only where the table is wide enough to need it. */

.btfc-archive-table--sticky-first > thead th:first-child,
.btfc-archive-table--sticky-first > tbody th:first-child,
.btfc-archive-table--sticky-first > tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 4px 0 8px -6px rgba(7, 27, 54, 0.18);
}

.btfc-archive-table--sticky-first > thead th:first-child {
    z-index: 2;
    background: var(--color-primary);
}

.btfc-archive-table--sticky-first > tbody th:first-child,
.btfc-archive-table--sticky-first > tbody td:first-child {
    background: var(--color-white);
}

.btfc-archive-table--sticky-first > tbody tr:nth-child(even) th:first-child,
.btfc-archive-table--sticky-first > tbody tr:nth-child(even) td:first-child {
    background: var(--color-gray-100);
}

.btfc-archive-table--sticky-first > tbody tr:hover th:first-child,
.btfc-archive-table--sticky-first > tbody tr:hover td:first-child {
    background: #eef1f4;
}
