﻿.flight-card {
    background: rgba(26, 29, 46, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 134, 11, 0.2);
    margin: 20px;
}

/* Fix margins for flight cards in chat history */
.chat-history-message .flight-card {
    margin: 12px 0; /* Reduce horizontal margins to fit within chat bubble */
    max-width: 400px; /* Allow full width within the chat bubble */
    width: calc(100% - 0px); /* Ensure it fits within chat bubble without overflow */
}

/* Fix margins for flight cards in main chat */
.ai-message .flight-card {
    margin: 12px 0; /* Reduce horizontal margins to fit within chat bubble */
    max-width: 400px; /* Allow full width within the chat bubble */
    width: calc(100% - 0px); /* Ensure it fits within chat bubble without overflow */
}

.flight-header {
    text-align: center;
    margin-bottom: 24px;
}

.flight-number-large {
    font-size: 32px;
    font-weight: 800;
    color: #daa520;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.route-header {
    text-align: center;
    margin-bottom: 32px;
}

.route-title {
    font-size: 24px;
    font-weight: 700;
    color: #f7fafc;
    margin-bottom: 8px;
}

.flight-info {
    text-align: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #a0aec0;
}

.journey-time {
    font-weight: 600;
    color: #e2e8f0;
}

.route-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 32px 0;
    position: relative;
}

.airport {
    text-align: center;
    flex: 1;
}

.airport-code {
    font-size: 32px;
    font-weight: 800;
    color: #f7fafc;
    margin-bottom: 4px;
}

.airport-city {
    font-size: 14px;
    color: #a0aec0;
    font-weight: 500;
}

.airport-time {
    font-size: 20px;
    font-weight: 700;
    color: #e2e8f0;
    margin-top: 8px;
}

.button-container {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    justify-content: center;
}

.flight-button {
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    border: none;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

    .flight-button:hover {
        background: rgba(255, 255, 255, 1);
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }

.status-container {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.status-badge {
    background: #e53e3e;
    color: white;
    padding: 12px 24px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.date-badge {
    background: rgba(74, 85, 104, 0.3);
    color: #e2e8f0;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    border: 1px solid rgba(160, 174, 192, 0.2);
}

.status-delayed {
    background: #e74c3c;
    color: white;
}

.status-on-time {
    background: #27ae60;
    color: white;
}

.status-boarding {
    background: #f39c12;
    color: white;
}

.status-departed {
    background: #3498db;
    color: white;
}

.status-badge.arrived {
    background: #27ae60;
    color: white;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.status-badge.delayed {
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.status-badge.scheduled {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.status-badge.inflight {
    background: #f39c12;
    color: white;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

@media (max-width: 480px) {
    .flight-card {
        padding: 24px;
        margin: 16px;
    }

    /* Adjust chat message flight cards for mobile */
    .chat-history-message .flight-card,
    .ai-message .flight-card {
        padding: 20px;
        margin: 8px 0;
        border-radius: 18px;
    }

    .airport-code {
        font-size: 28px;
    }

    .route-title {
        font-size: 20px;
    }

    .flight-number-large {
        font-size: 28px;
    }
}
