/* The cart: the headers' cart link (templates/_cart_link.html) and the cart page (templates/cart.html).
   Colours: static/css/araxi-tokens.css */

/* ---------- Header link: a rolling suitcase with the number of bookings ---------- */
.cart-link {
    position: relative;
    z-index: 2;                    /* above the open phone menu, like the menu button */
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: inherit;                /* the header's text colour (white over photos, navy when solid) */
    text-decoration: none;
    transition: background-color .25s, color .25s;
}
.cart-link:hover {
    color: inherit;
    background-color: rgba(197, 144, 84, .16);
}
.cart-link:focus-visible {
    outline: 2px solid var(--ochre-500);
    outline-offset: 2px;
}
.cart-link__icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cart-link__count {
    position: absolute;
    top: 3px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--ochre-500);
    color: var(--navy-950);
    font: 700 11px/18px var(--font-body, sans-serif);
    text-align: center;
    box-shadow: 0 0 0 2px var(--cream-50);
}
.cart-link__count[hidden] {
    display: none;
}
/* a booking was just added */
.cart-link.is-bumped .cart-link__count {
    animation: cart-bump .45s var(--ease-out, ease-out);
}
@keyframes cart-bump {
    40% { transform: scale(1.35); }
}
@media (prefers-reduced-motion: reduce) {
    .cart-link.is-bumped .cart-link__count { animation: none; }
}

/* landing-page header (site-chrome.css): the navigation keeps to the right, next to the cart; on
   phones the navigation is the full-screen menu, and the cart sits beside the menu button */
.site-header__inner .site-nav { margin-left: auto; }
@media (max-width: 899px) {
    .site-header__inner .cart-link { margin-left: auto; margin-right: -.75rem; }
}

/* public pages' own header (public.html, styles.css): at its right end */
.header_public .cart-link {
    margin-left: auto;
    color: var(--navy-900);
}

/* ---------- Cart page ---------- */
.bk-cart {
    box-sizing: border-box;
    width: 100%;
    max-width: 960px;
    margin: calc(var(--header-h, 76px) + 32px) auto 56px;
    padding: 0 var(--gutter, 20px);
    font-family: var(--font-body);
    color: var(--ink-900);
    text-align: left;
}
.bk-cart *,
.bk-cart *::before,
.bk-cart *::after { box-sizing: border-box; }

.bk-cart__title {
    margin: 0 0 6px;
    font: 400 clamp(1.9rem, 4vw, 2.6rem)/1.15 var(--font-display);
    color: var(--navy-900);
}
.bk-cart__lead {
    margin: 0 0 28px;
    color: var(--ink-600);
}

.bk-cart__list {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bk-cart-item {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr) auto;
    gap: 22px;
    align-items: start;
    padding: 18px;
    background: var(--white);
    border: 1px solid var(--cream-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}
.bk-cart-item__image {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--cream-200);
}
.bk-cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bk-cart-item__product {
    margin: 0 0 2px;
    font: 600 12px/1.3 var(--font-body);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-600);
}
.bk-cart-item__title {
    margin: 0 0 10px;
    font: 400 1.35rem/1.25 var(--font-display);
}
.bk-cart-item__title a {
    color: var(--navy-900);
    text-decoration: none;
}
.bk-cart-item__title a:hover { text-decoration: underline; }
.bk-cart-item__choices {
    display: grid;
    gap: 4px;
    margin: 0;
    font-size: 14px;
}
.bk-cart-item__choices div { display: flex; gap: 6px; flex-wrap: wrap; }
.bk-cart-item__choices dt { color: var(--ink-600); }
.bk-cart-item__choices dd { margin: 0; font-weight: 600; }
.bk-cart-item__unavailable {
    margin: 0;
    color: #a63a2a;
    font-weight: 600;
}

.bk-cart-item__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    min-width: 190px;
}
.bk-cart-item__lines {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--ink-600);
}
.bk-cart-item__lines li { display: flex; justify-content: space-between; gap: 12px; }
.bk-cart-item__total {
    margin: 0;
    font: 700 1.25rem/1.2 var(--font-body);
    color: var(--navy-900);
}
.bk-cart-item__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* the service page's outlined buttons (booking.css .bk-btn) */
.bk-cart .bk-btn {
    height: 44px;
    padding: 0 20px;
    font-size: 15px;
    text-decoration: none;
}
.bk-cart-item__remove {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--cream-200);
    border-radius: 50%;
    background: transparent;
    color: var(--ink-600);
    cursor: pointer;
    transition: color .2s, border-color .2s, background-color .2s;
}
.bk-cart-item__remove:hover {
    color: #a63a2a;
    border-color: currentColor;
    background-color: rgba(166, 58, 42, .06);
}
.bk-cart-item__remove svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* the empty cart: a suitcase in an ochre circle, a Marcellus heading, the way to the journeys */
.bk-cart__empty {
    display: grid;
    justify-items: center;
    padding: 56px 28px 48px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0, rgba(197, 144, 84, .1), transparent 60%),
        var(--white);
    border: 1px solid var(--cream-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}
