/**
 * Bohemian Marine Phuket
 * Yacht Pricing
 *
 * Shortcode: [yacht_pricing]
 */


/* =========================================================
   BASE
   ========================================================= */

.bmp-yacht-pricing {
    width: 100%;
}

.bmp-yacht-pricing__section {
    width: 100%;
    margin-bottom: clamp(2rem, 4vw, 4rem);
}

.bmp-yacht-pricing__section:last-child {
    margin-bottom: 0;
}


/* =========================================================
   SECTION HEADER
   ========================================================= */

.bmp-yacht-pricing__section-header {
    margin-bottom: 1.25rem;
}

.bmp-yacht-pricing__title {
    margin: 0;
}

.bmp-yacht-pricing__subtitle {
    margin-top: 0.4rem;
    color: var(--color-content-text, inherit);
    opacity: 0.7;
}


/* =========================================================
   MOBILE
   ========================================================= */

.bmp-yacht-pricing__grid {
    width: 100%;
}


/* Hide desktop season header on mobile */

.bmp-yacht-pricing__grid-header {
    display: none;
}


/* Individual destination / program */

.bmp-yacht-pricing__row {
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.5rem;
    background: #fff;
}

.bmp-yacht-pricing__row:last-child {
    margin-bottom: 0;
}


/* Destination / route */

.bmp-yacht-pricing__route {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.035);
}

.bmp-yacht-pricing__mobile-label {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.55;
}

.bmp-yacht-pricing__route-name {
    font-weight: 600;
    line-height: 1.4;
}


/* Times / value details */

.bmp-yacht-pricing__details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin-top: 0.5rem;
}

.bmp-yacht-pricing__detail {
    font-size: 0.875rem;
    line-height: 1.4;
    opacity: 0.75;
}

.bmp-yacht-pricing__detail-label {
    font-weight: 600;
}


/* Season blocks */

.bmp-yacht-pricing__season {
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.bmp-yacht-pricing__season-mobile-title {
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
}


/* Prices */

.bmp-yacht-pricing__values {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, 7rem), 1fr)
    );
    gap: 0.75rem;
}

.bmp-yacht-pricing__value {
    min-width: 0;
}

.bmp-yacht-pricing__value-label {
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
    line-height: 1.3;
    opacity: 0.6;
}

.bmp-yacht-pricing__value-amount {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

.bmp-yacht-pricing__value-amount.is-unavailable {
    font-weight: 400;
    opacity: 0.4;
}


/* =========================================================
   NOTES
   ========================================================= */

.bmp-yacht-pricing__notes {
    margin-top: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0.75;
}

.bmp-yacht-pricing__note + .bmp-yacht-pricing__note {
    margin-top: 0.35rem;
}


/* =========================================================
   TABLET / DESKTOP
   ========================================================= */

@media (min-width: 768px) {

    /*
     * Allows large seasonal pricing sets such as F1/F2 to
     * scroll horizontally only when truly necessary.
     */

    .bmp-yacht-pricing__grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid rgba(0, 0, 0, 0.12);
        border-radius: 0.5rem;
    }


    /*
     * First column + one column for every season.
     */

    .bmp-yacht-pricing__grid-header,
    .bmp-yacht-pricing__row {
        display: grid;
        grid-template-columns:
            minmax(13rem, 1.35fr)
            repeat(
                var(--bmp-season-count),
                minmax(9rem, 1fr)
            );
    }


    /*
     * Give the whole grid enough room where many seasons exist.
     */

    .bmp-yacht-pricing__grid-header,
    .bmp-yacht-pricing__rows {
        min-width: max(
            100%,
            calc(
                13rem +
                (var(--bmp-season-count) * 9rem)
            )
        );
    }


    /* Desktop header */

    .bmp-yacht-pricing__grid-header {
        background: rgba(0, 0, 0, 0.06);
    }

    .bmp-yacht-pricing__header-cell {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        padding: 0.8rem 1rem;
        border-right: 1px solid rgba(0, 0, 0, 0.1);
        font-size: 0.8125rem;
        font-weight: 600;
        line-height: 1.35;
        text-align: center;
    }

    .bmp-yacht-pricing__header-cell:last-child {
        border-right: 0;
    }

    .bmp-yacht-pricing__header-cell--first {
        justify-content: flex-start;
        text-align: left;
    }


    /* Rows */

    .bmp-yacht-pricing__row {
        margin: 0;
        border: 0;
        border-radius: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        background: #fff;
    }

    .bmp-yacht-pricing__route,
    .bmp-yacht-pricing__season {
        min-width: 0;
        padding: 1rem;
        border: 0;
        border-right: 1px solid rgba(0, 0, 0, 0.1);
    }

    .bmp-yacht-pricing__season:last-child {
        border-right: 0;
    }

    .bmp-yacht-pricing__route {
        background: transparent;
    }


    /* Not needed on desktop */

    .bmp-yacht-pricing__mobile-label,
    .bmp-yacht-pricing__season-mobile-title {
        display: none;
    }


    /* Prices within each season */

    .bmp-yacht-pricing__values {
        height: 100%;
        align-items: center;
    }

    .bmp-yacht-pricing__value {
        text-align: center;
    }

}