/* roster.css */

/* ROSTER HERO */
.roster-hero {
    background: linear-gradient(to right, #0a1118 0%, #1e3a8a 100%);
    padding: 3.5rem 0;
    color: var(--text-light);
    border-top: 1px solid rgba(255,255,255,0.2);
}

.roster-hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.roster-hero-sub {
    font-size: 0.85rem;
    font-weight: 800;
    color: #93c5fd;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.roster-main-title {
    font-size: clamp(2rem, 8vw, 3.2rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    margin: 0;
    line-height: 1.1;
}

.roster-hero-meta {
    font-size: 0.95rem;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.1em;
    margin-top: 0.2rem;
}

/* ==== NEW LIST VIEW CARDS (IU HOOSIERS STYLE) ==== */
.roster-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.roster-list-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.rlc-top {
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    gap: 2rem;
}

.rlc-avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.rlc-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #cbd5e1;
    overflow: hidden;
}

.rlc-number-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 28px;
    height: 28px;
    background: var(--accent-blue); /* LC Blue to match theme */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rlc-details {
    flex: 1;
}

.rlc-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-blue); /* LC Blue to match theme typography */
    margin-bottom: 0.5rem;
    text-align: left;
}

.rlc-stats {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rlc-stats strong {
    color: var(--header-bg);
    font-weight: 900;
}

.rlc-div {
    color: #cbd5e1;
    font-weight: 300;
    font-size: 0.8rem;
}

.rlc-location {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #475569;
}

.rlc-loc-top {
    font-weight: 500;
    color: #64748b;
}

.rlc-loc-top i {
    color: #94a3b8;
    margin-right: 0.25rem;
}

.rlc-loc-bot {
    font-weight: 700;
    color: var(--header-bg);
    padding-left: 1rem;
}

.rlc-action {
    display: flex;
    align-items: center;
}

.rlc-bio-link {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.rlc-bio-link:hover {
    color: var(--header-bg);
}

.rlc-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    border-top: 1px solid #e2e8f0;
    background: white; /* Same as top in image */
    border-radius: 0 0 8px 8px;
}

.rlc-socials {
    display: flex;
    gap: 1.5rem;
}

.rlc-socials a {
    color: #0f172a;
    font-size: 1rem;
    transition: color 0.2s;
}

.rlc-socials a:hover {
    color: var(--accent-blue);
}

.rlc-expand-btn {
    background: transparent;
    border: none;
    color: var(--accent-blue);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rlc-expand-btn:hover {
    transform: scale(1.1);
}

@media screen and (max-width: 900px) {
    .rlc-top {
        flex-wrap: wrap;
        padding: 1.5rem;
    }
    .rlc-location {
        flex-basis: 100%;
        margin-top: 0.5rem;
        padding-left: 6.5rem;
    }
    .rlc-action {
        display: none;
    }
}

/* ROSTER TOOLBAR */
.roster-toolbar {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.roster-toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-print {
    background-color: var(--accent-blue);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.btn-print:hover {
    background-color: #1d4ed8;
}

.roster-season-select {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--card-bg);
    outline: none;
    cursor: pointer;
}

.btn-jump-coaches {
    background-color: #e2e8f0;
    color: var(--accent-blue);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.btn-jump-coaches:hover {
    background-color: #cbd5e1;
}

.roster-view-toggles {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roster-view-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.btn-roster-view {
    background: #e2e8f0;
    color: var(--text-muted);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-roster-view:hover {
    background: #cbd5e1;
    color: var(--text-dark);
}

.btn-roster-view.active {
    background: var(--accent-blue);
    color: white;
}

/* ROSTER CONTENT WRAPPER */
.roster-content-wrapper {
    max-width: 1400px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
}

/* GRID VIEW */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.roster-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.roster-card-image-box {
    position: relative;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    height: 420px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.roster-card-bg-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 900;
    letter-spacing: -0.05em;
    pointer-events: none;
    z-index: 0;
}

.roster-card-number {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 45px;
    height: 45px;
    background-color: var(--accent-blue);
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.roster-player-img {
    height: 90%;
    width: auto;
    object-fit: contain;
    z-index: 1;
    position: relative;
}

/* Fix for placeholder images since I don't have headshots */
.placeholder-avatar {
    font-size: 14rem;
    color: #cbd5e1;
    margin-bottom: -1rem;
    z-index: 1;
}

.roster-card-nameplate {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10,17,24,0.95), transparent);
    padding: 2rem 1.5rem 1rem;
    z-index: 2;
    text-align: left;
}

.roster-player-name {
    color: white;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin: 0;
    text-align: left;
}

.roster-player-name a {
    text-align: left;
}

.roster-card-info {
    padding: 1.5rem;
    background: var(--card-bg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.roster-stats-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.roster-stat-pos {
    color: var(--accent-blue);
}

.roster-stat-divider {
    color: #cbd5e1;
    font-weight: 400;
}

.roster-location-row {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.roster-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
}

.roster-social-link {
    color: var(--text-dark);
    font-size: 1.1rem;
    transition: color 0.2s;
}

.roster-social-link:hover {
    color: var(--accent-blue);
}

/* LIST VIEW */
.roster-list {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.roster-list-header {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr 1fr 1fr 2fr;
    background-color: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.roster-list-header > div,
.roster-list-row > div {
    padding: 1rem;
    display: flex;
    align-items: center;
}

.roster-list-row {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr 1fr 1fr 2fr;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.roster-list-row:hover {
    background-color: #f1f5f9;
}

.roster-list-row:last-child {
    border-bottom: none;
}

.list-num {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--accent-blue);
    justify-content: center;
}

.list-name {
    font-weight: 800;
    color: var(--text-dark);
    font-size: 1.05rem;
    text-align: left;
}

.list-pos { color: var(--text-dark); font-weight: 600; }
.list-bt { color: var(--text-muted); font-size: 0.9rem; }
.list-ht, .list-wt { color: var(--text-muted); font-size: 0.9rem; }

/* TABLE VIEW (Detailed Stats Format matching image) */
.roster-table-wrapper {
    overflow-x: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    padding-bottom: 2rem;
}

.roster-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 900px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.roster-table th {
    background-color: var(--header-bg);
    color: white;
    padding: 1.2rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.roster-table th.rt-num {
    padding-left: 1.5rem;
    width: 50px;
}
.roster-table td.rt-num {
    padding-left: 1.5rem;
}

.roster-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #334155;
    font-weight: 500;
}

.roster-table td.rt-name {
    font-weight: 800;
    color: var(--accent-blue);
    font-size: 1.05rem;
}

.roster-table tr:last-child td {
    border-bottom: none;
}

.roster-table tr:hover td {
    background-color: #f8fafc;
}

/* COACHES SECTION */
.coaches-section {
    margin-top: 3rem;
    padding-top: 0;
}

.coaches-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--header-bg);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.coaches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.coach-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    transition: transform 0.2s;
}

.coach-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.coach-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--accent-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.coach-info h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.coach-info p {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Utilities */
@media screen and (max-width: 992px) {
    .roster-list-header, .roster-list-row {
        grid-template-columns: 60px 2fr 1fr 1fr 0fr 0fr 0fr;
    }
    .list-bt, .list-ht, .list-wt {
        display: none;
    }
}
@media screen and (max-width: 600px) {
    .btn-print {
        display: none !important;
    }
}

@media print {
    @page {
        margin: 0.5in;
        size: auto;
    }
    
    body { background-color: white !important; color: black !important; margin: 0 !important; padding: 0 !important; }
    
    .sticky-header-wrapper,
    .roster-toolbar,
    .premium-footer,
    .roster-hero-meta,
    .roster-hero-sub,
    .rt-social,
    .rt-social-icon {
        display: none !important;
    }
    
    .roster-hero { 
        padding: 1rem 0 !important; 
        color: black !important; 
        background: transparent !important; 
        border: none !important;
    }
    .roster-main-title {
        color: black !important;
        font-size: 2rem !important;
        text-align: center;
        margin-bottom: 0 !important;
    }
    
    .roster-content-wrapper { padding: 0 !important; max-width: 100% !important; margin: 0 !important; }
    
    /* Force the Table wrapper to be the only printed view */
    #wrapperRosterCard, #wrapperRosterList { display: none !important; }
    #wrapperRosterTable { display: block !important; }
    
    /* Scale Table View */
    .roster-table-wrapper {
        overflow-x: visible !important;
        width: 100% !important;
        padding-bottom: 0 !important;
    }
    .roster-table {
        width: 100% !important;
        min-width: 0 !important;
        border: 1px solid #000 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    .roster-table th, .roster-table td {
        padding: 0.5rem !important;
        font-size: 0.75rem !important;
        border-color: #ccc !important;
        color: black !important;
    }
    .roster-table th {
        background: #f8fafc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Scale Coach Table */
    .coaches-section { margin-top: 1.5rem !important; }
    .coaches-title { font-size: 1.25rem !important; color: black !important; margin-bottom: 1rem !important; }
}

/* ── Card hover lift ── */
.roster-card { transition: transform .22s ease, box-shadow .22s ease; position: relative; }
.roster-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,.13); }

/* ── Full-card cover link ── */
.roster-card-link {
    position: absolute;
    inset: 0;
    z-index: 10;
    border-radius: 8px;
}
/* Elements that need to remain clickable above the cover link */
.roster-card .roster-social-link,
.roster-card .roster-card-footer a {
    position: relative;
    z-index: 11;
}

/* ── College Commitment badge (card & list views) ── */
.player-commitment {
    display: inline-flex; align-items: center; gap: .35rem;
    background: rgba(37,99,235,.09); color: #1e40af;
    border: 1px solid rgba(37,99,235,.22);
    padding: .22rem .65rem; border-radius: 99px;
    font-size: .76rem; font-weight: 700; margin-top: .35rem; white-space: nowrap;
}
.player-commitment i { font-size: .72rem; }

/* ── List card hover ── */
.roster-list-card { transition: box-shadow .2s, transform .2s; }
.roster-list-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.09); transform: translateY(-2px); }

/* ── Table: new column sizes ── */
.roster-table .rt-commit { min-width: 160px; }
.roster-table .rt-social { width: 72px; text-align: center; }

/* ── Table: sortable headers ── */
.roster-table th[data-sort] { cursor: pointer; -webkit-user-select: none; user-select: none; }
.roster-table th[data-sort]:hover { background-color: #1e3a8a; }
.sort-icon { opacity: .45; font-size: .68rem; margin-left: .3rem; vertical-align: middle; }

/* ── Table: commitment badge ── */
.commitment-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    background: rgba(37,99,235,.09); color: #1e40af;
    border: 1px solid rgba(37,99,235,.22);
    padding: .2rem .6rem; border-radius: 99px;
    font-size: .77rem; font-weight: 700; white-space: nowrap;
}
.commitment-badge i { font-size: .72rem; }
.no-commitment { color: #cbd5e1; }

/* ── Table: zebra striping & improved hover ── */
.roster-table tbody tr:nth-child(even) td { background-color: #f8fafc; }
.roster-table tbody tr:hover td { background-color: #eff6ff !important; }

/* ── Table: social icon links ── */
.rt-social-icon { color: #94a3b8; font-size: 1.05rem; margin: 0 .22rem; transition: color .2s; }
.rt-social-icon:hover { color: #2563eb; }
