/* Combined [desert_trip_badge]: badges first, departure dates below.
 * Never apply inline-size containment to the shortcode wrapper: product-card
 * overlays are often absolutely positioned and shrink-to-fit. Containment
 * would collapse their intrinsic width to zero (icon-only pill, missing date).
 * The narrow, intrinsically sized two-row pill is the safe default.
 * A full-width loop / carousel item may act as the optional query container.
 */
.desert-trip-overview {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.desert-trip-overview__badges {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.desert-trip-overview > .desert-group-dates {
    width: max-content;
    max-width: 100%;
    margin: 0;
}

/* Desert Bookings: same exact geometry/typography as theme's .desert-trip-badge. */
.desert-trip-badge.desert-trip-badge--status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    white-space: nowrap;
    color: #fff;
}
.desert-trip-badge.desert-trip-badge--status-confirmed {
    background: #eaf4e9;
    border-color: #b7d4b7;
    color: #256136;
}
.desert-trip-badge.desert-trip-badge--status-full {
    background: #fff3e1;
    border-color: #ecd19e;
    color: #86520b;
}
.desert-trip-badge.desert-trip-badge--status-completed {
    background: #edf0f2;
    border-color: #c9ced3;
    color: #4e5963;
}

/* Dates reuse the same base geometry and type as .desert-trip-badge, but
 * keep their own neutral, opaque surface for legibility over product photos.
 * Trip status remains exclusively in [desert_trip_badge]. */
.desert-trip-badge.desert-group-dates {
    display: inline-flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 5px;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 8px 16px;
    box-sizing: border-box;
    border: 1px solid rgba(47, 79, 51, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .13);
    color: #205333;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    white-space: normal;
    text-shadow: none;
}
.desert-trip-badge.desert-group-dates .desert-group-dates__heading {
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    gap: 6px;
    margin: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    line-height: 1;
    white-space: nowrap;
}
.desert-trip-badge.desert-group-dates .desert-group-dates__heading > span {
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}
.desert-trip-badge.desert-group-dates .desert-group-dates__icon {
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: #35724a;
}
.desert-trip-badge.desert-group-dates .desert-group-dates__list {
    display: inline-flex;
    flex: 0 1 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 9px;
    width: auto;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    list-style: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.desert-trip-badge.desert-group-dates .desert-group-dates__list > .desert-group-dates__item {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    list-style: none;
}
.desert-trip-badge.desert-group-dates .desert-group-dates__list > .desert-group-dates__item::before,
.desert-trip-badge.desert-group-dates .desert-group-dates__list > .desert-group-dates__item::marker {
    content: none;
}
.desert-trip-badge.desert-group-dates .desert-group-dates__date {
    display: inline-block;
    margin: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    line-height: 1;
    white-space: nowrap;
    text-shadow: none;
}
.desert-trip-badge.desert-group-dates .desert-group-dates__more {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    line-height: 1;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.desert-trip-badge.desert-group-dates .desert-group-dates__more:hover,
.desert-trip-badge.desert-group-dates .desert-group-dates__more:focus-visible {
    color: #124322;
}
.desert-trip-badge.desert-group-dates--no-heading .desert-group-dates__list {
    padding-left: 0;
    border-left: 0;
}
/* The carousel/grid item has its own definite width (unlike an absolutely
 * positioned Elementor shortcode). Container queries are safe on these outer
 * items, never on .desert-trip-overview or its overlay widget.
 * A custom card without one of these ancestors keeps the two-row fallback.
 */
:is(.swiper-slide, .e-loop-item, .woocommerce ul.products li.product):has(.desert-trip-overview) {
    container: desert-trip-card / inline-size;
}
@container desert-trip-card (min-width: 420px) {
    .desert-trip-overview > .desert-trip-badge.desert-group-dates {
        flex-direction: row;
        align-items: center;
        gap: 9px;
    }
    .desert-trip-overview .desert-trip-badge.desert-group-dates .desert-group-dates__list {
        padding-left: 9px;
        border-left: 1px solid rgba(47, 79, 51, .25);
    }
}

/* List items may need to scroll when several departure dates are present;
 * never clip the heading or hide the first date behind the rounded surface. */
.desert-trip-overview .desert-trip-badge.desert-group-dates .desert-group-dates__list {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}
/* Opt-in departure automatically awaits the paid-traveler threshold. */
.desert-trip-badge.desert-trip-badge--status-pending {
    color: #855b15; background: #fff6e6; border-color: #efd8ac;
}

/* Single-product hero is wider than the slider card. On that template show
 * heading + first date inline; do not rely on .swiper-slide container query.
 * Tiny phones return to the intrinsically-sized two-row variant. */
@media (min-width: 360px) {
    body.single-product .desert-trip-overview--single > .desert-trip-badge.desert-group-dates {
        flex-direction: row;
        align-items: center;
        gap: 9px;
    }
    body.single-product .desert-trip-overview--single > .desert-trip-badge.desert-group-dates .desert-group-dates__list {
        padding-left: 9px;
        border-left: 1px solid rgba(47, 79, 51, .25);
    }
}
/* Do not let an overflow-constrained hero crop the date: revert to two lines
 * when the actual single-product component is narrow. */
@container desert-trip-card (max-width: 419px) {
    body.single-product .desert-trip-overview--single > .desert-trip-badge.desert-group-dates {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    body.single-product .desert-trip-overview--single > .desert-trip-badge.desert-group-dates .desert-group-dates__list {
        padding-left: 0;
        border-left: 0;
    }
}
