/*
 * Holiday Booking - booking-specific styles.
 *
 * Standard elements (buttons, cards, forms, grid) render with the host theme's
 * Bootstrap 5 classes, so they match the site natively and are not styled here.
 * This file only styles the booking-specific pieces Bootstrap has no component
 * for, each under a single root class and scoped, driven by --hbk-* tokens a
 * customer theme can override. Requires Bootstrap 5 on the host theme.
 */
.hbk {
    --hbk-color-surface: #ffffff;
    --hbk-color-text: #1f2a24;
    --hbk-color-muted: #6b7770;
    --hbk-color-border: #e2e2e2;
    --hbk-color-on-primary: #ffffff;
    --hbk-color-chip-bg: #f4f4f4;
    --hbk-color-chip-fg: var(--hbk-color-text);
    --hbk-color-accent: #b8863b;
    --hbk-color-available: #2f5d50;
    --hbk-color-unavailable: #cfc9bd;
    --hbk-color-price: var(--hbk-color-accent);
    --hbk-color-surface-dark: #1f2a24;

    --hbk-font-heading: inherit;
    --hbk-font-size-sm: 0.875rem;
    --hbk-font-size-lg: 1.25rem;
    --hbk-font-weight-medium: 600;

    --hbk-radius-sm: 6px;
    --hbk-radius-md: 12px;
    --hbk-space-unit: 8px;
}

.hbk *,
.hbk *::before,
.hbk *::after {
    box-sizing: border-box;
}

/* Shared booking-specific atoms */
.hbk-eyebrow {
    margin: 0 0 calc(var(--hbk-space-unit) * 0.5);
    font-size: var(--hbk-font-size-sm);
    color: var(--hbk-color-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hbk-price {
    font-family: var(--hbk-font-heading);
    color: var(--hbk-color-price);
    font-weight: var(--hbk-font-weight-medium);
}

.hbk-note {
    font-size: var(--hbk-font-size-sm);
    color: var(--hbk-color-muted);
}

/* Property: gallery + "what's included" + cost card */
.hbk-prose {
    margin-top: calc(var(--hbk-space-unit) * 2);
}

.hbk-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--hbk-space-unit);
    margin-bottom: calc(var(--hbk-space-unit) * 2);
}

.hbk-gallery img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--hbk-radius-sm);
}

.hbk-gallery img.is-lead {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 7;
    border-radius: var(--hbk-radius-md);
}

.hbk-features {
    list-style: none;
    padding-left: 0;
}

.hbk-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hbk-feature .material-symbols-outlined {
    font-size: 1.25rem;
    color: var(--hbk-color-available);
    flex: none;
}

.hbk-costcard .hbk-price {
    font-size: var(--hbk-font-size-lg);
    margin-bottom: var(--hbk-space-unit);
}

.hbk-costcard-meta {
    margin: var(--hbk-space-unit) 0 0;
}

/* Sticky compact "your search" bar on the results page */
.hbk-compact-search {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: calc(var(--hbk-space-unit) * 2);
    flex-wrap: wrap;
    padding: calc(var(--hbk-space-unit) * 1.25) calc(var(--hbk-space-unit) * 2);
    margin-bottom: calc(var(--hbk-space-unit) * 2.5);
    background: var(--hbk-color-surface, #fff);
    border: 1px solid var(--hbk-color-border);
    border-radius: var(--hbk-radius-sm);
}

.hbk-compact-search-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--hbk-font-size-sm);
    font-weight: 700;
    color: var(--hbk-color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Segmented "your search" summary: bordered Dates | Guests | Type cells. */
.hbk-compact-cells {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    border: 1px solid var(--hbk-color-border);
    border-radius: var(--hbk-radius-sm);
}

.hbk-compact-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 1rem;
    border-right: 1px solid var(--hbk-color-border);
}

.hbk-compact-cell:last-child {
    border-right: 0;
}

.hbk-compact-cell-icon {
    color: var(--hbk-color-accent);
    font-size: 1.15rem;
}

.hbk-compact-cell-body {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.hbk-compact-cell-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hbk-color-muted);
}

