/* 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;
    width: 100%;
}

.sp-cards--classic .fp-sample-card .action-buttons .sp-card__book {
    flex: 1 1 auto;
    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;
        gap: 8px;
        width: 100%;
        white-space: nowrap;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .original-price {
        flex: 0 0 auto;
        text-align: right;
        font-size: 12px;
        font-weight: 400;
        line-height: 1.25;
        color: var(--fc-label);
        text-decoration: line-through;
        text-decoration-thickness: from-font;
    }

    .sp-cards--classic .flight-card-compact .fc-bottom .savings-line {
        flex: 0 0 auto;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.25;
        text-align: right;
    }

    .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 {
        font-size: 12px;
        font-weight: 500;
        line-height: 1.25;
        color: var(--fc-label);
        text-align: right;
    }

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