/* Player Detail Page Specific Styles */

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Player Profile Header */
.player-profile-header {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.player-profile-info {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    flex: 1;
}

.player-photo {
    font-size: 4rem;
    color: #1e3a8a;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 50%;
    flex-shrink: 0;
}

.player-details {
    flex: 1;
}

.player-details h1 {
    margin: 0 0 1rem 0;
    color: #1e3a8a;
    font-size: 2.5rem;
    font-weight: bold;
}

.player-basic-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #374151;
    margin-bottom: 2rem;
}

.info-line {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 1rem;
}

.player-profile-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    margin-top: 20px !important;
}

/* Ensure no grid layout is applied to achievement badges */
.player-profile-actions .achievement-badges,
.player-profile-actions .achievement-badges * {
    display: flex !important;
    flex-direction: column !important;
}

/* Career Summary Section */
.career-summary-section {
    margin-top: 2rem;
}

/* Stats Section */
.stats-section {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stats-header h3 {
    margin: 0;
    color: #1e3a8a;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-nav {
    display: flex;
    gap: 0.5rem;
}

.stats-tab,
.stats-tab-totals,
.stats-tab-advanced {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background-color: #ffffff;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.stats-tab:hover,
.stats-tab-totals:hover,
.stats-tab-advanced:hover {
    border-color: #1e3a8a;
    color: #1e3a8a;
}

.stats-tab.active,
.stats-tab-totals.active,
.stats-tab-advanced.active {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
    color: #ffffff;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    /* Enable smooth scrolling on mobile */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    position: relative;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    color: #374151;
    font-size: 0.9rem;
    border: 1px solid #ddd;
}

.data-table th {
    background-color: #f8f9fa;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: #333;
    border: 1px solid #ddd;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    vertical-align: middle;
    text-align: center;
}

.data-table td:first-child {
    text-align: left;
    font-weight: bold;
}

.data-table tbody tr:hover {
    background-color: #f0f0f0;
    transition: background-color 0.2s ease;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* League Leader styling */
.data-table td.league-leader {
    font-weight: bold;
    color: #000000;
}

.data-table tbody tr:last-child td {
    border-bottom: 1px solid #ddd;
}

.table-title-row th {
    background-color: #1e3a8a;
    color: #ffffff;
    text-align: center;
    font-weight: bold;
}

/* Special row styles */
.career-totals {
    background-color: #f3f4f6;
    font-weight: 600;
}

.team-summary {
    background-color: #f9fafb;
    font-weight: 500;
}

/* No data styling */
.no-data {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 2rem;
}

/* Achievement Badges */
.achievement-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    max-width: 280px;
    width: 280px;
    margin-left: 20px;
}

.achievement-badges-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
    grid-auto-flow: row !important;
    grid-template-rows: auto !important;
}

/* Override any flexbox that might be interfering */
.achievement-badges-grid {
    display: grid !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
}

/* Force grid layout with maximum specificity */
div.achievement-badges-grid,
div[id="achievementBadges"] .achievement-badges-grid,
.player-profile-actions .achievement-badges-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
    grid-auto-flow: row !important;
}



/* Force all badges to work in 2x2 grid */
.achievement-badges-grid > * {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 28px !important;
    box-sizing: border-box !important;
}

/* Target the specific badge elements */
.achievement-badges-grid .achievement-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}





.achievement-badge {
    padding: 0.5rem 0.8rem !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
    text-align: left !important;
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
    word-break: keep-all !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    flex-shrink: 0 !important;
}



/* Hall of Fame badge gets special treatment - full width at top */
.achievement-badge.hall-of-fame {
    width: 100% !important;
    margin-bottom: 0.5rem !important;
    grid-column: 1 / -1 !important;
}



.hall-of-fame {
    background-color: #fbbf24;
    color: #92400e;
    border: 2px solid #f59e0b;
}

.all-star {
    background-color: #6b7280 !important;
    color: #ffffff !important;
    border: 2px solid #4b5563 !important;
}

.mvp,
.dpoy,
.roy,
.sixth-man,
.mip,
.all-nba,
.all-defense,
.all-rookie,
.nba-champ,
.finals-mvp {
    background-color: #f97316;
    color: #ffffff;
    border: 2px solid #ea580c;
}

