/* Sticky price bar on the checkout Start and Participants steps: one compact row, with the breakdown collapsed until asked for. */
.checkout-bar {
    position: sticky;
    bottom: calc(12px + var(--cookie-consent-height, 0px));
    margin-top: 24px;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    background: #123c4a;
    color: #fff;
    box-shadow: 0 12px 30px rgba(13,46,57,.28);
}

.checkout-bar .price-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    width: max-content;
    max-width: 100%;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.checkout-bar .price-summary::-webkit-details-marker {
    display: none;
}

.checkout-bar .price-summary::after {
    content: '\25B4';
    color: #7ce0d5;
}

.checkout-bar .price-details[open] .price-summary::after {
    content: '\25BE';
}

.checkout-bar .price-summary strong {
    color: #7ce0d5;
    font-size: 1.1em;
}

/* Taken out of flow so the actions share the summary's row while the breakdown opens across the full width. */
.checkout-bar .bar-actions {
    position: absolute;
    top: 8px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 36px;
    white-space: nowrap;
}

.checkout-bar .bar-actions .btn {
    padding: 6px 16px;
    font-size: 15px;
}

.checkout-bar .bar-back,
.checkout-bar .bar-back:hover {
    color: #fff;
}

.checkout-bar .bar-back-short {
    display: none;
}

.checkout-bar .price-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.16);
}

.checkout-bar .price-row {
    display: flex;
    flex-direction: column;
    font-size: .85em;
}

.checkout-bar .price-row span:first-child {
    color: #b9d2d8;
}

.checkout-bar .price-row.total span:first-child {
    color: #fff;
}

.checkout-bar .price-row.total span:last-child {
    color: #7ce0d5;
    font-weight: 800;
}

.checkout-bar .price-note {
    width: 100%;
    color: #b9d2d8;
    font-size: .8em;
}

@media (max-width: 700px) {
    .checkout-bar {
        bottom: calc(6px + var(--cookie-consent-height, 0px));
        padding: 6px 10px;
    }

    .checkout-bar .bar-actions {
        top: 6px;
        right: 10px;
        gap: 10px;
    }

    .checkout-bar .bar-actions .btn {
        padding: 6px 12px;
        font-size: 14px;
    }

    /* The quantity and the longer link wording give way to the total and the actions on a phone. */
    .checkout-bar .bar-count,
    .checkout-bar .bar-back-full {
        display: none;
    }

    .checkout-bar .bar-back-short {
        display: inline;
    }

    /* Outlined and full height so it reads as, and taps like, a button beside the main action. */
    .checkout-bar .bar-back {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        min-height: 36px;
        padding: 0 8px;
        border: 1px solid rgba(255,255,255,.7);
        border-radius: 4px;
        font-size: 14px;
        text-decoration: none;
    }

    .checkout-bar .price-breakdown {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .checkout-bar .price-row {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }
}

/* Phones: use the page gutter so the total and both buttons fit on one row. */
@media (max-width: 480px) {
    .checkout-bar {
        margin-left: -12px;
        margin-right: -12px;
    }

    /* "Total" sits above the amount, with the arrow beside both, so the label costs no width. */
    .checkout-bar .price-summary {
        display: grid;
        grid-template-columns: auto auto;
        align-items: center;
        align-content: center;
        gap: 0 6px;
        line-height: 1.15;
    }

    .checkout-bar .price-summary > span {
        grid-column: 1;
        grid-row: 1;
        font-size: 11px;
    }

    .checkout-bar .price-summary strong {
        grid-column: 1;
        grid-row: 2;
        font-size: 14px;
    }

    .checkout-bar .price-summary::after {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .checkout-bar .bar-actions {
        gap: 6px;
    }

    .checkout-bar .bar-actions .btn {
        padding: 6px 10px;
    }
}

@media (max-width: 340px) {
    .checkout-bar .price-summary strong {
        font-size: 13px;
    }

    .checkout-bar .bar-back {
        padding: 0 6px;
    }

    .checkout-bar .bar-actions .btn {
        padding: 6px 8px;
    }
}
