/**
 * Confirmation step — the visit ticket.
 *
 * Renders the block `amelia-confirmation.js` builds from Amelia's own Congratulations
 * rows. Written under the same four rules as `amelia-card-on-file.css`, and for the same
 * reasons — this block also lives inside Amelia's compiled stylesheet plus the theme:
 *
 * 1. **Every rule carries `.amelia-v2-booking #amelia-container`.** The bundle ships
 *    `.amelia-v2-booking #amelia-container div, ...span, ...h4 {font-size: inherit}` at
 *    (1 id, 1 class, 1 element) and this file is enqueued before it, so an unscoped
 *    `.am-vc__title` loses the tie and every string renders at the container's 16px/400.
 *    Only the `.am-vc` root rule that declares the tokens and `container-type` is left
 *    unscoped, since nothing upstream competes for those.
 * 2. **Vertical rhythm is `gap`, never margins** — element margins inside the container
 *    are flattened by id-specificity rules.
 * 3. **Palette is the card-on-file palette.** This view is the last page of the same
 *    story the Payment step started; a second identity would read as a different site.
 * 4. **Width comes from a container query.** The form sits in whatever column the
 *    shortcode was dropped into, so the stub goes beside the details on block width, not
 *    viewport width — and a browser without container queries gets the stacked layout.
 *
 * The hero is the date. Everything else on the ticket is deliberately quiet, and Amelia's
 * confetti image and its own label/value list are hidden (never removed — see the script).
 */

.am-vc {
    --amc-ink: #1a2a3a;
    --amc-blue: #1e5fba;
    --amc-tint: #f3f7fb;
    --amc-edge: #b4cbe4;
    --amc-seal: #378253;
    --amc-seal-bg: #e4f4ea;
    --amc-gray: #5a6b7c;
    --amc-rule: #e2e8f0;
    /* The notch is punched with two circles of the panel behind the ticket, so that
       colour is a token: change it here if the step ever sits on a tinted panel. */
    --amc-page: #fff;

    container-type: inline-size;
    container-name: am-vc;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 46rem;
    margin: 0 auto;
    color: var(--amc-ink);
    text-align: left;
}

/* Amelia's own confirmation content, hidden once the ticket is in place. The nodes stay
   in the DOM: they are the live Vue output and the ticket is rebuilt from them. */
.amelia-v2-booking #amelia-container .am-fs__congrats[data-am-vc="on"] > .am-fs__congrats-main,
.amelia-v2-booking #amelia-container .am-fs__congrats[data-am-vc="on"] > .am-fs__congrats-info {
    display: none;
}

.amelia-v2-booking #amelia-container .am-vc {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Screen-reader copy: the date and time rows Amelia rendered, kept verbatim, because the
   stub shows them as bare numerals. */
.amelia-v2-booking #amelia-container .am-vc__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ------------------------------------------------------------------------- head */

.amelia-v2-booking #amelia-container .am-vc__head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.amelia-v2-booking #amelia-container .am-vc__seal {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--amc-seal-bg);
    color: var(--amc-seal);
}

.amelia-v2-booking #amelia-container .am-vc__seal svg {
    width: 1.375rem;
    height: 1.375rem;
}

.amelia-v2-booking #amelia-container .am-vc__head-copy {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.amelia-v2-booking #amelia-container .am-vc__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--amc-ink);
}

.amelia-v2-booking #amelia-container .am-vc__sub {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--amc-gray);
}

/* The reference the customer quotes to change anything. Tabular figures so the number
   reads as an identifier rather than as prose. */
.amelia-v2-booking #amelia-container .am-vc__ref {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
    padding: 0.4375rem 0.625rem;
    border-radius: 0.375rem;
    background: var(--amc-tint);
    box-shadow: inset 0 0 0 1px var(--amc-edge);
}

.amelia-v2-booking #amelia-container .am-vc__ref-label {
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--amc-gray);
}

.amelia-v2-booking #amelia-container .am-vc__ref-value {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--amc-blue);
}

/* ----------------------------------------------------------------------- ticket */

/* Stacked by default, stub over details, with the tear running across. The two-column
   form is opt-in at 30rem of block width. */
