/**
 * Players List Template - Premium Cards Layout CSS
 * 
 * This template uses shared CSS for colors, spacing, and components.
 * This file ONLY contains unique layouts and specific overrides.
 * 
 * RESPONSIVE BREAKPOINTS: Uses standardized values from breakpoints.css
 * - Mobile and smaller: max-width: 768px
 * - Small mobile only: max-width: 480px
 * 
 * @package BTFC_Stats
 */

/* ============================================================================
   SECTION 1: BASE CONTAINER & LAYOUT
   ============================================================================
   Description: Main template container with max-width and font settings
   ============================================================================ */

/* Container uses .btfc-container-responsive from breakpoints.css (max-width: 1200px) */

/* ============================================================================
   SECTION 1.5: POSITION HEADER LAYOUT
   ============================================================================
   Description: Position title and player count on same line
   ============================================================================ */

.btfc-box-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.btfc-position-title {
    margin: 0;
    flex: 1;
}


.btfc-position-count {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

/* ============================================================================
   SECTION 2: HEADER ROW & TITLE
   ============================================================================
   Description: Header layout with controls, title, and results count on blue 
   gradient background
   ============================================================================ */

/* Header row layout - controls + title + count */
.btfc-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-5);
    padding: var(--space-5);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 12px;
    margin-bottom: var(--space-5);
}

/* Title styling for blue background - h1 style */
.btfc-cards-title {
    color: var(--color-white);
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--font-size-4xl);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.2;
}

/* ============================================================================
   SECTION 3: CONTROL GROUP & RESULTS COUNT
   ============================================================================
   Description: Season/position filter controls and results count display
   within header row
   ============================================================================ */

/* Control group styling within header */
.btfc-cards-header .btfc-control-group {
    min-width: 200px;
}

/* Use shared form select, override for white-on-blue header appearance */
.btfc-cards-header .btfc-control-select {
    background-color: var(--color-overlay-light);
    border-color: transparent;
    font-weight: var(--font-weight-medium);
    border-radius: 8px;
}

.btfc-cards-header .btfc-control-select:hover {
    background-color: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btfc-cards-header .btfc-control-select:focus {
    background-color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Results count styling */
.btfc-results-count {
    color: var(--color-text-inverse);
    opacity: var(--opacity-90);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

/* ============================================================================
   SECTION 4: GRID LAYOUTS
   ============================================================================
   Description: Grid layouts for player cards, managers grid, and cards container
   ============================================================================ */

/* Cards grid - uses .btfc-grid-reverse-3col from breakpoints.css (3→2→1 columns) */

/* Cards container - positions stack vertically */
.btfc-cards-container {
    display: flex;
    flex-direction: column;
}

/* Managers grid */
.btfc-managers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ============================================================================
   SECTION 5: PLAYER CARD CONTENT LAYOUT
   ============================================================================
   Description: Player card component styling is now in box-base.css
   (.btfc-box-player-card and related classes)
   ============================================================================ */

/* ============================================================================
   SECTION 6: MANAGER-SPECIFIC LAYOUTS
   ============================================================================
   Description: Stats grid layouts specific to managers and player-managers
   ============================================================================ */

/* Manager stats - 3-column grid */
.btfc-manager-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-md);
    margin-bottom: var(--space-5);
}

.btfc-manager-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.btfc-manager-stat-value {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    line-height: 1.2;
}

.btfc-manager-stat-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    margin-top: var(--space-1);
}

/* Player-manager dual role stats - 2-column grid */
.btfc-player-manager-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-md);
    margin-bottom: var(--space-5);
}

.btfc-player-manager-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.btfc-player-manager-stat-value {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    line-height: 1.2;
}

.btfc-player-manager-stat-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    margin-top: var(--space-1);
}

/* Manager actions */
.btfc-manager-actions {
    display: flex;
    justify-content: center;
}

/* ============================================================================
   SECTION 7: PLAYER SPONSOR & ACTIONS
   ============================================================================
   Description: Sponsor and action styling now in box-base.css
   (.btfc-box-player-card .btfc-player-card-sponsor and .btfc-player-card-actions)
   ============================================================================ */

/* ============================================================================
   SECTION 8: RESPONSIVE DESIGN
   ============================================================================
   Description: Media queries for tablet and mobile devices. Adjusts grid layouts,
   header stacking, player card sizing, and manager stats for optimal viewing
   
   STANDARD BREAKPOINTS (from breakpoints.css):
   - Tablet and smaller: @media (max-width: 1024px)
   - Mobile and smaller: @media (max-width: 768px)
   - Small mobile only: @media (max-width: 480px)
   ============================================================================ */

/* Tablet and smaller (1024px and below) */
@media (max-width: 1024px) {
    /* Grid behavior handled by .btfc-grid-reverse-3col from breakpoints.css */
}

/* Mobile and smaller (768px and below) */
@media (max-width: 768px) {
    /* Header becomes vertical */
    .btfc-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-4);
        padding: var(--space-4);
    }
    
    /* Full width controls on mobile */
    .btfc-cards-header .btfc-control-group {
        width: 100%;
        min-width: unset;
    }
    
    /* Center title on mobile */
    .btfc-cards-title {
        text-align: center;
        font-size: var(--font-size-2xl); /* Match hero title mobile size */
    }
    
    /* Center results count on mobile */
    .btfc-results-count {
        text-align: center;
    }
    
    /* Grid behavior handled by .btfc-grid-reverse-3col from breakpoints.css */
    /* Player card responsive handled by .btfc-box-player-card in box-base.css */
    
    /* Position heading stacks */
    .btfc-position-heading {
        flex-direction: column;
        text-align: center;
    }
    
    /* Manager stats become 2-column */
    .btfc-manager-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Player-manager stats become single column */
    .btfc-player-manager-stats {
        grid-template-columns: 1fr;
    }
    
    /* Managers grid becomes single column */
    .btfc-managers-grid {
        grid-template-columns: 1fr;
    }
}

/* Small mobile only (480px and below) */
@media (max-width: 480px) {
    /* Grid behavior handled by .btfc-grid-reverse-3col from breakpoints.css */
}