.hbk-compact-cell-value {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--hbk-color-text);
}

.hbk-compact-search-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    font-weight: var(--hbk-font-weight-medium);
}

.hbk-compact-search-label .material-symbols-outlined,
.hbk-compact-search-edit .material-symbols-outlined {
    font-size: 1.1rem;
}

/* Results-page count header: the count and the "for {dates}" line sit inline,
   baseline-aligned (design). */
.hbk-results-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: calc(var(--hbk-space-unit) * 1.5);
    margin-bottom: calc(var(--hbk-space-unit) * 2.5);
}

.hbk-results-head h2 {
    margin: 0;
}

.hbk-results-sub {
    font-size: var(--hbk-font-size-sm);
    color: var(--hbk-color-muted);
}

/* Space between the full-bleed hero and the results content ("your search"). */
.hbk-results-block {
    padding-top: calc(var(--hbk-space-unit) * 4);
}

/* Filter bar above the results grid: refine pills (Property type / Bedrooms /
   Features) on the left, Sort pill on the right. */
.hbk-filterbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: calc(var(--hbk-space-unit) * 1.25);
    margin-bottom: calc(var(--hbk-space-unit) * 3);
}

.hbk-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--hbk-color-border);
    border-radius: 999px;
    background: var(--hbk-color-surface, #fff);
    cursor: pointer;
}

.hbk-filter-pill.is-disabled {
    opacity: 0.55;
    cursor: default;
}

.hbk-filter-sort {
    margin-left: auto;
}

.hbk-filter-pill-icon {
    color: var(--hbk-color-accent);
    font-size: 1.15rem;
}

.hbk-filter-pill-body {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
    min-width: 0;
}

.hbk-filter-pill-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hbk-color-muted);
}

.hbk-filter-pill-value,
.hbk-filter-pill-select {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--hbk-color-text);
}

/* The native select reads as plain text inside the pill; our own caret shows
   the dropdown affordance. */
.hbk-filter-pill-select {
    max-width: 12rem;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.hbk-filter-pill-select:focus {
    outline: none;
}

.hbk-filter-pill-caret {
    color: var(--hbk-color-muted);
    font-size: 1.1rem;
}

/* Features: the one multi-value filter, so a <details> panel of checkboxes
   instead of a <select>. The pill itself carries the padding and border, so the
   <summary> is a bare flex row inside it. */
.hbk-filter-check {
    position: relative;
    display: inline-block;
    padding: 0;
}

.hbk-filter-check-summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.9rem;
    list-style: none;
    cursor: pointer;
}

.hbk-filter-check-summary::-webkit-details-marker {
    display: none;
}

.hbk-filter-check[open] .hbk-filter-pill-caret {
    transform: rotate(180deg);
}

/* Absolutely positioned so opening the panel overlays the results rather than
   shoving the whole grid down the page. z-index clears the result cards, which
   establish stacking contexts of their own. */
.hbk-filter-check-panel {
    position: absolute;
    z-index: 5;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: 18rem;
    padding: calc(var(--hbk-space-unit) * 1.5);
    border: 1px solid var(--hbk-color-border);
    border-radius: var(--hbk-radius-md);
    background: var(--hbk-color-surface, #fff);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Right-align the panel when the pill sits in the right half of the bar, so a
   late filter cannot push it off the viewport edge. */
.hbk-filter-check:nth-last-child(-n + 2) .hbk-filter-check-panel {
    left: auto;
    right: 0;
}

.hbk-filter-check-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    cursor: pointer;
}

.hbk-filter-check-option input {
    flex: none;
    width: 1rem;
    height: 1rem;
    accent-color: var(--hbk-color-accent);
    cursor: pointer;
}

.hbk-filter-check-actions {
    margin-top: calc(var(--hbk-space-unit) * 1.5);
    padding-top: var(--hbk-space-unit);
    border-top: 1px solid var(--hbk-color-border);
}

/* Framed stay price on cards: "Accommodation · N nights" + total + fees note */
/* Result-card body: a flex column so the price/CTA footer pins to the bottom of
   every card (margin-top:auto), keeping the grid tidy whatever each card holds.
   The plugin owns this layout so it travels with the card, not the theme. */
.hbk-results .card-body {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 18px 20px 20px;
}

.hbk-results .card-body > .hbk-eyebrow,
.hbk-results .card-body > .card-title,
.hbk-results .card-body > .hbk-differentiator-row,
.hbk-results .card-body > .hbk-specs,
.hbk-results .card-body > .hbk-chips {
    margin: 0;
}

/* Icon-labelled unit specs (Sleeps N, N bedrooms — one Material Symbol each) */
.hbk-specs {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--hbk-space-unit) * 1.5);
    list-style: none;
    padding: 0;
}

