/* ══ BBR Public Styles v1.5 — Sandy's Spiel ════════════════
   Fix: table-layout:fixed + colgroup guarantees the headshot
   column NEVER shrinks regardless of how many players are
   added or how long names/schools/commitments get.
   Mobile: the table simply scrolls horizontally so every
   column stays a normal, readable size — no cramped stacking.
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;700;900&family=Barlow:wght@400;500;600&display=swap');

.bbr-public-wrap {
    font-family: 'Barlow', sans-serif;
    max-width: 880px;
    margin: 0 auto 40px;
}

/* ── Header ── */
.bbr-public-header {
    background: #111;
    border-radius: 14px 14px 0 0;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.bbr-pub-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 50%; flex-shrink: 0; }
.bbr-pub-header-text { display: flex; flex-direction: column; gap: 1px; }
.bbr-pub-brand { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: #CC1F1F; }
.bbr-pub-title { font-family: 'Barlow Condensed', sans-serif; font-size: 1.45rem; font-weight: 900; color: #fff; margin: 0; line-height: 1.1; }

/* ── Filter pills ── */
.bbr-public-filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px; background: #f2f2f2; border-left: 1px solid #e0e0e0; border-right: 1px solid #e0e0e0; }
.bbr-pub-pill { padding: 5px 15px; border-radius: 20px; font-family: 'Barlow', sans-serif; font-size: 12px; font-weight: 600; border: none; cursor: pointer; color: #777; background: #e0e0e0; transition: all .14s; }
.bbr-pub-pill:hover { background: #c8c8c8; color: #111; }
.bbr-pub-pill.active { background: #111; color: #fff; }

/* ── Table wrapper — scrolls horizontally on narrow screens ── */
.bbr-pub-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 14px 14px;
}

/* ══ TABLE — fixed layout so column widths never depend on
   content length or how many players are in the list ══ */
.bbr-pub-table {
    width: 100%;
    min-width: 620px;         /* ensures columns keep a readable minimum size and scroll instead of squeezing */
    border-collapse: collapse;
    table-layout: fixed;
}

/* Fixed column widths via colgroup — headshot always stays generous */
.bbr-col-rank     { width: 56px; }
.bbr-col-pos-rank { width: 56px; }
.bbr-col-photo    { width: 84px; }
.bbr-col-name     { width: 150px; }
.bbr-col-school   { width: 140px; }
.bbr-col-ht       { width: 64px; }
.bbr-col-pos      { width: 64px; }
.bbr-col-commit   { width: 150px; }

.bbr-pub-table thead th {
    background: #f7f7f7;
    padding: 10px 10px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px; font-weight: 700; letter-spacing: 1.3px;
    text-transform: uppercase; color: #999;
    text-align: left; border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}
.bbr-pub-table tbody tr { border-bottom: 1px solid #ebebeb; transition: background .1s; }
.bbr-pub-table tbody tr:last-child { border-bottom: none; }
.bbr-pub-table tbody tr:hover { background: #fafafa; }
.bbr-pub-table tbody td { padding: 10px; font-size: 13px; color: #1a1a1a; vertical-align: middle; overflow: hidden; }
.bbr-pub-table tbody tr.bbr-hidden { display: none; }

/* ── Rank cells ── */
.pub-rank, .pub-pos-rank-cell { white-space: nowrap; }
.pub-rank-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 19px; font-weight: 900; color: #CC1F1F;
    display: block; line-height: 1.2;
}
.pub-pos-rank-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px; font-weight: 700; color: #999;
    display: block;
}
.pub-riser {
    display: inline-flex; align-items: center; gap: 1px;
    background: #e6f4ea; color: #1a7a34;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px; font-weight: 700;
    padding: 1px 5px; border-radius: 4px;
    margin-top: 2px; white-space: nowrap;
}

/* ── Headshot cell — fixed, generous size that never shrinks ── */
.pub-headshot-cell { text-align: center; }
.pub-headshot {
    width: 60px; height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    display: block;
    margin: 0 auto;
}

/* ── Player name ── */
.pub-name {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── School / Height ── */
.pub-school {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pub-ht { font-size: 13px; white-space: nowrap; }

/* ── Position badge ── */
.pub-pos-cell { text-align: left; }
.pub-pos-badge {
    display: inline-block;
    padding: 3px 8px; border-radius: 5px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    white-space: nowrap;
}
.pub-pos-pg { background:#e8f0fe; color:#1a56cc; }
.pub-pos-cg { background:#dbeafe; color:#1d4ed8; }
.pub-pos-sg { background:#fce8e6; color:#c0352a; }
.pub-pos-w  { background:#e6f4ea; color:#1e7e34; }
.pub-pos-pf { background:#fff3cd; color:#856404; }
.pub-pos-c  { background:#f3e8ff; color:#6f3fa0; }

/* When filtered to a single position, the Position badge column is
   redundant — collapse its actual COLUMN WIDTH to 0 (not display:none
   on the cell, which would misalign every column after it) and give
   that reclaimed space to Commitment instead. */
.bbr-public-wrap.bbr-pos-filtered col.bbr-col-pos    { width: 0; }
.bbr-public-wrap.bbr-pos-filtered col.bbr-col-commit { width: 214px; }

.bbr-public-wrap.bbr-pos-filtered .pub-pos-cell,
.bbr-public-wrap.bbr-pos-filtered .pub-th-pos {
    padding: 0;
    border: none;
    overflow: hidden;
}
.bbr-public-wrap.bbr-pos-filtered .pub-pos-badge { visibility: hidden; }

/* ── Commitment cell ── */
.pub-commit { font-size: 13px; }
.pub-committed { color: #1a7a34; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pub-open      { color: #ccc; }

.bbr-pub-empty { text-align: center; padding: 46px 20px; color: #888; font-size: 15px; border: 1px solid #e0e0e0; border-top: none; border-radius: 0 0 14px 14px; }

/* ═══════════════════════════════════════════════════════
   MOBILE — the table stays a normal table and simply
   scrolls horizontally. Headshot and every other column
   keep the exact same size as desktop; nothing gets
   cramped, hidden, or stacked into a card.
═══════════════════════════════════════════════════════ */
@media (max-width: 640px) {

    .bbr-public-wrap { margin: 0 0 30px; }

    .bbr-public-header { padding: 12px 14px; gap: 10px; }
    .bbr-pub-logo { width: 38px; height: 38px; }
    .bbr-pub-title { font-size: 1.1rem; }
}
