/* Live map — plane click popup (AMX + Connect) */

.amx-flight-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(3, 13, 117, 0.1);
    box-shadow: 0 22px 48px rgba(2, 12, 65, 0.18);
}
.amx-flight-popup .leaflet-popup-content {
    margin: 0;
    min-width: 0;
    width: 22rem !important;
    max-width: min(22rem, 92vw);
}
.amx-flight-popup .leaflet-popup-tip-container {
    margin-top: -1px;
}
.amx-flight-popup .leaflet-popup-tip {
    background: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(2, 12, 65, 0.12);
}
.amx-flight-popup a.leaflet-popup-close-button {
    top: 0.55rem;
    right: 0.55rem;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.5rem;
    text-align: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}
.amx-flight-popup a.leaflet-popup-close-button:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.22);
}

.live-flight-card {
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    color: #334155;
    background: #fff;
}

.live-flight-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1rem 2.35rem 1rem 1.1rem;
    background:
        radial-gradient(ellipse 55% 80% at 100% 0%, rgba(250, 0, 115, 0.22), transparent 55%),
        linear-gradient(135deg, #030d75 0%, #020c41 100%);
    color: #fff;
}

.live-flight-card__head-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
    text-align: right;
}

.live-flight-card__callsign {
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.live-flight-card__net {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
}
.live-flight-card__net--vatsim {
    background: #f59e0b;
}
.live-flight-card__net--ivao {
    background: #0ea5e9;
}

.live-flight-card__pilot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex: 1;
    text-align: center;
}

.live-flight-card__avatar,
.live-flight-card__avatar-fallback {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    object-fit: cover;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.live-flight-card__avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.live-flight-card__pilot-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    width: 100%;
}

.live-flight-card__pilot-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.live-flight-card__ac {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.live-flight-card__body {
    padding: 0.9rem 1rem 1rem;
    background: #fff;
}

.live-flight-card__route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
    padding: 0.7rem 0.85rem;
    background: #f4f6fb;
    border: 1px solid rgba(3, 13, 117, 0.07);
    border-radius: 0.75rem;
}

.live-flight-card__airport {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 3.5rem;
}

.live-flight-card__icao {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #030d75;
    line-height: 1.1;
}

.live-flight-card__leg {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.live-flight-card__leg--dep {
    color: #059669;
}
.live-flight-card__leg--arr {
    color: #e11d48;
}

.live-flight-card__route > i {
    color: #030d75;
    font-size: 0.7rem;
    opacity: 0.55;
}

.live-flight-card__progress {
    margin-bottom: 0.85rem;
}

.live-flight-card__progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
}

.live-flight-card__bar {
    height: 0.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.live-flight-card__bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #fa0073, #ff4d9a);
    min-width: 0;
    transition: width 0.35s ease;
}

.live-flight-card__stats {
    display: grid;
    gap: 0.45rem;
}
.live-flight-card__stats--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0.45rem;
}
.live-flight-card__stats--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.live-flight-card__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.45rem 0.25rem;
    background: #f8fafc;
    border: 1px solid rgba(3, 13, 117, 0.07);
    border-radius: 0.55rem;
    text-align: center;
    min-width: 0;
}

.live-flight-card__stat-label {
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.live-flight-card__stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #030d75;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
