﻿body {
    background: #f3f4f7;
    font-family: 'Montserrat',sans-serif;
}

.flight-card {
    background: #fff;
    border-radius: 10px;
    margin: 15px;
    overflow: hidden;
}

.flight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 3px solid #aa0000;
}

.airline-banner {
    background: #aa0000;
    color: #fff;
    padding: 7px 25px 7px 15px;
    clip-path: polygon(0 0,100% 0,85% 100%,0 100%);
    font-weight: 600;
    white-space: nowrap;
}

.route-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 15px;
    font-size: 13px;
    font-weight: 600;
}

.plane-icon {
    width: 16px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

.departure-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.departure-date {
    font-size: 14px;
}

.airline-logo {
    width: 60px;
    height: 30px;
    object-fit: contain;
}

.price {
    text-align: right;
}

.amount {
    color: #1fa33d;
    font-size: 22px;
    font-weight: 700;
}

.taxes {
    color: #999;
    font-size: 11px;
}

.trip-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 12px;
    margin-left: 15px;
    margin-right: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.trip-card:hover {
    transform: translateY(-3px);
    border-color: #dc3545;
    background-color: #fffafa;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.trip-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trip-card .trip-main {
    transition: transform 0.2s ease;
}

.trip-card:hover .trip-main {
    transform: translateX(3px);
}

/* Highlight the airplane icon */
.trip-card .duration-line i {
    transition: transform 0.25s ease;
}

.trip-card:hover .duration-line i {
    transform: translateX(5px);
}

/* Highlight details link */
.trip-card .details-link {
    transition: color 0.2s ease, background-color 0.2s ease;
}


/* Optional: make the whole card visually selected */
.trip-card.selected {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
    background-color: #fff8f8;
}

/* Selection in progress: block duplicate clicks until SelectTrip responds */
.trip-card.trip-selecting {
    pointer-events: none;
    opacity: 0.65;
}

.choose-flight {
    margin-left: auto;
    color: #dc3545;
    font-weight: 600;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.trip-card:hover .choose-flight {
    opacity: 1;
    transform: translateX(0);
}

.choose-flight i {
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.trip-card:hover .choose-flight i {
    transform: translateX(4px);
}


.flight-airline {
    text-align: center;
    width: 70px;
}

.flight-airline img {
    width: 32px;
}

.flight-no {
    font-size: 12px;
    margin-top: 5px;
}

.flight-time {
    text-align: center;
}

.time {
    font-size: 18px;
    font-weight: 700;
}

.airport {
    color: #888;
    font-size: 12px;
}

.duration {
    width: 120px;
    text-align: center;
    font-size: 12px;
}

.duration-line {
    display: flex;
    align-items: center;
    margin: 6px 0;
}

    .duration-line span {
        flex: 1;
        border-top: 1px dashed #666;
    }

    .duration-line img {
        width: 18px;
        margin: 0 5px;
    }

.trip-footer {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-box {
    border: 1px solid #ddd;
    padding: 6px;
    border-radius: 4px;
}

    .icon-box img {
        width: 20px;
        height: 20px;
        object-fit: contain;
        display: block;
    }

.seat-box {
    border: 1px solid #ddd;
    padding: 5px 10px;
    font-weight: 600;
}

.details-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #333;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-left: auto;
}

.details-link:hover {
    text-decoration: underline;
}
.duration-line i {
    transform: rotate(90deg);
    font-size: 18px;
}

/* Modal Header Gradient */
.flight-details-modal .modal-header {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #0a58ca 100%);
}

/* Timeline Styling */
.flight-details-modal .itinerary-segment:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.border-dashed {
    border-bottom: 2px dashed #dee2e6 !important;
}

.bg-light-subtle {
    background-color: #fcfcfd;
}

.flight-line .line {
    height: 2px;
    background-color: #adb5bd;
}

/* Mobile Responsiveness Tweaks */
@media (max-width: 768px) {
    .flight-details-modal .modal-header .fs-6 {
        font-size: 0.8rem !important;
    }

    .flight-details-modal .h4 {
        font-size: 1.2rem !important;
    }

    .flight-details-modal .col-md-6 {
        border-right: none !important;
        border-bottom: 1px solid #dee2e6;
    }
}