/**
 * Player Gamelog Library CSS Styles
 * Matches the dark theme of the existing player-statistics library
 */

.gamelog-library {
    margin-bottom: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gamelog-library.dark-theme {
    color: #e2e8f0;
}

/* Header - Integrated into table module */
.gamelog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 15px 20px;
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid #3f3f46;
    border-bottom: 2px solid #374151;
    border-radius: 8px 8px 0 0;
}

.gamelog-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
}

.gamelog-actions {
    display: flex;
    gap: 10px;
}

.view-all-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-all-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

/* Season Summary */
.season-summary {
    background: rgba(30, 30, 46, 0.6);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #3f3f46;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
}

.summary-stat {
    text-align: center;
}

.summary-stat .stat-label {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-stat .stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

/* Table Container - Connected to header */
.gamelog-table-container {
    background: rgba(30, 30, 46, 0.6);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    border: 1px solid #3f3f46;
    border-top: none;
}

/* Table */
.gamelog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.gamelog-table th {
    background: #4a5568;
    color: #ffffff;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #3f3f46;
}

.gamelog-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #3f3f46;
    color: #e2e8f0;
}

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

.gamelog-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Match Row Result Colors - Scoped to gamelog library */
.gamelog-library .gamelog-table .gamelog-match-row.result-win {
    background: rgba(34, 197, 94, 0.1);
}

.gamelog-library .gamelog-table .gamelog-match-row.result-loss {
    background: rgba(239, 68, 68, 0.1);
}

.gamelog-library .gamelog-table .gamelog-match-row.result-draw {
    background: rgba(245, 158, 11, 0.1);
}

/* Specific Column Styles - Scoped to gamelog library */
.gamelog-library .gamelog-table .gamelog-match-date .match-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.gamelog-library .gamelog-table .gamelog-match-date .match-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.gamelog-library .gamelog-table .gamelog-opponent {
    text-align: center;
    max-width: 120px;
}

.gamelog-library .gamelog-table .gamelog-venue-indicator {
    color: #9ca3af;
    margin-right: 4px;
    font-weight: 600;
}

.gamelog-library .gamelog-table .gamelog-opponent-name {
    font-weight: 500;
}

.gamelog-library .gamelog-table .gamelog-result {
    font-weight: 600;
}

.gamelog-library .gamelog-table .gamelog-result-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    line-height: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
}

.gamelog-library .gamelog-table .gamelog-result-indicator.result-win {
    background: #10b981;
    color: white;
}

.gamelog-library .gamelog-table .gamelog-result-indicator.result-loss {
    background: #ef4444;
    color: white;
}

.gamelog-library .gamelog-table .gamelog-result-indicator.result-draw {
    background: #f59e0b;
    color: white;
}

.gamelog-library .gamelog-table .gamelog-score {
    color: #9ca3af;
    font-size: 12px;
}

.gamelog-library .gamelog-table .gamelog-rating {
    font-weight: 600;
    color: #60a5fa;
}

.gamelog-library .gamelog-table .gamelog-goals, 
.gamelog-library .gamelog-table .gamelog-assists {
    font-weight: 600;
}

.gamelog-library .gamelog-table .gamelog-goals {
    color: #10b981;
}

.gamelog-library .gamelog-table .gamelog-assists {
    color: #8b5cf6;
}

.gamelog-library .gamelog-table .gamelog-yellow-cards {
    color: #fbbf24;
}

.gamelog-library .gamelog-table .gamelog-red-cards {
    color: #ef4444;
}

/* Loading and Error States */
.gamelog-loading, .gamelog-error, .no-matches {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-style: italic;
}

.gamelog-error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
    margin: 10px 0;
}

/* Mobile Responsive - Scoped to gamelog library */
@media (max-width: 768px) {
    .gamelog-library .gamelog-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .gamelog-library .gamelog-title {
        font-size: 20px;
    }
    
    .gamelog-library .summary-stats {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 15px;
    }
    
    .gamelog-library .summary-stat .stat-value {
        font-size: 16px;
    }
    
    .gamelog-library .gamelog-table {
        font-size: 12px;
    }
    
    .gamelog-library .gamelog-table th,
    .gamelog-library .gamelog-table td {
        padding: 8px 4px;
    }
    
    .gamelog-library .gamelog-table th {
        font-size: 10px;
    }
    
    .gamelog-library .gamelog-table .gamelog-opponent {
        max-width: 80px;
    }
    
    .gamelog-library .gamelog-table .gamelog-opponent-name {
        font-size: 11px;
    }
    
    .gamelog-library .gamelog-table .gamelog-result-indicator {
        width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 10px;
        margin-right: 4px;
    }
    
    .gamelog-library .gamelog-table .gamelog-score {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .gamelog-library .gamelog-table th:nth-child(n+8),
    .gamelog-library .gamelog-table td:nth-child(n+8) {
        display: none;
    }
    
    .gamelog-library .summary-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}