.flight-page-wrapper {
    max-width: 1180px;
    margin: 0 auto;
}

.flight-search-card,
.flight-results-card {
    border-radius: 18px;
    border: 1px solid rgba(6, 34, 72, 0.05);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.field-label-sm {
    font-size: 0.82rem;
    letter-spacing: .02em;
}

.flight-input,
.traveller-btn {
    font-size: 0.9rem;
    border-radius: 12px;
    min-height: 52px;
}

.flight-input::placeholder {
    color: #b1b6c1;
}

/* Trip pills */
.trip-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 999px;
    background: #f3f6ff;
    width: auto;
}

.trip-toggle .form-check-input {
    display: none;
}

.trip-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #445b7c;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.trip-pill i {
    margin-right: 6px;
    font-size: 0.9rem;
}

.trip-toggle .form-check-input:checked+.trip-pill {
    background: #ffffff;
    color: #0b3a6a;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

@media (max-width: 575.98px) {
    .trip-toggle {
        flex-wrap: wrap;
    }
}

.btn-search-primary {
    border-radius: 12px;
    font-weight: 600;
    border: none;
    background: linear-gradient(90deg, #007bff, #0b5ed7);
    box-shadow: 0 14px 28px rgba(0, 123, 255, 0.35);
}

.btn-search-primary:hover {
    background: linear-gradient(90deg, #0b5ed7, #0056b3);
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #9ca3af;
}

.input-with-icon .form-control {
    padding-left: 2.4rem;
}

.swap-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #0b5ed7;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(11, 94, 215, 0.4);
    margin-bottom: 4px;
}

.swap-btn:hover {
    background: #07449f;
}

.input-with-overlay {
    position: relative;
}

.selected-tag {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background-color: #e6f0ff;
    color: #007bff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-top: 6px;
    z-index: 1050;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}

.autocomplete-list .list-group-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 16px;
    cursor: pointer;
}

.autocomplete-list .list-group-item:hover {
    background-color: #f8f9fa;
}

.city-name {
    font-weight: 600;
    color: #333;
    gap: 8px;
}

.iata-code {
    background-color: #e6f0ff;
    color: #007bff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.airport-info {
    font-size: 0.85rem;
    color: #666;
    margin-top: 2px;
}

.traveller-wrapper {
    position: relative;
}

#travellerDropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
    padding: 16px;
    margin-top: 8px;
    z-index: 2000;
    display: none;
    animation: fadeIn 0.2s ease-in-out;
}

#travellerDropdown input[type="number"] {
    width: 100%;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flight-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flight-card {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: stretch;
    background: #fff;
    transition: box-shadow .18s ease, transform .18s ease;
}

.flight-card:hover {
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
    transform: translateY(-2px);
}

.flight-card-main {
    display: flex;
    gap: 18px;
    flex: 1;
    align-items: center;
    flex-wrap: wrap;
}

.flight-airline {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 110px;
}

.airline-logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #0b3a6a;
}

.flight-route {
    flex: 1;
}

.flight-city-time .city-code {
    font-weight: 600;
    font-size: 0.95rem;
}

.flight-city-time .time-text {
    font-size: 0.8rem;
    color: #4b5563;
}

.flight-city-time .airport-name {
    font-size: 0.75rem;
    color: #9ca3af;
}

.flight-timeline {
    min-width: 80px;
}

.flight-timeline .line {
    height: 2px;
    background: linear-gradient(90deg, #0b5ed7, #22c1c3);
    margin-bottom: 4px;
    position: relative;
}

.flight-timeline .line::before,
.flight-timeline .line::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 2px solid #0b5ed7;
    background: #fff;
    transform: translateY(-50%);
}

.flight-timeline .line::before {
    left: 0;
}

.flight-timeline .line::after {
    right: 0;
}

.flight-timeline .timeline-icon {
    font-size: 0.7rem;
    color: #0b5ed7;
}

.flight-card-price {
    min-width: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

.price-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0b3a6a;
}

.xsmall {
    font-size: 0.7rem;
}

.pagination {
    margin-top: 20px;
}

.pagination .page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 999px !important;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
}

@media (max-width: 991.98px) {
    .flight-search-card {
        padding: 1.25rem;
    }

    .flight-results-card {
        padding: 1.25rem;
    }

    .flight-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .flight-card-price {
        align-items: flex-start;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .trip-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .trip-pill {
        flex: 1;
        justify-content: center;
        padding-inline: 8px;
    }

    .flight-card {
        padding: 12px 12px;
    }
}

/* icon nav horizontal scroll */
.secondary-nav.alternate {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 32px;
    padding: 10px 8px 12px;
    scrollbar-width: none;
}

.secondary-nav.alternate::-webkit-scrollbar {
    display: none;
}

.secondary-nav.alternate .nav-item {
    flex: 0 0 auto;
    margin: 0;
}

.secondary-nav.alternate .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    white-space: nowrap;
}

