/* MSFS Flight Tracker Frontend Styles */

.msfs-tracker-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Map Container */
#flight-map {
    height: 600px;
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

/* Stats Overview */
.msfs-stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.msfs-stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.msfs-stat-box:hover {
    transform: translateY(-5px);
}

.msfs-stat-box h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.msfs-stat-box .stat-value {
    font-size: 32px;
    font-weight: bold;
    margin: 0;
}

/* Flight List */
.msfs-flight-list {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.msfs-flight-list-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.msfs-flight-list-header h2 {
    margin: 0;
    font-size: 24px;
}

.msfs-flight-filters {
    padding: 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.msfs-filter-input,
.msfs-filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.msfs-filter-input {
    flex: 1;
    min-width: 200px;
}

.msfs-filter-select {
    min-width: 150px;
}

/* Flight Items */
.msfs-flight-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    transition: background 0.2s ease;
    cursor: pointer;
}

.msfs-flight-item:hover {
    background: #f5f5f5;
}

.msfs-flight-item:last-child {
    border-bottom: none;
}

.msfs-flight-icon {
    font-size: 40px;
    margin-right: 20px;
    opacity: 0.7;
}

.msfs-flight-details {
    flex: 1;
}

.msfs-flight-route {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.msfs-flight-route .arrow {
    color: #667eea;
    margin: 0 10px;
}

.msfs-flight-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: #666;
    font-size: 14px;
}

.msfs-flight-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.msfs-flight-meta {
    text-align: right;
    color: #999;
    font-size: 13px;
}

.msfs-flight-aircraft {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

/* Charts Section */
.msfs-charts-section {
    margin-bottom: 30px;
}

.msfs-chart-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.msfs-chart-container h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Map Controls */
.msfs-map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.msfs-map-controls label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
}

.msfs-map-controls input[type="checkbox"] {
    margin-right: 5px;
}

/* Flight Popup */
.msfs-flight-popup {
    min-width: 200px;
}

.msfs-flight-popup h4 {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 16px;
}

.msfs-flight-popup p {
    margin: 5px 0;
    font-size: 13px;
}

.msfs-flight-popup strong {
    color: #333;
}

/* Loading State */
.msfs-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.msfs-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Data State */
.msfs-no-data {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.msfs-no-data-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    #flight-map {
        height: 400px;
    }
    
    .msfs-stats-overview {
        grid-template-columns: 1fr;
    }
    
    .msfs-flight-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .msfs-flight-icon {
        margin-bottom: 10px;
    }
    
    .msfs-flight-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .msfs-flight-meta {
        text-align: left;
        margin-top: 10px;
    }
    
    .msfs-flight-filters {
        flex-direction: column;
    }
    
    .msfs-filter-input,
    .msfs-filter-select {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .msfs-flight-filters,
    .msfs-map-controls {
        display: none;
    }
}