/* Flight result cards + the nearby-dates prompt — shared between the full
   /flights/ results page and the AJAX quick-search popup (Milestone 23),
   so this must load wherever the ticket search card does, not just on the
   flights route. Moved out of pages/flights-listing.css for exactly that
   reason — it used to only exist there, so the popup's injected cards had
   no styling at all on the homepage. */

.soves-flight-result-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.soves-flight-result-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 26px;
    border: 1px solid rgba(230, 234, 240, 0.9);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    animation: sovesFlightCardEnter 0.28s ease both;
    transition: box-shadow 0.18s ease;
}

.soves-flight-result-card:hover {
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

@keyframes sovesFlightCardEnter {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.soves-flight-result-card__badges {
    position: absolute;
    top: -11px;
    left: 22px;
    z-index: 1;
    display: flex;
    gap: 6px;
}

.soves-flight-result-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.soves-flight-result-card__badge .soves-ms-icon {
    font-size: 13px;
}

.soves-flight-result-card__badge--cheapest {
    background: var(--soves-brand-accent, #00a8f0);
}

.soves-flight-result-card__badge--direct {
    background: var(--soves-primary, var(--soves-brand-primary));
}

.soves-flight-result-card__legs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
}

.soves-flight-leg + .soves-flight-leg {
    padding-top: 16px;
    border-top: 1px solid var(--soves-border, #e1e7ef);
}

.soves-flight-leg__label {
    margin: 0 0 6px;
    color: var(--soves-primary, var(--soves-brand-primary));
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.soves-flight-leg__airline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--soves-text, #172033);
    font-size: 13px;
    font-weight: 600;
}

.soves-flight-leg__airline img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 6px;
    padding: 3px;
    background: var(--soves-soft, #f8fafc);
    border: 1px solid var(--soves-border, #e1e7ef);
}

.soves-flight-leg__route {
    display: flex;
    align-items: center;
    gap: 18px;
}

.soves-flight-leg__point {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.soves-flight-leg__point strong {
    font-size: 20px;
    color: var(--soves-text, #172033);
}

.soves-flight-leg__point span {
    font-size: 12px;
    color: var(--soves-muted, #667085);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.soves-flight-leg__middle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 120px;
    color: var(--soves-muted, #667085);
    font-size: 12px;
}

.soves-flight-leg__line {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--soves-border, #e1e7ef);
    position: relative;
}

.soves-flight-leg__line::before,
.soves-flight-leg__line::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--soves-border, #e1e7ef);
    transform: translateY(-50%);
}

.soves-flight-leg__line::before {
    left: 0;
}

.soves-flight-leg__line::after {
    right: 0;
}

.soves-flight-leg__date {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--soves-muted, #667085);
}

.soves-flight-result-card__price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    padding-left: 24px;
    border-left: 1px solid var(--soves-border, #e1e7ef);
    text-align: right;
}

.soves-flight-result-card__price strong {
    font-size: 24px;
    font-weight: 700;
    color: var(--soves-text, #172033);
}

.soves-flight-result-card__price > span {
    font-size: 12px;
    color: var(--soves-muted, #667085);
}

/* .soves-booking-submit's real pill-button styling normally lives in
   hotel-booking.css, which isn't loaded on the flights route or the
   homepage popup — defined here so "Select" is never a bare unstyled
   link wherever a flight card renders. */
.soves-flight-result-card .soves-booking-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 10px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--soves-primary, var(--soves-brand-primary));
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: filter 0.15s ease;
}

.soves-flight-result-card .soves-booking-submit:hover,
.soves-flight-result-card .soves-booking-submit:focus-visible {
    filter: brightness(0.92);
}

@media (max-width: 720px) {
    .soves-flight-result-card {
        flex-direction: column;
        align-items: stretch;
    }

    .soves-flight-result-card__price {
        align-items: stretch;
        padding-left: 0;
        padding-top: 16px;
        border-left: 0;
        border-top: 1px solid var(--soves-border, #e1e7ef);
        text-align: left;
    }

    .soves-flight-leg__route {
        gap: 10px;
    }
}

.soves-search-overlay__count {
    margin: 0;
    color: var(--soves-muted, #667085);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.soves-search-overlay__message {
    margin: 0;
    color: var(--soves-text, #172033);
    font-size: 15px;
    font-weight: 600;
}

.soves-nearby-dates {
    margin: 16px auto 0;
    padding: 20px;
    max-width: 520px;
    border: 1px solid var(--soves-border, #e1e7ef);
    border-radius: 12px;
    background: var(--soves-soft, #f8fafc);
    text-align: center;
}

.soves-nearby-dates__prompt {
    margin: 0 0 14px;
    color: var(--soves-text, #172033);
    font-size: 15px;
    font-weight: 600;
}

.soves-nearby-dates__yes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--soves-primary, var(--soves-brand-primary));
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.soves-nearby-dates__yes:hover,
.soves-nearby-dates__yes:focus-visible {
    filter: brightness(0.94);
}

.soves-nearby-dates__results {
    margin-top: 16px;
}

.soves-nearby-dates__loading,
.soves-nearby-dates__empty,
.soves-nearby-dates__error {
    margin: 0;
    color: var(--soves-muted, #667085);
    font-size: 14px;
}

.soves-nearby-dates__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.soves-nearby-dates__option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 96px;
    padding: 10px 14px;
    border: 1px solid var(--soves-border, #e1e7ef);
    border-radius: 10px;
    background: #ffffff;
    color: var(--soves-text, #172033);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.soves-nearby-dates__option:hover,
.soves-nearby-dates__option:focus-visible {
    border-color: var(--soves-primary, var(--soves-brand-primary));
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.soves-nearby-dates__option strong {
    font-size: 13px;
    font-weight: 700;
}

.soves-nearby-dates__option span {
    font-size: 13px;
    font-weight: 600;
    color: var(--soves-primary, var(--soves-brand-primary));
}
