/* Main content uses responsive styling from styles.css */

/* Pilot card styling moved to unified styles.css */

/* Search styling moved to unified styles.css */

/* Results styling moved to unified styles.css */

/* Squadron styling moved to unified styles.css */

.pilot-statistics-page {
    width: min(96vw, 1800px);
    max-width: none;
}

.pilot-statistics-page #search-results {
    width: 100%;
}

.pilot-statistics-page .pilot-card {
    width: 100%;
    max-width: none;
}

.pilot-statistics-page .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 25px;
    margin: 40px 0 0;
    max-width: none;
}

@media (max-width: 768px) {
    .pilot-statistics-page {
        width: 100%;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }
}

.chart-wrapper {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.chart-wrapper h4 {
    color: #4CAF50;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2rem;
}

.chart-wrapper canvas {
    max-height: 250px;
}

.chart-info {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background-color: #444;
    color: #ccc;
    border-radius: 50%;
    font-size: 12px;
    margin-left: 5px;
    cursor: help;
    transition: all 0.3s ease;
}

.chart-info:hover {
    background-color: #4CAF50;
    color: white;
    transform: scale(1.1);
}

.chart-wrapper {
    position: relative;
}

.chart-wrapper:hover {
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

.chart-wrapper[title] {
    cursor: help;
}

.no-stats-message {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    background-color: #1a1a1a;
    border-radius: 8px;
    margin: 20px 0;
}

.no-stats-message p {
    margin: 10px 0;
    font-size: 1rem;
}

.no-stats-message p:first-child {
    font-size: 1.2rem;
    color: #ccc;
}

.carrier-traps-card {
    margin-top: 24px;
}

.carrier-traps-status {
    color: var(--card_muted_text_color, #b0b0b0);
    margin: 0 0 16px;
}

.carrier-traps-table-wrap {
    margin-top: 18px;
    overflow-x: auto;
}

.carrier-traps-table {
    border-collapse: collapse;
    width: 100%;
}

.carrier-traps-table th,
.carrier-traps-table td {
    border-bottom: 1px solid color-mix(in srgb, var(--border_color, #444) 60%, transparent);
    color: var(--card_text_color, #e0e0e0);
    padding: 10px 12px;
    text-align: left;
}

.carrier-traps-table th {
    color: var(--card_heading_color, #4CAF50);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.trap-date-time-cell {
    min-width: 190px;
    white-space: nowrap;
}

.trap-date,
.trap-time {
    display: inline-block;
    line-height: 1.35;
    white-space: nowrap;
}

.trap-time {
    border-left: 1px solid color-mix(in srgb, var(--border_color, #444) 70%, transparent);
    color: var(--card_muted_text_color, #b0b0b0);
    margin-left: 14px;
    padding-left: 14px;
}

/* Enhanced tooltip styling */
.chart-wrapper:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.chart-wrapper:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #333;
    margin-bottom: 2px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    /* Search container mobile optimization */
    .search-container {
        padding: 0 15px;
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    #playerSearchInput {
        width: 100%;
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 25px;
    }
    
    .search-container button {
        width: 100%;
        padding: 12px 20px;
        font-size: 1rem;
        border-radius: 25px;
        min-height: 44px;
    }
    
    /* Results list mobile optimization */
    .results-list {
        padding: 0 10px;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .result-item {
        padding: 15px;
        margin: 8px 0;
        font-size: 1rem;
    }
    
    /* Pilot card mobile optimization */
    .pilot-card {
        padding: 15px;
        margin: 15px;
    }
    
    .pilot-card h3 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    /* Stats grid mobile layout */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        padding: 10px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 5px;
    }
    
    .stat-label {
        font-weight: 600;
        color: #4CAF50;
    }
    
    .stat-value {
        font-weight: bold;
    }
    
    /* Charts mobile optimization */
    .charts-container {
        grid-template-columns: 1fr !important;
        gap: 20px;
        margin: 20px 0;
    }
    
    .chart-wrapper {
        padding: 15px;
    }
    
    .chart-wrapper h4 {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .chart-wrapper canvas {
        max-height: 200px !important;
    }
    
    /* Stat groups */
    .stat-group h4 {
        font-size: 1.1rem;
        margin: 20px 0 10px 0;
        color: #4CAF50;
    }
    
    /* Dashboard header mobile */
    .dashboard-header h1 {
        font-size: 1.8rem;
    }
    
    .dashboard-subtitle {
        font-size: 0.9rem;
        padding: 0 10px;
    }
}

/* Very small devices */
@media screen and (max-width: 480px) {
    .pilot-card {
        margin: 10px;
        padding: 10px;
    }
    
    .pilot-card h3 {
        font-size: 1.2rem;
    }
    
    .stat-item {
        font-size: 0.9rem;
    }
    
    .chart-wrapper canvas {
        max-height: 180px !important;
    }
}

/* Touch-friendly hover states */
@media (hover: none) and (pointer: coarse) {
    .result-item:hover {
        background-color: transparent;
    }
    
    .result-item:active {
        background-color: rgba(76, 175, 80, 0.3);
    }
}
