/* ─── AR Football Stats 2025 v2 ──────────────────────────────────────────── */

.arfs-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    max-width: 1060px;
    margin: 0 auto;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.arfs-title {
    font-size: 21px;
    font-weight: 800;
    color: #0d2f60;
    margin: 0 0 6px;
    letter-spacing: -.02em;
}
.arfs-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0 0 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* ── Status legend ───────────────────────────────────────────────────────── */
.legend-back { color: #1a6b2a; font-weight: 600; font-size: 12px; }
.legend-grad { color: #888;    font-weight: 600; font-size: 12px; }

/* ── Search ──────────────────────────────────────────────────────────────── */
.arfs-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    max-width: 440px;
}
.arfs-search-input {
    width: 100%;
    padding: 10px 38px 10px 14px;
    font-size: 14px;
    border: 1px solid #c0c8d8;
    border-radius: 7px;
    outline: none;
    background: #f9f9f9;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
.arfs-search-input:focus {
    border-color: #1a4b8c;
    box-shadow: 0 0 0 3px rgba(26,75,140,.14);
    background: #fff;
}
.arfs-search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 11px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 20px;
    color: #aaa;
    line-height: 1;
}
.arfs-search-clear:hover { color: #444; }

/* ── Sections list ───────────────────────────────────────────────────────── */
.arfs-sections { display: flex; flex-direction: column; gap: 10px; }

/* ── Section wrapper ─────────────────────────────────────────────────────── */
.arfs-section {
    border: 1px solid #dde4f0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .2s;
}
.arfs-section.is-open { box-shadow: 0 4px 20px rgba(26,75,140,.13); }

/* ── Section click header ────────────────────────────────────────────────── */
.arfs-section-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #1a4b8c;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}
.arfs-section-header:hover         { background: #163f7a; }
.arfs-section.is-open .arfs-section-header { background: #0d2f60; }

.arfs-section-icon  { font-size: 20px; line-height: 1; }
.arfs-section-label { font-size: 15px; font-weight: 700; color: #fff; flex: 1; }

.arfs-section-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.arfs-section-count {
    font-size: 11px; font-weight: 700;
    color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.18);
    padding: 3px 9px; border-radius: 20px;
}
.arfs-back-count {
    font-size: 11px; color: #6ee08a; font-weight: 600;
    display: none;
}
.arfs-grad-count {
    font-size: 11px; color: rgba(255,255,255,.5); font-weight: 600;
    display: none;
}
@media (min-width: 560px) {
    .arfs-back-count, .arfs-grad-count { display: inline; }
}
.arfs-section-sort {
    font-size: 11px; color: rgba(255,255,255,.55); font-style: italic;
    display: none;
}
@media (min-width: 680px) { .arfs-section-sort { display: inline; } }

.arfs-chevron { font-size: 11px; color: rgba(255,255,255,.75); flex-shrink: 0; }

/* ── Filter tabs ─────────────────────────────────────────────────────────── */
.arfs-filter-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    background: #f5f7fc;
    border-bottom: 1px solid #e4e9f5;
    flex-wrap: wrap;
}
.ftab {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #c8d4ec;
    border-radius: 20px;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.ftab:hover { background: #e8f0fd; color: #1a4b8c; border-color: #1a4b8c; }
.ftab.active { background: #1a4b8c; color: #fff; border-color: #1a4b8c; }
.ftab[data-filter="back"].active { background: #1a6b2a; border-color: #1a6b2a; }
.ftab[data-filter="grad"].active { background: #666; border-color: #666; }

/* ── Expandable panel ────────────────────────────────────────────────────── */
.arfs-panel[hidden] { display: none; }
.arfs-panel { background: #fff; }
.arfs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Stats table ─────────────────────────────────────────────────────────── */
.arfs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}

/* ── Sortable headers ────────────────────────────────────────────────────── */
.arfs-table thead th {
    background: #f0f4fb;
    color: #1a4b8c;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 9px 10px;
    text-align: left;
    border-bottom: 2px solid #dde4f0;
    user-select: none;
    white-space: nowrap;
    transition: background .12s;
}
.arfs-table thead th.sortable:hover { background: #dde8f8; }
.arfs-table thead th.sort-asc,
.arfs-table thead th.sort-desc { background: #d0dff7; color: #0d2f60; }

.sort-arrow {
    display: inline-block;
    margin-left: 3px;
    font-size: 10px;
    opacity: .5;
    vertical-align: middle;
}
th.sort-asc .sort-arrow,
th.sort-desc .sort-arrow { opacity: 1; color: #0d2f60; }

/* ── Table rows ──────────────────────────────────────────────────────────── */
.arfs-table tbody tr { border-bottom: 1px solid #eef1f7; transition: background .1s; }
.arfs-table tbody tr:last-child { border-bottom: none; }

/* ── Returning players (default) ─────────────────────────────────────────── */
.row-back { background: #fff; }
.row-back:nth-child(even) { background: #f8fafc; }
.row-back:hover { background: #e8f0fd !important; }

/* ── Graduated players ───────────────────────────────────────────────────── */
.row-grad { background: #f4f4f4; }
.row-grad:nth-child(even) { background: #efefef; }
.row-grad:hover { background: #e8e8e8 !important; }
.row-grad .c-player { color: #888; }
.row-grad .c-hi     { color: #999 !important; font-weight: 600 !important; }
.row-grad .c-team   { color: #999; }

/* ── Status badges ───────────────────────────────────────────────────────── */
/* "Graduated" text in the class year column */
.cell-grad-yr {
    color: #999;
    font-style: italic;
    font-size: 11px;
}

/* ── Table cells ─────────────────────────────────────────────────────────── */
.arfs-table td { padding: 7px 10px; vertical-align: middle; }

.c-rank  { width: 36px; text-align: center; color: #bbb; font-size: 11px; font-weight: 700; }
.c-player{ min-width: 140px; font-weight: 600; color: #111; }
.c-team  { min-width: 110px; color: #1a4b8c; font-weight: 500; }
.c-cls   { width: 55px; color: #666; font-size: 12px; }
.c-yr    { width: 44px; color: #888; font-size: 12px; text-align: center; }
.c-num   { text-align: right; font-variant-numeric: tabular-nums; min-width: 50px; }
.c-gp    { color: #999; font-size: 12px; min-width: 36px; }

/* ── Highlighted stat (main column) ─────────────────────────────────────── */
.c-hi {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #0d2f60 !important;
}

/* Top 3 gold/silver/bronze */
.row-back:nth-child(1) .c-hi { color: #b8860b !important; }
.row-back:nth-child(2) .c-hi { color: #5c5c5c !important; }
.row-back:nth-child(3) .c-hi { color: #8b4513 !important; }

/* ── Panel footer ────────────────────────────────────────────────────────── */
.arfs-panel-footer {
    padding: 9px 16px;
    font-size: 11px; color: #aaa;
    text-align: right;
    border-top: 1px solid #eef1f7;
    background: #fafbfd;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
    .arfs-section-header { padding: 12px 14px; gap: 8px; }
    .arfs-section-label  { font-size: 14px; }
    .arfs-search-input   { max-width: 100%; }
    .c-yr, .c-gp,
    .arfs-table thead th.c-yr,
    .arfs-table thead th.c-gp { display: none; }
}
@media (max-width: 480px) {
    .c-cls,
    .arfs-table thead th.c-cls { display: none; }
}
