﻿:root {
    --ff-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    --c-text: #0f172a; /* slate-900 */
    --c-muted: #64748b; /* slate-500 */
    --c-soft: #e2e8f0; /* slate-200 */
    --c-head: #f1f5f9; /* slate-100 */
    --c-blue: #2563eb; /* brand blue */
    --c-green: #16a34a; /* winner bar */
    --c-row: #ffffff;
}

/* =========================================================
   MATCHUP PAGE (existing)
   ========================================================= */
.matchup-wrap {
    font-family: var(--ff-sans);
    color: var(--c-text);
}

.matchup-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    margin: 8px 0 14px;
}

.score-block {
    display: flex;
    align-items: center;
    gap: 16px;
}

.team-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0,0,0,.2);
}

.totals {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    padding: .5rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--c-soft);
    font-weight: 700;
}

.total-num {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1;
}

.total-vs {
    font-weight: 700;
    color: var(--c-muted);
}

.side .team-name {
    font-size: 28px;
    font-weight: 800;
    color: #1266d4;
}

.side .team-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #7a7a7a;
}

@media (max-width: 576px) {
    .team-logo {
        width: 48px;
        height: 48px;
    }

    .total-num {
        font-size: 22px;
    }

    .matchup-header {
        gap: 12px;
    }
}

.winbar {
    height: 6px;
    margin: .5rem 0 1rem;
    border-radius: 9999px;
    background: linear-gradient(to right, var(--c-green) 50%, var(--c-soft) 50%);
}
.match-row-link {
    cursor: pointer;
}

    .match-row-link:hover {
        background: #f9fbff;
    }

/* Center-positions table */
.matchup-table {
    table-layout: fixed;
    width: 100%;
    background: var(--c-row);
    border: 1px solid var(--c-soft);
    border-radius: .5rem;
    overflow: hidden;
}

    .matchup-table thead th {
        background: var(--c-head);
        border-bottom: 1px solid var(--c-soft);
    }

    .matchup-table th, .matchup-table td {
        padding: .65rem .75rem;
        vertical-align: middle;
    }

.pos-col {
    width: 6rem;
    text-align: center;
    font-weight: 800;
    color: #111827;
}