.hbk-spec {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--hbk-font-size-sm);
    color: var(--hbk-color-text);
}

.hbk-spec .material-symbols-outlined {
    font-size: 1.2rem;
    color: var(--hbk-color-muted);
}

/* Card footer: a hairline, then the price (left) and CTA (right) on one row.
   For a dated stay a label row sits above it ("Accommodation · N nights" on the
   left, "+ fees at checkout" on the right). */
.hbk-card-foot {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: var(--hbk-space-unit);
    row-gap: 14px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--hbk-color-border);
}

.hbk-card-foot .hbk-card-stay-label {
    grid-column: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 0.72rem;
    line-height: 1.3;
    color: var(--hbk-color-muted);
}

.hbk-card-foot .hbk-note {
    grid-column: 2;
    justify-self: end;
    font-size: 0.72rem;
    white-space: nowrap;
}

.hbk-card-foot .hbk-price {
    grid-column: 1;
    justify-self: start;
    margin: 0;
}

/* Card CTA = the design's small button (9px 20px / 1.0625rem) with the label
   and trailing arrow centred. */
.hbk-card-foot .btn {
    grid-column: 2;
    justify-self: end;
    padding: 9px 20px;
    font-size: 1.0625rem;
    line-height: 1.1;
}

.hbk-card-foot .btn .material-symbols-outlined {
    font-size: 16px;
    line-height: 1;
}

/* Card image + "Available {dates}" availability badge overlay */
.hbk-card-media {
    position: relative;
}

/* Fallback when a unit has no SC/CPT photo (or the photo fails to load). The
   plugin sizes the box + a neutral tint; the theme paints its placeholder image
   on top (a direct url in the theme stylesheet, so it resolves reliably). */
.hbk-card-media.is-placeholder,
.hbk-gallery-placeholder {
    background-color: #e9efec;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hbk-card-media.is-placeholder {
    aspect-ratio: 16 / 10;
}

.hbk-card-media.is-placeholder .card-img-top {
    display: none;
}

.hbk-gallery-placeholder {
    aspect-ratio: 16 / 9;
    margin-bottom: calc(var(--hbk-space-unit) * 2);
    border-radius: var(--hbk-radius-md);
}

.hbk-avail-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: var(--hbk-color-surface-dark, rgba(35, 48, 49, 0.9));
    color: var(--hbk-color-on-primary, #fff);
    font-size: var(--hbk-font-size-sm);
    font-weight: var(--hbk-font-weight-medium);
}

.hbk-avail-badge .material-symbols-outlined {
    font-size: 1rem;
}

/* Feature chips on result cards (from the curated Features taxonomy), each with
   a Material Symbol picked from the feature name by FeatureIcon. */
.hbk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--hbk-space-unit) * 0.6);
    list-style: none;
    padding: 0;
    margin: 0;
}

.hbk-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.5em 0.85em;
    border-radius: 999px;
    /* Design: light-grey fill, deep-teal ink; theme sets the exact hues. */
    background: var(--hbk-color-chip-bg);
    color: var(--hbk-color-chip-fg);
    line-height: 1;
    white-space: nowrap;
}

.hbk-chip .material-symbols-outlined {
    font-size: 15px;
    color: inherit;
}

/* Curated card/unit differentiator (e.g. "Hot Tub", "Ground Floor") */
.hbk-differentiator {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.4em 0.75em;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hbk-color-accent) 14%, transparent);
    color: var(--hbk-color-accent);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
}