/* Team Links */
.team-link {
    color: #1e3a8a;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.team-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

/* School and Country Links */
.school-link,
.country-link {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.school-link:hover,
.country-link:hover {
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
}

/* Awards Section Styles - Now uses standard table styling */
.awards-table {
    /* Inherits all styles from .data-table */
}

/* Remove custom award styling that doesn't match page design */

/* Salary History Table */
.salary-history-table {
    width: 100%;
    border-collapse: collapse;
}

.salary-history-table th,
.salary-history-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.salary-history-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.salary-history-table tbody tr:hover {
    background-color: #f9fafb;
}

.career-total-row {
    background-color: #f3f4f6;
    font-weight: 600;
}

.career-total-row td {
    border-top: 2px solid #d1d5db;
}

.salary-note {
    margin-top: 1rem;
    color: #6b7280;
    font-style: italic;
}

/* Contract Table */
.contract-table {
    width: 100%;
    border-collapse: collapse;
}

.contract-table th,
.contract-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.contract-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.contract-table tbody tr:hover {
    background-color: #f9fafb;
}

.contract-details {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.contract-info {
    margin: 0;
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .player-profile-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .player-profile-info {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .player-details h1 {
        font-size: 2rem;
        text-align: center;
    }
    
    .player-basic-info {
        align-items: center;
    }
    
    .player-profile-actions {
        align-items: flex-start;
        width: 100%;
        margin-left: 0;
    }
    
    .achievement-badges {
        align-items: flex-start;
        max-width: 100%;
        width: 100%;
        margin-left: 0;
    }
    
    .achievement-badges-grid {
        justify-content: flex-start;
    }
    
    .stats-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-nav {
        justify-content: center;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Mobile table scrolling styles */
    .table-container {
        /* Enable horizontal scrolling with touch gestures */
        overflow-x: scroll;
        overflow-y: hidden;
        /* Hide scrollbar on mobile but keep functionality */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .table-container::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Opera */
    }
    
    /* Ensure tables can expand beyond viewport width */
    .data-table {
        min-width: 800px; /* Minimum width to show all columns */
        width: max-content;
        font-size: 0.8rem;
    }
    
    /* Add visual indicator that table can be scrolled */
    .table-container::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.8));
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .table-container.scrollable::after {
        opacity: 1;
    }
    
    /* Add left fade indicator for left scroll */
    .table-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to left, transparent, rgba(255,255,255,0.8));
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 1;
    }
    
    .table-container.scrollable-left::before {
        opacity: 1;
    }
    
    /* Ensure sticky headers work properly on mobile */
    .data-table th {
        position: sticky;
        top: 0;
        z-index: 10;
        background-color: #f8f9fa;
    }
    
    /* Add momentum scrolling for iOS */
    .table-container {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Add scroll snap for better mobile experience */
    .data-table {
        scroll-snap-type: x mandatory;
    }
    
    .data-table th,
    .data-table td {
        scroll-snap-align: start;
    }
    
    /* Add mobile scroll instruction */
    .stats-section::before {
        content: "← Swipe left/right to see all stats →";
        display: block;
        text-align: center;
        color: #6b7280;
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        font-style: italic;
    }
}

@media (max-width: 480px) {
    .player-details h1 {
        font-size: 1.75rem;
    }
    
    .stats-header h3 {
        font-size: 1.25rem;
    }
    
    .achievement-badge {
        font-size: 0.65rem;
        padding: 0.4rem 0.6rem;
        min-height: 24px;
    }
    
    .achievement-badges-grid {
        gap: 0.4rem;
    }
    
    /* Remove mobile-specific award styling - now uses standard table styling */
} 



/* Stats Navigation Section */
.stats-nav-section {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stats-nav-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stats-nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stats-nav-tab:hover {
    background-color: #e5e7eb;
    color: #1e3a8a;
    transform: translateY(-2px);
}

.stats-nav-tab.active {
    background-color: #1e3a8a;
    color: #ffffff;
    border-color: #1e3a8a;
}

.stats-nav-tab i {
    font-size: 1.1rem;
}

/* Player Stats Table Specific Styles */
.player-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.player-stats-table th {
    background-color: #f8fafc;
    color: #1e3a8a;
    font-weight: 700;
    text-align: center;
    padding: 1rem 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.player-stats-table th:hover {
    background-color: #e2e8f0;
}

.player-stats-table th.sort-asc::after {
    content: " ▲";
    color: #059669;
    font-weight: bold;
}

.player-stats-table th.sort-desc::after {
    content: " ▼";
    color: #dc2626;
    font-weight: bold;
}

.player-stats-table td {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    color: #374151;
}

.player-stats-table tbody tr:hover {
    background-color: #f8fafc;
}

.player-stats-table .player-link {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.player-stats-table .player-link:hover {
    color: #ea580c;
    text-decoration: underline;
}

.player-stats-table .team-link {
    color: #059669;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.player-stats-table .team-link:hover {
    color: #047857;
    text-decoration: underline;
}

/* Page Navigation Styles */
.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-navigation {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: #1e3a8a;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #1e40af;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #6b7280;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #4b5563;
    transform: translateY(-2px);
}

/* Responsive Design for Stats Table */
@media (max-width: 1024px) {
    .player-stats-table {
        font-size: 0.8rem;
    }
    
    .player-stats-table th,
    .player-stats-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .stats-nav-tabs {
        justify-content: center;
    }
    
    .stats-nav-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .page-header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-navigation {
        justify-content: center;
    }
    
    .stats-nav-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-nav-tab {
        justify-content: center;
    }
    
    .player-stats-table {
        font-size: 0.7rem;
    }
    
    .player-stats-table th,
    .player-stats-table td {
        padding: 0.25rem 0.1rem;
    }
    
    /* Hide some columns on mobile for better readability */
    .player-stats-table th:nth-child(4), /* Pos */
    .player-stats-table td:nth-child(4),
    .player-stats-table th:nth-child(6), /* GS */
    .player-stats-table td:nth-child(6) {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-nav-section {
        padding: 1rem;
    }
    
    .stats-nav-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
        .page-navigation {
        gap: 0.5rem;
    }

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:hover {
    background-color: #f8f8f8;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-type {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.search-result-name {
    font-weight: 600;
    color: #333;
}

    .search-result-details {
        font-size: 0.9rem;
        color: #666;
    }
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:hover {
    background-color: #f8f8f8;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-type {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.search-result-name {
    font-weight: 600;
    color: #333;
}

.search-result-details {
    font-size: 0.9rem;
    color: #666;
} 