.pts-left {
    width: 5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.pts-right {
    width: 5rem;
    text-align: left;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.name-left {
    padding-right: .5rem;
}

.name-right {
    padding-left: .5rem;
    text-align: right;
}

.player-name {
    font-weight: 800;
}

.player-sub {
    color: var(--c-muted);
    font-size: .9rem;
}

.row-sep tbody tr + tr td {
    border-top: 1px solid var(--c-soft);
}

@media (max-width: 768px) {
    .team-name {
        font-size: 1.35rem;
    }

    .total-num {
        font-size: 1.75rem;
    }

    .pos-col {
        width: 4.5rem;
    }

    .pts-left, .pts-right {
        width: 4rem;
    }
}

/* =========================================================
   TEAM ROSTER — HEADER (Yahoo-style)
   ========================================================= */
.ff-team-header {
    font-family: var(--ff-sans);
    display: grid;
    grid-template-columns: 1fr auto; /* left block + right tile */
    align-items: center;
    gap: 20px;
    margin: 14px 0 18px;
    padding: 18px 22px; /* a bit more air */
    background: #f7fafc;
    border: 1px solid #e7edf3;
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(16,24,40,.02);
}

.ff-team-header-left {
    display: grid;
    grid-template-columns: 56px 1fr; /* avatar + text */
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.ff-team-id {
    flex: 0 0 auto;
}

.ff-team-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 2px solid #eef1f6;
    display: block;
}

.ff-team-meta {
    min-width: 0;
    line-height: 1.1;
}

.ff-team-title {
    margin: 0;
    font-weight: 900;
    font-size: 44px; /* big title like Yahoo */
    letter-spacing: -.02em;
    color: #0f172a;
}

.ff-team-sub {
    margin-top: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #6b7280;
    font-size: 18px; /* larger meta line */
}

.ff-dot {
    color: #cbd5e1;
}

/* responsive downsizing */
@media (max-width:900px) {
    .ff-team-title {
        font-size: 36px;
    }

    .ff-team-sub {
        font-size: 16px;
    }
}

@media (max-width:640px) {
    .ff-team-title {
        font-size: 30px;
    }

    .ff-team-sub {
        font-size: 15px;
    }
}

/* =========================================================
   TEAM ROSTER — MATCHUP TILE (clickable card)
   ========================================================= */
.ff-matchup-tile {
    --tile-bg: #fff;
    --tile-brd: #e7edf3;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: 360px;
    max-width: 100%;
    text-decoration: none;
    color: inherit;
    background: var(--tile-bg);
    border: 1px solid var(--tile-brd);
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(16,24,40,.02);
}

    .ff-matchup-tile.hoverable:hover {
        box-shadow: 0 6px 18px rgba(2,6,23,.08);
        transform: translateY(-1px);
        transition: box-shadow .18s ease, transform .18s ease;
    }

.ff-tile-title {
    padding: 10px 12px 6px;
    font-weight: 800;
    font-size: 14px;
    color: #0f172a;
}

.ff-tile-body {
    margin: 0 10px;
    padding: 8px 10px;
    background: #f1f5f9;
    border: 1px solid var(--tile-brd);
    border-radius: 10px;
}

.ff-tilerow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

.ff-tilerow-side {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ff-tilerow-side--right {
    justify-content: flex-end;
}

.ff-tile-avatar,
.ff-tile-avatar--placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 2px solid #e7edf3;
}

.ff-tile-avatar--placeholder {
    background: radial-gradient(#e5e7eb 40%, #f3f4f6 41%);
}

.ff-tile-score {
    display: grid;
    gap: 2px;
}

.ff-score {
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.ff-proj {
    font-size: 14px;
    color: #64748b;
}

.text-danger {
    color: #dc2626;
}

.ff-tilerow-center {
    font-weight: 800;
    color: #6b7280;
}

.ff-tile-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    color: #6b7280;
}

.ff-tile-cta {
    color: #2563eb;
    font-weight: 700;
}

/* =========================================================
   TEAM ROSTER — TABLE (updated; rounded headshots)
   ========================================================= */
.ff-roster {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    overflow: hidden;
    font-family: var(--ff-sans);
    font-size: 15px;
}

    .ff-roster thead th {
        background: #f8fafc;
        color: #637381;
        font-weight: 700;
        padding: 12px 14px;
        border-bottom: 1px solid #e6e6e6;
        white-space: nowrap;
    }

    .ff-roster tbody td {
        padding: 12px 14px;
        border-bottom: 1px solid #f0f3f6;
        vertical-align: middle;
    }

    .ff-roster tbody tr:hover td {
        background: #f9fbff;
    }

/* player cell */
.ff-player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ff-headshot,
.ff-headshot--placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%; /* <- round */
    object-fit: cover;
    border: 2px solid #e7eaf3;
    background: #fff;
    flex: 0 0 48px;
}

.ff-headshot--placeholder {
    background: #eef2f7;
    border-color: #eef2f7;
}

.ff-player-text {
    display: grid;
    line-height: 1.05;
}

.ff-player-name, .ff-player-name a {
    color: #0b57d0;
    font-weight: 700;
    text-decoration: none;
}

    .ff-player-name a:hover {
        text-decoration: underline;
    }

.ff-player-sub {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
}

/* table column helpers (same widths you used) */
.col-sel {
    width: 86px;
    color: #475569;
    font-weight: 600;
}

.col-player {
    min-width: 320px;
}

.col-pos {
    width: 90px;
    color: #334155;
    text-align: center;
}

.col-nfl {
    width: 90px;
    color: #334155;
    text-align: center;
}

.col-pts {
    width: 90px;
    font-weight: 700;
    text-align: right;
}

/* small tweaks */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* Responsive roster tweaks */
@media (max-width: 720px) {
    .ff-team-title {
        font-size: 24px;
    }

    .col-nfl {
        display: none;
    }

    .col-pos {
        width: 64px;
    }

    .ff-headshot, .ff-headshot--placeholder {
        width: 40px;
        height: 40px;
    }
}

/* Optional narrow container helper */
.container-narrow {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 16px;
    .filters-bar

{
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.filters-left {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.actions-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-form {
    display: inline-block;
    margin: 0;
}

.btn {
    padding: 6px 14px;
}
/* container */
.matchups-toolbar { position: relative; }

/* pill with arrows + label */
.week-switch{
  display:inline-flex; align-items:center; gap:.65rem;
  padding:.25rem .5rem; border-radius:.75rem;
  background: var(--card-bg); /* stays neutral on white pages, dark on themed */
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.week-label{ font-weight:700; letter-spacing:.2px; color: var(--text); }

/* circular chevron buttons */
.nav-chip{
  width:36px; height:36px; border-radius:999px;
  display:grid; place-items:center; text-decoration:none;
  border:1px solid var(--team-accent);
  background:#fff;
}
.theme .nav-chip{ background: var(--card-bg); }

.nav-chip:hover{ background: var(--team-accent-100); }
.nav-chip.disabled{ opacity:.35; pointer-events:none; }

.nav-chip svg{
  width:18px; height:18px; stroke: var(--team-accent);
  stroke-width:2.2; fill:none;
}

@media (max-width:576px){
  .week-switch{ gap:.45rem; }
  .nav-chip{ width:32px; height:32px; }
}