.bk-cart__empty[hidden] {
    display: none;
}
.bk-cart__empty-icon {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin-bottom: 20px;
    border-radius: 50%;
    color: var(--ochre-600);
    background: rgba(197, 144, 84, .14);
    box-shadow: 0 0 0 10px rgba(197, 144, 84, .06);
}
.bk-cart__empty .cart-link__icon {
    width: 40px;
    height: 40px;
    color: inherit;
}
.bk-cart .bk-cart__empty-title {
    margin: 0 0 10px;
    font: 400 clamp(1.5rem, 3vw, 1.9rem)/1.2 var(--font-display);
    color: var(--navy-900);
    text-align: center;
}
.bk-cart .bk-cart__empty p {
    max-width: 460px;
    margin: 0 0 24px;
    line-height: 1.55;
    color: var(--ink-600);
    text-align: center;
}
.bk-cart__empty .bk-btn {
    display: inline-flex;
    align-items: center;
    padding: 0 28px;
}
.bk-cart .bk-cart__empty .bk-cart__empty-more {
    margin: 20px 0 0;
    font-size: 14px;
}
.bk-cart__empty-more a {
    color: var(--river-600);
    font-weight: 600;
}

@media (max-width: 700px) {
    .bk-cart-item {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }
    .bk-cart-item__side {
        grid-column: 1 / -1;
        align-items: stretch;
        min-width: 0;
    }
    .bk-cart-item__total { text-align: right; }
    .bk-cart-item__actions .bk-btn { flex: 1; }
}
.bk-cart-item__unavailable a {
    margin-left: 4px;
    color: var(--navy-900);
}
.bk-cart-item__note {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--ink-600);
}
.bk-cart-item__note--same {
    display: inline-block;
    padding: 4px 10px;
    color: var(--ochre-600);
    background: rgba(197, 144, 84, .12);
    border-radius: 999px;
    font-weight: 600;
}

