/* Airport Hover Overlay Styles */
.airport-detail-overlay {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    width: 400px; /* Vaste breedte in plaats van min/max */
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.2s ease-out;
    pointer-events: auto;
    border: 2px solid #e0e0e0;
}

.airport-detail-overlay.visible {
    opacity: 1;
    transform: scale(1);
}

.airport-overlay-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8f9fa;
    color: #2c3e50;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid #e0e0e0;
}

.airport-overlay-header.start {
    background: #e8f5e9;
    border-bottom-color: #4caf50;
}

.airport-overlay-header.end {
    background: #ffebee;
    border-bottom-color: #f44336;
}

.airport-overlay-number {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.airport-overlay-name {
    flex: 1;
    font-weight: 600;
    font-size: 1em;
    color: #2c3e50;
}

.airport-overlay-name i {
    margin-left: 8px;
    font-size: 0.9em;
}

.airport-overlay-body {
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.airport-overlay-section {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid;
}

.airport-overlay-section:last-child {
    margin-bottom: 0;
}

.airport-overlay-section.load-section {
    background: #e8f5e9;
    border-left-color: #4caf50;
}

.airport-overlay-section.unload-section {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.overlay-section-header {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overlay-section-header i {
    font-size: 1.1em;
}

.overlay-cargo-detail {
    padding: 6px 0;
    padding-left: 20px;
    color: #34495e;
    font-size: 0.9em;
    line-height: 1.6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.cargo-detail-content {
    flex: 1;
}

.cargo-detail-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-overlay-icon {
    padding: 4px 6px;
    border: none;
    background: transparent;
    color: #7f8c8d;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-overlay-icon:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-overlay-edit:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.btn-overlay-delete:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.btn-overlay-icon i {
    font-size: 0.9em;
}

.overlay-cargo-detail i.fa-arrow-right {
    margin: 0 6px;
    color: #7f8c8d;
    font-size: 0.8em;
}

.overlay-cargo-detail i.fa-users,
.overlay-cargo-detail i.fa-box {
    margin-right: 6px;
    color: #667eea;
}

/* Klein nummertje rechts-boven in capacity tile */
.capacity-tile-number {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.7em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Zorg dat tile position: relative heeft voor absolute positioning van nummer */
.airport-capacity-tile {
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

/* Extra hover effect voor tiles */
.airport-capacity-tile:hover {
    border-color: #667eea;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Active/click effect */
.airport-capacity-tile:active {
    transform: scale(0.98);
}

/* Scrollbar styling voor overlay body */
.airport-overlay-body::-webkit-scrollbar {
    width: 8px;
}

.airport-overlay-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.airport-overlay-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.airport-overlay-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Capacity info balkje in overlay */
.airport-detail-overlay .stop-capacity-info {
    margin: 12px;
    margin-bottom: 0;
    padding: 10px 20px; /* Meer padding aan de zijkanten */
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 6px;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px; /* Meer gap tussen weight en seats */
}

.capacity-weight,
.capacity-seats {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.capacity-weight i {
    color: #2196f3;
}

.capacity-seats i {
    color: #667eea;
}

.stop-capacity-info strong {
    margin-right: 4px;
}

/* Flight Statistics card styling */
#flight-statistics-card .route-summary {
    margin-top: 0;
    border: none;
    padding: 0;
    background: transparent;
}

#flight-statistics-card .summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#flight-statistics-card .summary-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-bottom: none;
}
/* Leaflet Map Popup Styling - verwijder witte rand en maak compacter */
.leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    border: 2px solid #e0e0e0 !important;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 350px !important; /* Wat smaller dan de 400px van de hover overlay */
    max-height: 350px; /* Wat lager */
    overflow-y: auto;
}

.leaflet-popup-tip-container {
    display: none !important; /* Verberg de witte driehoek/tip */
}

/* Scrollbar voor de map popup */
.leaflet-popup-content::-webkit-scrollbar {
    width: 8px;
}

.leaflet-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.leaflet-popup-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.leaflet-popup-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Aanpassing voor popup body binnen Leaflet popup */
.leaflet-popup-content .airport-overlay-body {
    max-height: 280px; /* Lager dan de normale overlay */
    padding: 10px; /* Iets minder padding */
}

/* Compactere header in map popup */
.leaflet-popup-content .airport-overlay-header {
    padding: 8px 10px; /* Iets minder padding */
}

/* Compactere sections in map popup */
.leaflet-popup-content .airport-overlay-section {
    padding: 8px; /* Iets minder padding */
    margin-bottom: 8px;
}

.leaflet-popup-content .overlay-cargo-detail {
    padding: 5px 0;
    padding-left: 16px;
    font-size: 0.85em; /* Iets kleinere tekst */
}

/* Weight Status Badge in header */
.weight-status-badge {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.weight-status-badge i {
    font-size: 1em;
}

.weight-status-badge.warning {
    background: #ff9800;
    color: white;
}

.weight-status-badge.overweight {
    background: #f44336;
    color: white;
    animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

/* Zorg dat header items goed uitlijnen met de badge */
.airport-overlay-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.airport-overlay-name {
    flex: 1;
}