/* ============================================================
   FMRP Roster — Table & Filter Styles
   Styled to match the Google Sheets aesthetic, elevated with FMRP brand
   ============================================================ */

/* ─── Roster Page Layout ─────────────────────────────────── */
.roster-page {
    padding: 2rem 0 4rem;
}

.roster-header {
    text-align: center;
    padding: 2rem 2rem 1.5rem;
    position: relative;
}

.roster-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.roster-badge {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(255, 140, 66, 0.3));
}

.roster-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 4px;
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.roster-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.roster-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ─── Filter Bar ─────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    max-width: 1600px;
    margin: 0 auto 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    margin-right: 0.25rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.filter-pill:hover {
    background: rgba(255, 140, 66, 0.1);
    border-color: rgba(255, 140, 66, 0.3);
    color: var(--text-light);
}

.filter-pill.active {
    background: rgba(255, 140, 66, 0.15);
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    font-weight: 600;
}

.filter-pill-count {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.filter-pill.active .filter-pill-count {
    background: rgba(255, 140, 66, 0.25);
}

/* ─── Search Bar ─────────────────────────────────────────── */
.search-bar {
    max-width: 1600px;
    margin: 0 auto 1rem;
    padding: 0 2rem;
}

.search-input-wrap {
    position: relative;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    color: var(--text-light);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: rgba(255, 140, 66, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.9rem;
}

/* ─── Roster Table ───────────────────────────────────────── */
.roster-table-wrap {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.roster-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
    min-width: 800px;
}

/* Column header row */
.roster-table thead th {
    position: sticky;
    top: 70px;
    background: rgba(6, 15, 29, 0.98);
    backdrop-filter: blur(10px);
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-orange);
    border-bottom: 2px solid rgba(255, 140, 66, 0.3);
    white-space: nowrap;
    z-index: 20;
}

.roster-table thead th.col-checkbox {
    text-align: center;
    width: 50px;
}

.roster-table thead th.col-id {
    width: 60px;
}

.roster-table thead th.col-status {
    width: 110px;
}

/* Section headers */
.section-row td {
    background: linear-gradient(90deg, rgba(255, 140, 66, 0.12) 0%, rgba(13, 127, 255, 0.08) 100%);
    border-top: 1px solid rgba(255, 140, 66, 0.2);
    border-bottom: 1px solid rgba(255, 140, 66, 0.2);
    padding: 0.6rem 0.75rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--primary-orange);
    text-align: center;
}

/* Data rows */
.roster-table tbody tr {
    transition: background 0.15s ease;
}

.roster-table tbody tr:not(.section-row):hover {
    background: rgba(255, 140, 66, 0.04);
}

.roster-table tbody tr:not(.section-row):nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.roster-table tbody tr:not(.section-row):nth-child(even):hover {
    background: rgba(255, 140, 66, 0.04);
}

.roster-table tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

/* Vacant rows */
.roster-table tbody tr.row-vacant td {
    color: var(--text-muted);
    opacity: 0.5;
    font-style: italic;
}

/* Cell types */
.cell-id {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--light-blue);
}

.cell-name {
    font-weight: 600;
    color: var(--text-light);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-rank {
    font-weight: 500;
    color: var(--text-muted);
}

.cell-notes {
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-date {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.cell-phone {
    font-family: 'Outfit', monospace;
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.cell-discord {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Checkbox cells */
.cell-check {
    text-align: center;
}

.check-mark {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 0.75rem;
    color: #00CC00;
}

.check-empty {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

/* ─── Status Badges ──────────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    color: var(--s-color, #808080);
    background: var(--s-bg, transparent);
    border: 1px solid var(--s-color, #808080);
    text-shadow: 0 0 6px var(--s-color, transparent);
}

/* ─── Mobile Responsive ──────────────────────────────────── */
@media (max-width: 1200px) {
    .roster-table-wrap {
        padding: 0 0.5rem;
    }

    .filter-bar {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 768px) {
    .roster-header-inner {
        flex-direction: column;
        gap: 0.75rem;
    }

    .roster-badge {
        width: 48px;
        height: 48px;
    }

    .roster-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-input-wrap {
        max-width: 100%;
    }
}
