/* ==============================================
   Featured Roster Component  [ch_featured_roster]
   2 rows × 3 columns of portrait player cards
   ============================================== */

.ch-featured-roster {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* ── Player Card ──────────────────────────────── */
.ch-featured-player-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    isolation: isolate;

    /* Headshot applied lazily via JS (data-headshot → --headshot).
       Shimmer runs until the image is loaded. */
    background-color: var(--surface);
    background-image: var(--headshot, none);
    animation: ch-frp-shimmer 1.6s ease-in-out infinite;
    background-size: cover;
    background-position: center 10%; /* keeps face near top of frame */

    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Stop shimmer once the image is set */
.ch-featured-player-card[style] {
    animation: none;
}

@keyframes ch-frp-shimmer {
    0%   { background-color: var(--surface); }
    50%  { background-color: var(--surface-raised); }
    100% { background-color: var(--surface); }
}

.ch-featured-player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.60);
}

/* Dark gradient overlay — above photo, below content */
.ch-featured-player-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.62) 38%,
        rgba(0, 0, 0, 0.20) 65%,
        transparent 100%
    );
    transition: background 0.30s ease;
}

.ch-featured-player-card:hover::before {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.98) 0%,
        rgba(0, 0, 0, 0.74) 43%,
        rgba(0, 0, 0, 0.30) 72%,
        transparent 100%
    );
}

/* Green accent bar — slides in from left on hover */
.ch-featured-player-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--secondary);
    z-index: 3;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.30s ease;
}

.ch-featured-player-card:hover::after {
    transform: scaleX(1);
}

/* ── Jersey Number — large background watermark ── */
.ch-frp-number {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    font-family: var(--font-sans);
    font-size: clamp(40px, 5vw, 60px);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    color: rgba(255, 255, 255, 0.76);
    user-select: none;
    transition: color 0.25s ease;
}

.ch-featured-player-card:hover .ch-frp-number {
    color: rgba(255, 255, 255, 0.30);
}

/* ── Bottom Content Block ─────────────────────── */
.ch-frp-body {
    position: relative;
    z-index: 2;
    padding: 14px 16px 16px;
}

/* Position badge + hometown/year row */
.ch-frp-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    min-height: 20px;
}

.ch-frp-pos {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--on-secondary);
    background: var(--secondary);
    padding: 2px 8px 1px;
    border-radius: 3px;
    line-height: 1.7;
    flex-shrink: 0;
}

.ch-frp-detail {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Player name */
.ch-frp-name {
    font-family: var(--font-sans);
    font-size: clamp(18px, 2.1vw, 24px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    line-height: 1;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}

.ch-featured-player-card:hover .ch-frp-name {
    color: var(--secondary);
}

/* ── Stats Row ────────────────────────────────── */
.ch-frp-stats {
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    padding-top: 10px;
}

.ch-frp-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 4px;
    position: relative;
}

/* Dividers between stat cells */
.ch-frp-stat + .ch-frp-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12%;
    height: 76%;
    width: 1px;
    background: rgba(255, 255, 255, 0.09);
}

.ch-frp-stat-val {
    display: block;
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 3px;
}

/* Center stat gets larger + team-color treatment */
.ch-frp-stat--highlight .ch-frp-stat-val {
    font-size: 26px;
    color: var(--secondary);
}

.ch-frp-stat-lbl {
    display: block;
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.32);
}

.ch-frp-stat--highlight .ch-frp-stat-lbl {
    color: rgba(255, 255, 255, 0.48);
}

/* ── Empty / Placeholder State ────────────────── */
.ch-featured-roster--empty {
    display: block; /* override the grid for the single-item placeholder */
}

.ch-frp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 52px 32px;
    text-align: center;
}

.ch-frp-empty-icon {
    color: var(--text-faint);
    margin-bottom: 20px;
    opacity: 0.55;
}

.ch-frp-empty-title {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0 0 8px;
}

.ch-frp-empty-text {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-faint);
    max-width: 360px;
    line-height: 1.65;
    margin: 0;
}