/* ---------- Notes and "Edit" (static/JS/booking.js initCartPage) ---------- */
.bk-cart-item__notes dd {
    font-weight: 500;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.bk-cart-item [data-notes-missing] {
    margin-top: 8px;
    font-size: 13px;
}
.bk-cart-item__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}
.bk-cart-item__edit-btn[aria-expanded="true"] {
    background-color: rgba(197, 144, 84, .12);
}
.bk-cart-item__editor {
    grid-column: 1 / -1;
    padding-top: 18px;
    border-top: 1px solid var(--cream-200);
}
.bk-cart-item__editor[hidden] {
    display: none;
}
.bk-cart-editor {
    max-width: 560px;
    margin: 0 auto;
    gap: 22px;
}
.bk-cart-editor__price {
    margin: 0;
    font: 700 1.15rem/1.2 var(--font-body);
    color: var(--navy-900);
}
.bk-cart-editor__price:empty {
    display: none;
}
.bk-cart-editor__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---------- "Book all": the bar on the cart page and the order page (templates/cart-checkout.html) ---------- */
.bk-cart__all {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin: 0 0 18px;
    padding: 16px 18px;
    background: var(--white);
    border: 1px solid var(--ochre-500);
    border-radius: var(--radius);
}
.bk-cart__all p {
    margin: 0;
    font-weight: 600;
    color: var(--navy-900);
}
.bk-cart .bk-btn--solid,
.bk-cart .bk-btn--solid:hover {
    color: #fff;
    background-color: var(--bk-btn-color, #c59054e6);
    border-color: var(--bk-btn-color, #c59054e6);
}
.bk-cart .bk-btn--solid:hover {
    filter: brightness(.94);
}
.bk-cart .bk-btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

.bk-checkout__back {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--ink-600);
    text-decoration: none;
}
.bk-checkout__back:hover { color: var(--navy-900); text-decoration: underline; }
.bk-checkout .bk-cart-item {
    grid-template-columns: minmax(0, 1fr) auto;
}
.bk-checkout__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin: 18px 0 28px;
    padding: 16px 18px;
    background: var(--white);
    border: 1px solid var(--cream-200);
    border-radius: var(--radius);
    font-size: 1.05rem;
}
.bk-checkout__total strong {
    font: 700 1.5rem/1.2 var(--font-body);
    color: var(--navy-900);
}
.bk-checkout__form {
    display: grid;
    gap: 16px;
    padding: 22px 18px;
    background: var(--white);
    border: 1px solid var(--cream-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}
.bk-checkout__heading {
    margin: 0;
    font: 400 1.4rem/1.2 var(--font-display);
    color: var(--navy-900);
}
.bk-checkout__hint {
    margin: -10px 0 0;
    font-size: 14px;
    color: var(--ink-600);
}
.bk-checkout__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}
.bk-checkout__form label {
    display: grid;
    gap: 6px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-900);
}
.bk-checkout__wide {
    grid-column: 1 / -1;
}
.bk-checkout__form input:not([type="checkbox"]),
.bk-checkout__form select {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    font: 400 15px/1.3 var(--font-body);
    color: var(--navy-900);
    background-color: #fff;
    border: 1px solid var(--cream-200);
    border-radius: 12px;
}
.bk-checkout__form input:focus-visible,
.bk-checkout__form select:focus-visible {
    outline: none;
    border-color: var(--navy-900);
    box-shadow: 0 0 0 3px rgba(7, 35, 57, .14);
}
.bk-checkout__form .is-invalid {
    border-color: var(--ochre-600, #a9733a) !important;
}
.bk-checkout__form .bk-checkout__terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 500;
}
.bk-checkout__terms input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--navy-900);
}
.bk-checkout__terms input.is-invalid {
    outline: 2px solid var(--ochre-600, #a9733a);
    outline-offset: 1px;
}
.bk-checkout__terms a {
    color: var(--river-600);
}
.bk-checkout__submit {
    justify-self: end;
    min-width: 200px;
}
.bk-checkout .bk-message {
    margin: 0;
}
@media (max-width: 600px) {
    .bk-checkout__fields {
        grid-template-columns: minmax(0, 1fr);
    }
    .bk-checkout .bk-cart-item {
        grid-template-columns: minmax(0, 1fr);
    }
    .bk-checkout__submit {
        justify-self: stretch;
    }
    .bk-cart__all .bk-btn {
        flex: 1 1 100%;
    }
}

/* styles.css centres headings and paragraphs site-wide: the cart and "Book all" read from the left */
.bk-cart h1,
.bk-cart h2,
.bk-cart p,
.bk-cart dl,
.bk-cart label {
    text-align: left;
}
.bk-cart .bk-cart-item__total,
.bk-cart .bk-checkout__total {
    text-align: right;
}
.bk-cart .bk-cart__lead,
.bk-cart .bk-checkout__hint {
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* ---------- "Book all": the promo code and the total (templates/cart-checkout.html) ---------- */
.bk-checkout__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    margin: 18px 0 28px;
}
.bk-checkout__summary > :only-child {
    grid-column: 1 / -1;
}
.bk-checkout__summary .bk-checkout__total {
    margin: 0;
}
.bk-checkout__promo {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 14px 18px;
    background: var(--white);
    border: 1px solid var(--cream-200);
    border-radius: var(--radius);
}
.bk-checkout__promo-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-900);
}
.bk-checkout__promo-row {
    display: flex;
    gap: 8px;
}
.bk-checkout__promo-row input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 10px 14px;
    font: 400 15px/1.3 var(--font-body);
    color: var(--navy-900);
    background-color: #fff;
    border: 1px solid var(--cream-200);
    border-radius: 12px;
}
.bk-checkout__promo-row input:focus-visible {
    outline: none;
    border-color: var(--navy-900);
    box-shadow: 0 0 0 3px rgba(7, 35, 57, .14);
}
.bk-checkout__promo-row input.is-invalid {
    border-color: var(--ochre-600, #a9733a);
}
.bk-checkout__promo-row .bk-btn {
    flex: none;
}
.bk-checkout__promo-note {
    margin: 0;
    font-size: 13px;
}
.bk-checkout__promo-note:empty {
    display: none;
}
.bk-checkout__promo-note.is-ok {
    font-weight: 600;
    color: var(--river-600);
}
.bk-checkout__promo-note.is-error {
    color: var(--ochre-600, #a9733a);
}
.bk-checkout__amounts {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px 12px;
}
.bk-checkout__old {
    color: var(--ink-600);
    font-size: .95rem;
}
.bk-checkout__old[hidden] {
    display: none;
}
.bk-checkout__promo-line {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--river-600);
    text-align: right !important;
}
.bk-checkout__promo-line[hidden] {
    display: none;
}
@media (max-width: 700px) {
    .bk-checkout__summary {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* styles.css / Bootstrap give form buttons their own colour and size: the app's outlined button wins here */
.bk-cart .bk-checkout__promo-row .bk-btn {
    width: auto;
    height: 44px;
    margin: 0;
    padding: 0 18px;
    font: 600 15px/1 var(--font-body);
    color: #c59054;
    background: transparent;
    border: 1.5px solid #c59054e6;
    border-radius: 999px;
    box-shadow: none;
}
.bk-cart .bk-checkout__promo-row .bk-btn:hover,
.bk-cart .bk-checkout__promo-row .bk-btn:focus {
    color: #a8743d;
    background-color: rgba(197, 144, 84, .1);
}
.bk-cart .bk-checkout__promo-row .bk-btn:focus-visible {
    outline: 2px solid var(--navy-900);
    outline-offset: 2px;
}
.bk-cart .bk-checkout__promo-note {
    text-align: left !important;
}
.bk-cart .bk-checkout__promo-row {
    align-items: center;
}
.bk-cart .bk-checkout__hint {
    text-align: left !important;
}
.bk-cart__title + .bk-cart__empty {
    margin-top: 24px;
}