.hbk-differentiator .material-symbols-outlined {
    font-size: 15px;
    color: inherit;
}

/* Booking summary (screen 5) */
.hbk-steps {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--hbk-space-unit) * 3);
    list-style: none;
    padding: 0;
    margin: 0 0 calc(var(--hbk-space-unit) * 3);
    counter-reset: hbk-step;
}

.hbk-steps li {
    counter-increment: hbk-step;
    display: flex;
    align-items: center;
    gap: calc(var(--hbk-space-unit));
    font-size: var(--hbk-font-size-sm);
    color: var(--hbk-color-muted);
}

.hbk-steps li::before {
    content: counter(hbk-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    border: 1px solid var(--hbk-color-border);
    font-size: 0.8rem;
}

.hbk-steps li.is-current {
    color: var(--hbk-color-text);
    font-weight: var(--hbk-font-weight-medium);
}

.hbk-steps li.is-current::before {
    background: var(--hbk-color-accent);
    border-color: var(--hbk-color-accent);
    color: var(--hbk-color-on-primary);
}

.hbk-steps li.is-done::before {
    content: "\2713";
    background: var(--hbk-color-available);
    border-color: var(--hbk-color-available);
    color: var(--hbk-color-on-primary);
}

.hbk-price-unit {
    font-size: var(--hbk-font-size-sm);
    font-weight: 400;
    color: var(--hbk-color-muted);
}

.hbk-summary-line {
    display: flex;
    justify-content: space-between;
    gap: var(--hbk-space-unit);
    padding: var(--hbk-space-unit) 0;
    border-top: 1px solid var(--hbk-color-border);
    margin-top: var(--hbk-space-unit);
}

.hbk-summary-status {
    font-weight: var(--hbk-font-weight-medium);
}

/* Checkout: summary name, secure band, widget mount, caveat */
.hbk-checkout-name {
    font-weight: var(--hbk-font-weight-medium);
}

.hbk-secure {
    display: flex;
    align-items: center;
    gap: var(--hbk-space-unit);
    background: var(--hbk-color-surface-dark);
    color: var(--hbk-color-on-primary);
    padding: calc(var(--hbk-space-unit) * 1.5) calc(var(--hbk-space-unit) * 2);
    border-radius: var(--hbk-radius-sm);
    font-weight: var(--hbk-font-weight-medium);
    margin-bottom: calc(var(--hbk-space-unit) * 1.5);
}

/* Framing above the SC widget: the guest confirms a pre-filled stay and pays;
   they are not searching again (dates are changed via the summary's button). */
.hbk-checkout-intro {
    margin-bottom: calc(var(--hbk-space-unit) * 1.5);
}

.hbk-checkout-intro h2 {
    margin: 0 0 calc(var(--hbk-space-unit) * 0.5);
}

.hbk-checkout-intro p {
    margin: 0;
    font-size: var(--hbk-font-size-sm);
    color: var(--hbk-color-muted);
    max-width: 60ch;
}

.hbk-widget {
    min-height: 420px;
    border: 1px solid var(--hbk-color-border);
    border-radius: var(--hbk-radius-md);
    overflow: hidden;
}

.hbk-widget.is-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hbk-color-muted);
    border-style: dashed;
}

.hbk-caveat {
    margin-top: calc(var(--hbk-space-unit) * 2);
    font-size: var(--hbk-font-size-sm);
    color: var(--hbk-color-muted);
    max-width: 60ch;
}

/* Confirmation (screen 7): success hero, next-steps grid, details aside.
   Neutral defaults only - the host theme brands the dark band, the tick and
   the price via the --hbk-* tokens. */
/* Centred as a flex column rather than by `margin-inline: auto` on the
   children: a host theme's own h1/p margin rules can out-specify an auto
   margin and silently shove the headline off-centre, which flex centring
   cannot be beaten by. */
