/**
 * Player List Filter Styles - Ice Hockey Theme
 * Version: 2.5.0 - Themed to match event pages
 * Colors: Navy Blue header, Light gray alternating rows, Red accents
 */

/* ==================== Filter Container ==================== */
.player-list-filters {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Filter Group */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Select Dropdown */
.filter-select {
    padding: 10px 15px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    font-weight: 500;
}

.filter-select:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Reset Button - RED THEME */
.filter-reset {
    padding: 10px 24px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
    border-radius:8px !important;
}

.filter-reset:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    color:white !important;
}

.filter-reset:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

/* Player Count */
.player-count {
    width: 100%;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 2px solid #e2e8f0;
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    text-align: center;
}

/* ==================== Table Styling ==================== */
.tiha-player-list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border:1px solid #fcfcfc;
}

/* Table Header - NAVY BLUE THEME */
.tiha-player-list thead {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.tiha-player-list thead th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.tiha-player-list thead th:first-child {
    border-top-left-radius: 12px;
}

.tiha-player-list thead th:last-child {
    border-top-right-radius: 12px;
}

/* Table Body - Striped Gray Rows with Subtle Bottom Border */
.tiha-player-list tbody td {
    padding: 14px 12px;
    border: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    font-size: 14px;
    color: #1e293b;
}

.tiha-player-list tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.tiha-player-list tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.tiha-player-list tbody tr:last-child td {
    border-bottom: none;
}

.tiha-player-list tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.tiha-player-list tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* Player Name Link - RED THEME */
.tiha-player-list .player-name a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.tiha-player-list .player-name a:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* Hover Effect on Rows */
.tiha-player-list tbody tr.player-row {
    transition: all 0.3s ease;
}

.tiha-player-list tbody tr.player-row:hover {
    background-color: #eff6ff !important;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* ==================== Sortable Columns ==================== */
.tiha-player-list thead th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 30px;
    transition: background-color 0.2s ease;
}

.tiha-player-list thead th.sortable:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Sort Indicators - WHITE/GRAY ARROWS */
.tiha-player-list thead th.sortable::after {
    content: "⇅";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 16px;
    color: #e2e8f0;
}

.tiha-player-list thead th.sortable.sort-asc::after {
    content: "▲";
    opacity: 1;
    color: #ffffff;
    font-size: 12px;
}

.tiha-player-list thead th.sortable.sort-desc::after {
    content: "▼";
    opacity: 1;
    color: #ffffff;
    font-size: 12px;
}

/* ==================== Loading & Error States ==================== */
.filter-loading {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #93c5fd;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #1e3a8a;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.filter-loading::before {
    content: "⏳ ";
    margin-right: 8px;
}

.filter-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #fca5a5;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #991b1b;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.filter-error::before {
    content: "⚠️ ";
    margin-right: 8px;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .player-list-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .filter-reset {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    
    /* Responsive table */
    .tiha-player-list {
        font-size: 12px;
        border-radius: 8px;
    }
    
    .tiha-player-list thead th,
    .tiha-player-list tbody td {
        padding: 10px 6px;
    }
    
    .tiha-player-list thead th.sortable {
        padding-right: 24px;
    }
    
    .tiha-player-list thead th.sortable::after {
        right: 6px;
        font-size: 14px;
    }
}

/* ==================== Animation ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.player-list-filters {
    animation: fadeInUp 0.4s ease;
}

.tiha-player-list {
    animation: fadeInUp 0.5s ease 0.1s backwards;
}

/* Hidden data script */
.player-list-data {
    display: none !important;
}

/* ==================== Table Row Fade Effect ==================== */
.tiha-player-list tbody tr.player-row[style*="display: none"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ==================== Number Column Styling ==================== */
.tiha-player-list .player-number {
    font-weight: 700;
    color: #1e40af;
    font-size: 15px;
}

/* ==================== Position Badge ==================== */
.tiha-player-list .player-position {
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}