/* ============================================
   Enhanced Flight Tracker (Flightradar24 Style)
   ============================================ */

/* Aircraft Markers */
.aircraft-marker-wrapper {
    pointer-events: auto;
    z-index: 500;
}

.aircraft-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.aircraft-icon svg {
    width: 100%;
    height: 100%;
    fill: #facc15;
    /* Default yellow */
    stroke: #000;
    stroke-width: 1.5px;
}

.aircraft-icon.selected svg {
    fill: #f97316;
    /* Orange when selected */
    filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.6));
}

.aircraft-marker-callsign {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 9px;
    letter-spacing: 0.05em;
    white-space: nowrap;
    font-weight: 700;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Bottom Info Panel */
.flight-info-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    transform: translateY(105%);
    /* Hide by default */
    width: 95%;
    max-width: 500px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px 24px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: none;
    box-shadow: 0 -15px 60px rgba(0, 0, 0, 0.7);
    z-index: 10001;
    /* Above all other layers */
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    pointer-events: auto;
}

.flight-info-panel.active {
    transform: translateY(0);
}

.flight-panel-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.flight-panel-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.flight-main-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.flight-callsign {
    font-size: 1.5rem;
    font-weight: 800;
    color: #facc15;
    letter-spacing: -0.02em;
}

.flight-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.flight-panel-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.2s;
}

.flight-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.flight-airline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Panel Body */
.flight-panel-body {
    padding: 20px;
}

.flight-route-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 10px;
}

.route-airport {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.airport-code {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.airport-name {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
}

.route-icon {
    color: rgba(255, 255, 255, 0.2);
    margin: 0 20px;
}

/* Stats Grid */
.flight-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.f-stat-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 12px;
}

.f-stat-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.f-stat-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
}

/* Panel Footer */
.flight-panel-footer {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Toggle Button Updates */
.flight-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--color-text-primary);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.flight-toggle-btn.active {
    background: rgba(250, 204, 21, 0.15);
    border-color: rgba(250, 204, 21, 0.4);
    color: #facc15;
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.2);
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .flight-info-panel {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
    }
}