.hbk-confirmation .hbk-confirm-hero {
    background: var(--hbk-color-surface-dark);
    color: var(--hbk-color-on-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: calc(var(--hbk-space-unit) * 5) calc(var(--hbk-space-unit) * 3);
}

.hbk-confirmation .hbk-confirm-hero h1 {
    color: inherit;
    margin: 0;
}

.hbk-confirmation .hbk-confirm-hero .hbk-eyebrow {
    margin: 0 0 calc(var(--hbk-space-unit) * 1.5);
}

.hbk-confirmation .tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--hbk-color-available);
    color: var(--hbk-color-on-primary);
    margin-bottom: calc(var(--hbk-space-unit) * 2);
}

.hbk-confirmation .tick .material-symbols-outlined {
    font-size: 38px;
}

.hbk-confirm-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: calc(var(--hbk-space-unit) * 1.75);
    margin: calc(var(--hbk-space-unit) * 2) 0 0;
}

.hbk-confirm-meta-item {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--hbk-space-unit) * 0.875);
}

.hbk-confirm-meta-item .material-symbols-outlined {
    font-size: 17px;
}

.hbk-confirm-meta .sep {
    opacity: 0.4;
}

/* Body: next steps beside the SC-returned details. Single column when
   SuperControl handed nothing back and the aside is not rendered. */
.hbk-confirm-body {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: calc(var(--hbk-space-unit) * 4.5);
    align-items: start;
    /* Self-constraining: the hero above is a full-bleed band, so this block
       carries its own measure rather than relying on a wrapper. A theme that
       does put it in a container just gets the narrower of the two. */
    max-width: 1000px;
    margin-inline: auto;
    padding: calc(var(--hbk-space-unit) * 4) calc(var(--hbk-space-unit) * 4) calc(var(--hbk-space-unit) * 5);
}

.hbk-confirmation.is-single-column .hbk-confirm-body {
    grid-template-columns: minmax(0, 1fr);
}

.hbk-confirm-next > h2 {
    margin: 0 0 calc(var(--hbk-space-unit) * 2.25);
}

/* Site-supplied promo: full content width, under both columns. */
.hbk-confirm-after {
    grid-column: 1 / -1;
}

.hbk-nextgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(var(--hbk-space-unit) * 1.75);
}

.hbk-nextcard {
    display: flex;
    gap: calc(var(--hbk-space-unit) * 1.75);
    padding: calc(var(--hbk-space-unit) * 2.25);
    background: var(--hbk-color-surface);
    border-radius: var(--hbk-radius-md);
    box-shadow: var(--hbk-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
}

.hbk-nextcard-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: var(--hbk-radius-sm);
    background: var(--hbk-color-tint, rgba(0, 0, 0, 0.04));
    color: var(--hbk-color-accent);
}

.hbk-nextcard-icon .material-symbols-outlined {
    font-size: 21px;
}

.hbk-nextcard-title {
    margin: 0;
    font-family: var(--hbk-font-heading);
}

.hbk-nextcard-text {
    margin: calc(var(--hbk-space-unit) * 0.375) 0 0;
    font-size: var(--hbk-font-size-sm);
    line-height: 1.5;
    color: var(--hbk-color-muted);
}

/* Details aside - only rendered when SC returned a reference or a total. */
.hbk-confirm-details {
    position: sticky;
    top: calc(var(--hbk-space-unit) * 2);
    padding: calc(var(--hbk-space-unit) * 2.75);
    background: var(--hbk-color-surface);
    border-radius: var(--hbk-radius-md);
    box-shadow: var(--hbk-shadow-md, 0 6px 18px rgba(0, 0, 0, 0.1));
}

.hbk-confirm-source {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--hbk-space-unit) * 0.75);
    margin: 0 0 calc(var(--hbk-space-unit) * 1.75);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hbk-color-accent);
}

.hbk-confirm-source .material-symbols-outlined {
    font-size: 13px;
}

.hbk-confirm-unit {
    display: flex;
    gap: calc(var(--hbk-space-unit) * 1.75);
    margin-bottom: calc(var(--hbk-space-unit) * 2);
}

.hbk-confirm-thumb {
    flex: none;
    width: 84px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--hbk-radius-sm);
}