.amelia-v2-booking #amelia-container .am-vc__ticket {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(26, 42, 58, 0.04), 0 10px 30px -18px rgba(26, 42, 58, 0.35);
    overflow: hidden;
}

.amelia-v2-booking #amelia-container .am-vc__stub {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 1rem;
    padding: 1.25rem 1.25rem 1rem;
    background: var(--amc-tint);
}

/* Stacked: one baseline row — WED 16 SEP 2026 — with the time at the far end. */
.amelia-v2-booking #amelia-container .am-vc__stub-date {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}

.amelia-v2-booking #amelia-container .am-vc__stub-weekday {
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--amc-blue);
}

/* The hero. Tabular figures and negative tracking so two digits sit as one mark. */
.amelia-v2-booking #amelia-container .am-vc__stub-day {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--amc-ink);
}

.amelia-v2-booking #amelia-container .am-vc__stub-month {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--amc-ink);
}

/* No raw start date to split: Amelia's formatted string, whole. */
.amelia-v2-booking #amelia-container .am-vc__stub-date--text {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.amelia-v2-booking #amelia-container .am-vc__stub-time {
    margin-left: auto;
    display: flex;
    align-items: baseline;
}

.amelia-v2-booking #amelia-container .am-vc__stub-time-value {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--amc-blue);
}

/* The tear. A dashed rule with a notch punched out of each end: the notches are two
   circles of the panel colour, centred on the rule, so they cut the ticket's edge the way
   a real stub does. Horizontal here, vertical in the two-column tier. */
.amelia-v2-booking #amelia-container .am-vc__perf {
    position: relative;
    height: 0;
    border-top: 1px dashed var(--amc-edge);
}

.amelia-v2-booking #amelia-container .am-vc__perf::before,
.amelia-v2-booking #amelia-container .am-vc__perf::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 50%;
    background: var(--amc-page);
    transform: translate(-50%, -50%);
}

.amelia-v2-booking #amelia-container .am-vc__perf::before {
    left: 0;
}

.amelia-v2-booking #amelia-container .am-vc__perf::after {
    left: 100%;
}

/* ------------------------------------------------------------------------ detail */

.amelia-v2-booking #amelia-container .am-vc__detail {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    padding: 1.25rem;
}

/* Label above value while the ticket is narrow; side by side once there is room. */
.amelia-v2-booking #amelia-container .am-vc__row {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.amelia-v2-booking #amelia-container .am-vc__row-label {
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amc-gray);
}

.amelia-v2-booking #amelia-container .am-vc__row-value {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--amc-ink);
    overflow-wrap: anywhere;
}

/* The total is the one row that carries an explanation, so it gets the rule above it and
   the note below — the answer sits where the question is asked. */
.amelia-v2-booking #amelia-container .am-vc__total {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--amc-rule);
}

.amelia-v2-booking #amelia-container .am-vc__total-figure {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}

.amelia-v2-booking #amelia-container .am-vc__total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--amc-ink);
}

/* "Pay after service" is the terms, not the amount, so it reads as a tag beside it. */
.amelia-v2-booking #amelia-container .am-vc__total-method {
    padding: 0.1875rem 0.5rem;
    border-radius: 0.25rem;
    background: var(--amc-seal-bg);
    color: var(--amc-seal);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.amelia-v2-booking #amelia-container .am-vc__note {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--amc-gray);
}

/* ----------------------------------------------------------------------- contact */

/* For the record: what the customer gave us, quiet, under the ticket rather than on it. */
.amelia-v2-booking #amelia-container .am-vc__contact {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0 0.25rem;
}

.amelia-v2-booking #amelia-container .am-vc__contact-label {
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--amc-gray);
}

.amelia-v2-booking #amelia-container .am-vc__contact-list {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
}

/* Middot separators rather than three rows: these are one line of provenance. */
.amelia-v2-booking #amelia-container .am-vc__contact-item {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--amc-gray);
    overflow-wrap: anywhere;
}

.amelia-v2-booking #amelia-container .am-vc__contact-item + .am-vc__contact-item::before {
    content: "·";
    color: var(--amc-edge);
    font-weight: 700;
}

