/* Classic marketplace cards sit inside the Studio results list on mobile. */

.sp-cards--classic {
    container-type: inline-size;
    container-name: tbo-tickets;
    gap: 12px;
}

.sp-cards--classic .sp-classic-item {
    display: block;
    margin: 0;
    padding: 0;
}

.sp-cards--classic .flight-card-compact,
.sp-cards--classic .tbo-ticket-card {
    width: 100%;
}

.sp-cards--classic .flight-card-compact {
    cursor: pointer;
}

/* Charter samples: desktop Studio quote + Request charter, on the classic card. */
.sp-cards--classic .flight-card-compact.fp-sample-card .fc-bottom {
    /* Same inset after the tear as empty-leg cards — not flush, not a hole. */
    padding-top: 16px !important;
    gap: 14px;
}

.sp-cards--classic .fp-sample-card .fc-bottom .flight-ratings {
    display: block !important;
    width: 100%;
}

.sp-cards--classic .fp-sample-card .fc-charter-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.sp-cards--classic .fp-sample-card .fc-charter-class {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.sp-cards--classic .fp-sample-card .fc-charter-class__label {
    font-family: var(--fc-font, inherit);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.25;
    color: var(--fc-text-secondary, var(--fc-label, #6e6e73));
}

.sp-cards--classic .fp-sample-card .fc-charter-class__value {
    font-family: var(--fc-font, inherit);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    min-width: 0;
    overflow-wrap: break-word;
}

.sp-cards--classic .fp-sample-card .fc-charter-quote {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    width: 100%;
    min-width: 0;
}

.sp-cards--classic .fp-sample-card .fc-charter-price-row .fc-charter-quote {
    flex: 0 0 auto;
    width: auto;
}

.sp-cards--classic .fp-sample-card .fc-charter-quote__approx {
    font-family: var(--fc-font, inherit);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.25;
    color: var(--fc-text-secondary, var(--fc-label, #6e6e73));
}

.sp-cards--classic .fp-sample-card .fc-charter-quote__amount {
    font-family: var(--fc-font, inherit);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.sp-cards--classic .fp-sample-card .fc-bottom .flight-actions {
    display: block !important;
    width: 100%;
    margin-top: 0;
}

.sp-cards--classic .fp-sample-card .action-buttons {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.sp-cards--classic .fp-sample-card .action-buttons .sp-card__book {
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
}

/* Charter photo: class lives next to the quote, so the hero keeps only seats. */
.sp-cards--classic .fp-sample-card .fc-hero .fc-hero-bottom {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.sp-cards--classic .sp-band {
    margin-bottom: 4px;
}

/* Mobile listing price rail — Studio quote with VALUE score on empty legs. */
@media (max-width: 768px) {
    .sp-cards--classic .flight-card-compact:not(.fp-sample-card) .fc-bottom .flight-ratings {
        display: none !important;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        width: calc(100% + 28px) !important;
        margin: 0 -14px;
        padding: 16px 14px 0;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .flight-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        border: none;
        padding: 0;
        margin: 0;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .fc-value-price-row {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        min-width: 0;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .fc-value-price-row .sp-card__score {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 2px;
        margin-top: 0;
        min-width: 0;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .fc-value-price-row .sp-card__score-label {
        font-family: var(--fc-font, inherit);
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 0.1em;
        line-height: 1.25;
        text-transform: uppercase;
        color: var(--fc-text-secondary, var(--fc-label, #6e6e73));
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .fc-value-price-row .sp-card__score-value {
        font-family: var(--fc-font, inherit);
        font-size: 22px;
        font-weight: 700;
        letter-spacing: -0.04em;
        line-height: 1.05;
        min-width: 0;
        overflow-wrap: break-word;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .fc-value-price-row .actions-price-display,
    .sp-cards--classic .flight-card-compact .fc-bottom .fc-value-price-row .actions-price-display--estimated {
        flex: 0 0 auto;
        width: auto;
        align-self: flex-end;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .actions-price-display,
    .sp-cards--classic .flight-card-compact .fc-bottom .actions-price-display--estimated {
        display: flex;
        flex-direction: column-reverse;
        align-items: flex-end;
        align-self: flex-end;
        width: 100%;
        max-width: 100%;
        gap: 2px;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .price-line {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-end;
        width: 100%;
        text-align: right;
        white-space: nowrap;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .price-meta {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: baseline;
        justify-content: flex-end;
        width: 100%;
        white-space: nowrap;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .current-price {
        font-size: 22px;
        font-weight: 700;
        line-height: 1.1;
        text-align: right;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .estimated-price-label,
    .sp-cards--classic .flight-card-compact .fc-bottom .estimated-price-label__from,
    .sp-cards--classic .flight-card-compact .fc-bottom .price-per-passenger {
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 0.01em;
        line-height: 1.25;
        color: var(--fc-text-secondary, var(--fc-label, #6e6e73));
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .action-buttons {
        width: 100%;
        margin-top: 0;
    }
}

/* Classic listing cards inherit pack chrome from the search page. */
.sp-page .flight-card-compact,
.sp-page .fp-multi-leg-card {
    --fc-bg: var(--sp-surface);
    --fc-text: var(--sp-ink);
    --fc-text-secondary: var(--sp-ink-soft);
    --fc-label: var(--sp-ink-faint);
    --fc-radius: 0;
    --fc-radius-inner: 0;
    --fc-separator: var(--sp-line);
    --fc-divider: var(--sp-line);
    --fc-font: var(--sp-font-body);
    background: var(--sp-surface);
    border: 1px solid var(--sp-line-strong);
    border-radius: 0;
    box-shadow: none;
}

.sp-page .tbo-ticket-card {
    --tt-accent: var(--sp-accent);
    --tt-accent-soft: var(--sp-accent-wash);
    --tt-accent-line: color-mix(in srgb, var(--sp-accent) 40%, transparent);
    --tt-bg: var(--sp-surface);
    --tt-border: var(--sp-line-strong);
    --tt-hairline: var(--sp-line);
    --tt-radius: 0;
    --tt-cabin-photo-radius: 0;
    background: var(--sp-surface);
    border: 1px solid var(--sp-line-strong);
    border-radius: 0;
    box-shadow: none;
}

.sp-page .flight-card-compact .action-buttons .book-btn,
.sp-page .fp-multi-leg-card .action-buttons .book-btn,
.sp-page .sp-cards--classic .action-buttons .sp-card__book {
    --cta-apple-fill: var(--sp-cta);
    --cta-apple-border: var(--sp-cta);
    --cta-apple-hover-fill: color-mix(in srgb, var(--sp-cta) 88%, #000);
    --cta-apple-hover-border: color-mix(in srgb, var(--sp-cta) 88%, #000);
    border-radius: 0;
    background: var(--sp-cta);
    color: var(--sp-cta-ink);
}

.sp-page .load-more-button {
    border-radius: 0;
    font-family: var(--sp-font-body);
}