.hbk-confirm-unit-name {
    margin: 0;
    font-family: var(--hbk-font-heading);
    line-height: 1.1;
}

.hbk-confirm-unit .hbk-eyebrow,
.hbk-confirm-unit .hbk-note {
    margin: 0;
}

.hbk-confirm-ref,
.hbk-confirm-total {
    align-items: baseline;
}

.hbk-confirm-label {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hbk-color-muted);
}

.hbk-confirm-refvalue {
    font-family: var(--hbk-font-heading);
    letter-spacing: 0.06em;
    color: var(--hbk-color-text);
}

.hbk-confirm-total .hbk-price {
    margin: 0;
}

.hbk-confirm-paid,
.hbk-confirm-emailed {
    display: flex;
    align-items: center;
    gap: calc(var(--hbk-space-unit) * 0.875);
    font-size: var(--hbk-font-size-sm);
    margin: calc(var(--hbk-space-unit) * 1) 0 0;
}

.hbk-confirm-paid {
    color: var(--hbk-color-available);
    font-weight: 600;
}

.hbk-confirm-emailed {
    margin-top: calc(var(--hbk-space-unit) * 2);
    padding-top: calc(var(--hbk-space-unit) * 1.75);
    border-top: 1px solid var(--hbk-color-border);
    color: var(--hbk-color-muted);
}

@media (max-width: 900px) {
    .hbk-confirm-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .hbk-nextgrid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hbk-confirm-details {
        position: static;
    }
}

/* Narrow screens: the meta row wraps, which leaves a separator stranded at the
   end of a line. Stack the facts and drop the separators instead. */
@media (max-width: 575px) {
    .hbk-confirm-meta {
        flex-direction: column;
        gap: calc(var(--hbk-space-unit) * 0.75);
    }

    .hbk-confirm-meta .sep {
        display: none;
    }
}

/* Availability calendar - one root, scoped children */
.hbk-calendar {
    margin-top: calc(var(--hbk-space-unit) * 3);
    padding: calc(var(--hbk-space-unit) * 2);
    border: 1px solid var(--hbk-color-border);
    border-radius: var(--hbk-radius-md);
    background: var(--hbk-color-surface);
}

.hbk-calendar .head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: calc(var(--hbk-space-unit) * 1.5);
}

.hbk-calendar .title {
    margin: 0;
}

.hbk-calendar .weekdays,
.hbk-calendar .grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: calc(var(--hbk-space-unit) * 0.5);
}

.hbk-calendar .weekdays span {
    text-align: center;
    font-size: var(--hbk-font-size-sm);
    color: var(--hbk-color-muted);
    padding-bottom: calc(var(--hbk-space-unit) * 0.5);
}

.hbk-calendar .day {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2px;
    padding: 7px 9px;
    border-radius: var(--hbk-radius-sm);
    font-size: var(--hbk-font-size-sm);
    border: 1px solid transparent;
}

.hbk-calendar .day .num {
    font-weight: 700;
    line-height: 1;
}

.hbk-calendar .day .meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.hbk-calendar .day .nights {
    font-size: 12px;
    color: var(--hbk-color-muted);
}

.hbk-calendar .day.is-empty {
    border: 0;
    padding: 0;
}

.hbk-calendar .day.is-available {
    background: color-mix(in srgb, var(--hbk-color-available) 12%, transparent);
    border-color: color-mix(in srgb, var(--hbk-color-available) 40%, transparent);
    color: var(--hbk-color-text);
    cursor: pointer;
}

.hbk-calendar .day.is-unavailable {
    color: var(--hbk-color-unavailable);
    text-decoration: line-through;
}

.hbk-calendar .day.is-nodata {
    color: var(--hbk-color-muted);
    background: color-mix(in srgb, var(--hbk-color-border) 25%, transparent);
}

.hbk-calendar .day .price {
    font-family: var(--hbk-font-heading);
    color: var(--hbk-color-price);
    font-size: 15px;
}

/* Interactive selection (progressive enhancement) */
.hbk-calendar .day.is-available:hover {
    outline: 2px solid var(--hbk-color-accent);
    outline-offset: -2px;
}