/* Amelia's add-to-calendar block, cloned in. Its own styles come from the bundle; only
   the placement and the focus ring are ours. */
.amelia-v2-booking #amelia-container .am-vc__atc {
    padding: 0 0.25rem;
}

.amelia-v2-booking #amelia-container .am-vc__atc a:focus-visible {
    outline: 2px solid var(--amc-blue);
    outline-offset: 2px;
}

/* ------------------------------------------------------- two columns, from 30rem */

/* Block width, not viewport width: the form sits in whatever column the shortcode was
   dropped into, and 660px inside a 1440px window is normal here. */
@container am-vc (min-width: 30rem) {
    .amelia-v2-booking #amelia-container .am-vc__title {
        font-size: 1.75rem;
        letter-spacing: -0.02em;
    }

    /* Stub | tear | details. The tear's column is zero-width — the element is only its
       own dashed border, so it cannot push the two halves apart. */
    .amelia-v2-booking #amelia-container .am-vc__ticket {
        grid-template-columns: 10.5rem 0 minmax(0, 1fr);
    }

    .amelia-v2-booking #amelia-container .am-vc__stub {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1.5rem 1.25rem;
    }

    .amelia-v2-booking #amelia-container .am-vc__stub-date {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    /* The one large thing on the page. Everything around it stays at 15/16px. */
    .amelia-v2-booking #amelia-container .am-vc__stub-day {
        font-size: 3.25rem;
    }

    .amelia-v2-booking #amelia-container .am-vc__stub-time {
        width: 100%;
        padding-top: 0.75rem;
        border-top: 1px solid var(--amc-edge);
    }

    .amelia-v2-booking #amelia-container .am-vc__stub-time-value {
        font-size: 1.25rem;
    }

    /* Vertical tear, notches at top and bottom. */
    .amelia-v2-booking #amelia-container .am-vc__perf {
        height: auto;
        border-top: 0;
        border-left: 1px dashed var(--amc-edge);
    }

    .amelia-v2-booking #amelia-container .am-vc__perf::before {
        top: 0;
        left: 50%;
    }

    .amelia-v2-booking #amelia-container .am-vc__perf::after {
        top: 100%;
        left: 50%;
    }

    .amelia-v2-booking #amelia-container .am-vc__detail {
        gap: 0.75rem;
        padding: 1.5rem 1.5rem 1.5rem 1.75rem;
    }

    /* Label column, so the values line up down the ticket. */
    .amelia-v2-booking #amelia-container .am-vc__row,
    .amelia-v2-booking #amelia-container .am-vc__total {
        display: grid;
        grid-template-columns: 6.5rem minmax(0, 1fr);
        align-items: baseline;
        column-gap: 1rem;
        row-gap: 0.375rem;
    }

    .amelia-v2-booking #amelia-container .am-vc__note {
        grid-column: 2;
    }

    .amelia-v2-booking #amelia-container .am-vc__total-amount {
        font-size: 1.625rem;
    }
}

/* ------------------------------------------------------------------------ motion */

/* One entrance, not per-row choreography: the ticket arrives, the seal stamps. Amelia's
   own `nth-child` slide-ups animated its list, and that list is hidden now, so this
   replaces them rather than adding to them. */
@media (prefers-reduced-motion: no-preference) {
    .amelia-v2-booking #amelia-container .am-vc__head,
    .amelia-v2-booking #amelia-container .am-vc__ticket,
    .amelia-v2-booking #amelia-container .am-vc__contact {
        animation: am-vc-rise 360ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
    }

    .amelia-v2-booking #amelia-container .am-vc__ticket {
        animation-delay: 80ms;
    }

    .amelia-v2-booking #amelia-container .am-vc__contact {
        animation-delay: 160ms;
    }

    .amelia-v2-booking #amelia-container .am-vc__seal {
        animation: am-vc-stamp 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }
}

@keyframes am-vc-rise {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes am-vc-stamp {
    from {
        opacity: 0;
        transform: scale(0.7);
    }

    to {
        opacity: 1;
        transform: none;
    }
}