.secondary-nav.alternate .nav-link span i {
    font-size: 26px;
}

@media (max-width: 991.98px) {
    .secondary-nav.alternate {
        gap: 24px;
    }
}

@media (max-width: 575.98px) {
    .secondary-nav.alternate {
        flex-wrap: wrap;
        gap: 18px 28px;
    }
}

/* Passenger type info */
.passenger-info-icon {
    font-size: 14px;
    color: #0b5ed7;
}

.passenger-info-icon i {
    vertical-align: middle;
}

.passenger-info-icon:hover {
    color: #084298;
}

.passenger-info-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 16px;
}

.passenger-info-modal {
    background: #ffffff;
    border-radius: 14px;
    max-width: 520px;
    width: 100%;
    padding: 18px 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
    max-height: 80vh;
    overflow-y: auto;
}

.passenger-info-modal ul {
    padding-left: 18px;
}

.passenger-info-modal ul li {
    margin-bottom: 3px;
}

.passenger-info-close {
    font-size: 10px;
}


.cheapest-date-wrapper {
    position: relative;
}

.cheapest-date-scroll {
    scroll-behavior: smooth;
    padding: 4px 32px;
    scrollbar-width: none;
}
.cheapest-date-scroll::-webkit-scrollbar {
    display: none;
}

.date-card {
    min-width: 90px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.date-card:hover {
    border-color: #0d6efd;
    transform: translateY(-1px);
}

.date-card.active {
    border-color: #0d6efd;
    background: #e7f1ff;
}

.date-label {
    font-size: 11px;
    color: #6b7280;
}

.date-number {
    font-size: 13px;
    font-weight: 600;
}

.date-price {
    font-size: 12px;
    font-weight: 600;
    color: #16a34a;
}

/* Arrow buttons */
.date-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 5;
}

.date-nav-btn.left {
    left: 0;
}

.date-nav-btn.right {
    right: 0;
}

.date-nav-btn:hover {
    background: #f1f5f9;
}


        .flight-city-time {
            min-width: 120px;
        }

        .flight-city-time .city-code {
            font-size: 0.95rem;
            font-weight: 600;
            color: #1a1a1a;
            margin-bottom: 0.25rem;
        }

        .flight-city-time .time-text {
            font-size: 1.1rem;
            font-weight: 700;
            color: #0066cc;
            margin-bottom: 0.1rem;
        }

        /* Date badge below time */
        .flight-city-time .xsmall.fw-semibold {
            background: #f0f7ff;
            padding: 2px 8px;
            border-radius: 4px;
            display: inline-block;
            margin-top: 2px;
            margin-bottom: 4px;
            color: #0066cc;
            font-size: 0.7rem;
            border: 1px solid #d4e6f7;
        }

        /* Airport name */
        .flight-city-time .xsmall:not(.fw-semibold) {
            font-size: 0.7rem;
            color: #666;
        }

        /* Round Trip Separator */
        .flight-card-separator {
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 1.25rem 0;
            position: relative;
        }

        .flight-card-separator::before,
        .flight-card-separator::after {
            content: '';
            flex: 1;
            height: 1px;
            background: linear-gradient(to right, transparent, #dee2e6, transparent);
        }

        .flight-card-separator .badge {
            margin: 0 1rem;
            font-size: 0.7rem;
            padding: 0.4rem 0.85rem;
            font-weight: 600;
            background: #fff !important;
            color: #0066cc !important;
            border: 1.5px solid #0066cc !important;
            box-shadow: 0 2px 4px rgba(0, 102, 204, 0.1);
        }

        /* Return flight plane icon - flip horizontally */
        .flight-timeline .timeline-icon[style*="scaleX(-1)"] {
            color: #28a745;
        }

        /* Adjust flight card padding for round trips */
        .flight-card:has(.flight-card-separator) {
            padding: 1.25rem 1.5rem;
        }

        /* Price section for round trips */
        .flight-card:has(.return_flight) .price-text {
            font-size: 1.4rem;
        }

        /* Mobile responsive */
        @media (max-width: 768px) {
            .flight-city-time {
                min-width: 100px;
            }

            .flight-city-time .time-text {
                font-size: 1rem;
            }

            .flight-city-time .city-code {
                font-size: 0.85rem;
            }

            .flight-card-separator {
                margin: 1rem 0;
            }

            .flight-card-separator .badge {
                font-size: 0.65rem;
                padding: 0.3rem 0.6rem;
            }
        }

        /* Highlight today's date */
        .flight-city-time .xsmall.fw-semibold.today {
            background: #fff3cd;
            border-color: #ffc107;
            color: #856404;
        }

        .flight-card-main:first-child .time-text {
            color: #0066cc;
            /* Blue for outbound */
        }

        .flight-card-main:last-child .time-text {
            color: #28a745;
            /* Green for return */
        }