/* Nights inside the chosen stay. This has to read as a lightness step between
   "available" and "selected", not a hue change: a skin is free to point
   --hbk-color-accent and --hbk-color-available at the same brand colour, and at
   the old 16% that put a 12%-tint cell next to a 16%-tint cell — a ~2% pixel
   difference, invisible to anyone and doubly so with colour vision deficiency.
   Available -> in-range -> selected now steps light -> mid -> solid. */
.hbk-calendar .day.in-range {
    background: color-mix(in srgb, var(--hbk-color-accent) 34%, transparent);
    border-color: color-mix(in srgb, var(--hbk-color-accent) 55%, transparent);
    color: var(--hbk-color-text);
}

.hbk-calendar .day.is-selected {
    background: var(--hbk-color-accent);
    border-color: var(--hbk-color-accent);
    color: var(--hbk-color-on-primary);
}

.hbk-calendar .day.is-selected .price,
.hbk-calendar .day.is-selected .nights {
    color: var(--hbk-color-on-primary);
}

/* Hover preview of the stay a click would produce (lighter than a committed
   selection). */
.hbk-calendar .day.is-preview {
    background: color-mix(in srgb, var(--hbk-color-accent) 10%, transparent);
}

.hbk-calendar .day.is-preview-end {
    background: color-mix(in srgb, var(--hbk-color-accent) 24%, transparent);
    border-color: color-mix(in srgb, var(--hbk-color-accent) 45%, transparent);
}

/* Legend + helper hint below the grid */
.hbk-calendar .legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: calc(var(--hbk-space-unit) * 2);
    margin-top: calc(var(--hbk-space-unit) * 2);
}

.hbk-calendar .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--hbk-font-size-sm);
    color: var(--hbk-color-muted);
}

.hbk-calendar .legend .swatch {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    border: 1px solid var(--hbk-color-border);
}

.hbk-calendar .legend .swatch.is-available {
    background: color-mix(in srgb, var(--hbk-color-available) 12%, transparent);
    border-color: color-mix(in srgb, var(--hbk-color-available) 40%, transparent);
}

.hbk-calendar .legend .swatch.is-unavailable {
    background: color-mix(in srgb, var(--hbk-color-border) 25%, transparent);
}

.hbk-calendar .legend .swatch.is-selected {
    background: var(--hbk-color-accent);
    border-color: var(--hbk-color-accent);
}

/* Mirrors .day.is-departure-option, which draws its dashes with an inset
   outline; a 15px swatch has no room for that, so the dashes are the border. */
.hbk-calendar .legend .swatch.is-departure-option {
    background: transparent;
    border: 2px dashed var(--hbk-color-accent);
}

/* Own full-width row under the swatches. It used to be pushed right with
   `margin-left: auto` and capped at 46ch, which only looked deliberate while it
   fitted on the swatch line; once the copy grew it wrapped to two or three
   ragged lines floating off to the right, indented past the legend it belongs
   to. `flex-basis: 100%` gives it the whole row and lets it read as a caption
   for the key above. */
.hbk-calendar .hint {
    display: flex;
    align-items: flex-start;
    flex-basis: 100%;
    gap: 0.4rem;
    font-size: var(--hbk-font-size-sm);
    color: var(--hbk-color-muted);
}

.hbk-calendar .hint .material-symbols-outlined {
    flex: none;
    /* Optical: nudge the icon onto the first line's cap height rather than its
       box top, now that it sits beside multi-line text. */
    margin-top: 0.1em;
    font-size: 1rem;
    color: var(--hbk-color-accent);
}

/* "Your dates" strip that collapses the calendar when arriving from search */
.hbk-dates {
    margin-top: calc(var(--hbk-space-unit) * 3);
    border: 1px solid var(--hbk-color-border);
    border-radius: var(--hbk-radius-md);
}

.hbk-dates-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: calc(var(--hbk-space-unit) * 2);
    padding: calc(var(--hbk-space-unit) * 1.5) calc(var(--hbk-space-unit) * 2);
    cursor: pointer;
    list-style: none;
}

.hbk-dates-strip::-webkit-details-marker {
    display: none;
}

.hbk-dates-label {
    font-weight: var(--hbk-font-weight-medium);
}

.hbk-dates-status {
    font-size: var(--hbk-font-size-sm);
    font-weight: var(--hbk-font-weight-medium);
}

.hbk-dates-status.is-available {
    color: var(--hbk-color-available);
}

.hbk-dates-status.is-unavailable {
    color: #b23a48;
}

.hbk-dates-change {
    margin-left: auto;
    font-size: var(--hbk-font-size-sm);
    text-decoration: underline;
    color: var(--hbk-color-accent);
}

.hbk-dates-panel {
    padding: 0 calc(var(--hbk-space-unit) * 2) calc(var(--hbk-space-unit) * 2);
}

.hbk-dates-panel .hbk-calendar {
    margin-top: 0;
    border: none;
    padding: 0;
}

/* Ease the calendar open/closed instead of snapping.
 *
 * <details> stays native — the animation is applied to ::details-content, the
 * UA-generated box wrapping everything after <summary>, so keyboard, screen
 * reader and no-JS behaviour are untouched and no script is involved.
 *
 * Two things make an auto height animatable:
 *   - `interpolate-size: allow-keywords` opts this subtree into interpolating
 *     to/from size keywords. It is inherited, so declaring it on .hbk-dates
 *     reaches the pseudo-element without opting the whole document in.
 *   - `content-visibility` must be transitioned with `allow-discrete`, or the
 *     UA flips ::details-content straight to `hidden` on close and the panel
 *     disappears before it has moved. `allow-discrete` holds it visible for
 *     the duration, then flips at the end.
 *
 * Engines without ::details-content (or without interpolate-size) drop or
 * ignore these declarations and keep the instant toggle they have today.
 */
.hbk-dates {
    interpolate-size: allow-keywords;
}

.hbk-dates::details-content {
    block-size: 0;
    overflow: clip;
    transition:
        content-visibility 260ms allow-discrete,
        block-size 260ms ease;
}

.hbk-dates[open]::details-content {
    block-size: auto;
}

@media (prefers-reduced-motion: reduce) {
    .hbk-dates::details-content {
        transition: none;
    }
}

/* Valid departure dates for the chosen arrival (guides the second click) */
.hbk-calendar .day.is-departure-option {
    outline: 2px dashed var(--hbk-color-accent);
    outline-offset: -2px;
    cursor: pointer;
}

.hbk-stay-summary {
    margin: var(--hbk-space-unit) 0;
    font-weight: var(--hbk-font-weight-medium);
    color: var(--hbk-color-text);
}

.hbk-calendar .note {
    margin: calc(var(--hbk-space-unit) * 1.5) 0 0;
    font-size: var(--hbk-font-size-sm);
    color: var(--hbk-color-muted);
}

/*
 * Flatpickr range picker on the search block's date fields. The calendar is
 * appended to <body> (outside .hbk), so these rules aren't scoped and use a
 * token with a fallback. To restyle it, a theme can set --hbk-color-accent at
 * :root (or override these rules).
 */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: var(--hbk-color-accent, #b8863b);
    border-color: var(--hbk-color-accent, #b8863b);
    color: #fff;
}

.flatpickr-day.inRange {
    background: rgba(184, 134, 59, 0.14);
    border-color: transparent;
    box-shadow: -5px 0 0 rgba(184, 134, 59, 0.14), 5px 0 0 rgba(184, 134, 59, 0.14);
}

.flatpickr-day.today {
    border-color: var(--hbk-color-accent, #b8863b);
}

/* Clear-dates control. Added by the search script beside the date range once a
   range is set (and hidden again when it isn't), so a chosen stay can be undone
   rather than only changed. Sits in the field's row, after the label/value. */
.hbk-dates-clear {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--hbk-color-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hbk-dates-clear:hover,
.hbk-dates-clear:focus-visible {
    background: var(--hbk-color-chip-bg);
    color: var(--hbk-color-text);
}

.hbk-dates-clear .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
}
