/* ============================================================
   Availability Checker flow (per-band)
   Figma: "Availability Checker" section (COAST file).
   Mobile-first. All values reference the --av-* tokens below;
   no magic numbers in component rules. Loaded per-page from
   bandAvailability.cshtml, mirroring the date-checker.css pattern.
   ============================================================ */

.av {
    /* ---- Colour tokens ---- */
    --av-accent: #bf6aad; /* Primary Accent (pink) */
    --av-accent-hover: #a85695;
    --av-accent-soft: #f7e9f3;
    --av-ink: #181819; /* Primary Black */
    --av-ink-2: #44474d; /* Secondary Gray */
    --av-muted: #888a8c; /* Weekday / meta text */
    --av-placeholder: #686869;
    --av-navy: #031632; /* Step / section titles */
    --av-border: #e2e5ed; /* Calendar control border */
    --av-input-border: rgba(197, 198, 206, 0.3);
    --av-section-bg: #f6f2f4; /* Pink page background */
    --av-tile-bg: #f6f2f4; /* Summary icon tiles */
    --av-success: #2fbf71; /* Success banner tick */
    --av-danger: #d64545;
    --av-cta-from: #fecc66;
    --av-cta-to: #f7a547;
    --av-cta-shadow: 0 14px 26px -12px rgba(214, 138, 45, .55);

    /* ---- Radii ---- */
    --av-r-card: 24px;
    --av-r-card-sm: 16px;
    --av-r-input: 16px;
    --av-r-ctl: 10px;
    --av-r-cta: 20px;
    --av-r-day: 12px;

    /* ---- Shadows ---- */
    --av-shadow-card: 0 20px 40px rgba(3, 22, 50, .07);
    --av-shadow-bar: 0 20px 20px rgba(3, 22, 50, .07); /* action bar / summary cards */
    --av-shadow-dropdown: 0 4px 10px rgba(0, 0, 0, .2); /* custom select panel */

    /* ---- Custom dropdown ---- */
    --av-r-dropdown: 16px;
    --av-dd-row-h: 50px;

    /* ---- Spacing ---- */
    --av-gap-card: 20px;
    --av-gap-field: 16px;
    --av-gap-section: 20px;
    --av-pad-page: 20px;

    /* ---- Type ---- */
    --av-fs-title: 20px;
    --av-fs-input: 16px;

    /* ---- Compact calendar (layout ≤639.98px; type/card pad ≤389.98px) ---- */
    --av-pad-card-narrow: 12px;
    --av-gap-cal-narrow: 8px;
    --av-gap-cal-ctl-narrow: 4px;
    --av-pad-cal-ctl-narrow: 10px;
    --av-fs-cal-narrow: 14px;
    --av-fs-eventdate-narrow: 18px;
    --av-lh-eventdate-narrow: 26px;
    --av-chevron-cal-narrow: 16px;
    --av-ls-weekday-narrow: 2px;

    color: var(--av-ink);
    font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
}

/* ---- shared icon glyph sizing ---- */
.av svg { display: block; }
.av img { display: block; }

/* Visually-hidden (accessible) label pattern. Placeholder-only fields in the
   frames carry a real <label> for a11y + validation messaging, hidden here so
   the page renders exactly as designed. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   Title bar (band name + category)
   ========================================================= */
.av-titlebar {
    background: #fff;
}

/* Title bar belongs to the form state only; hidden on the result view. */
.av:has([data-av-result-section]:not([hidden])) .av-titlebar {
    display: none;
}

.av-titlebar__inner {
    max-width: 1240px;
    margin: 0 auto;
    /* Header-to-eyebrow was the loosest junction on the site against a
       tight heading group below; the bottom stays at 32px. */
    padding: 14px var(--av-pad-page) 32px;
}

.av-titlebar__title {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 600;
    color: var(--av-ink);
}

.av-titlebar__subtitle {
    margin: 8px 0 0;
    font-size: 16px;
    line-height: 1.4;
    color: var(--av-ink-2);
}

/* =========================================================
   Section shell (pink background)
   ========================================================= */
.av-section {
    background: var(--av-section-bg);
    padding: 24px var(--av-pad-page) 32px;
}

.av-shell {
    max-width: 1240px;
    margin: 0 auto;
}

/* =========================================================
   Numbered step headings ("1 Your Details" / "2 Your Date")
   ========================================================= */
.av-stephead {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.av-stephead__badge {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--av-accent);
    color: #fff;
    font-size: 13.333px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.av-stephead__title {
    font-size: var(--av-fs-title);
    line-height: 28px;
    font-weight: 600;
    color: var(--av-navy);
}

/* Form body: one DOM, two layouts via grid areas.
   Mobile flows heading -> details -> heading -> calendar. */
.av-body {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "h1"
        "d"
        "h2"
        "c";
    gap: 16px;
}

.av-stephead--details { grid-area: h1; }
.av-card--details { grid-area: d; }
.av-stephead--date { grid-area: h2; scroll-margin-top: 16px; }
.av-card--calendar { grid-area: c; }

/* Grid items must be allowed to shrink below their content's min-content
   width, otherwise inputs/selects force horizontal overflow on narrow phones. */
.av-body,
.av-body > *,
.av-fields,
.av-field {
    min-width: 0;
}

/* =========================================================
   Card primitive
   ========================================================= */
.av-card {
    background: #fff;
    border-radius: var(--av-r-card);
    box-shadow: var(--av-shadow-card);
    padding: var(--av-gap-card);
}

.av-card--sm {
    border-radius: var(--av-r-card-sm);
}

/* =========================================================
   Form fields
   ========================================================= */
.av-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--av-gap-card);
}

.av-field {
    display: flex;
    flex-direction: column;
}

/* Mobile field order differs from desktop: the mobile frame promotes
   "Partner's Full Name" above Email/Telephone. DOM is authored in the
   desktop 2-column reading order; these orders reflow the single-column
   mobile stack. Reset once the 2-column grid starts (>=640px).
   NOTE: focus/tab order follows DOM (desktop order) at all widths; on
   mobile the Partner field is visually 3rd but tabs 5th. Accepted tradeoff. */
.av-fields > .av-field:nth-child(1) { order: 1; } /* First Name */
.av-fields > .av-field:nth-child(2) { order: 2; } /* Surname */
.av-fields > .av-field:nth-child(3) { order: 4; } /* Email */
.av-fields > .av-field:nth-child(4) { order: 5; } /* Telephone */
.av-fields > .av-field:nth-child(5) { order: 3; } /* Partner's Full Name */
.av-fields > .av-field:nth-child(6) { order: 6; } /* Venue Name */
.av-fields > .av-field:nth-child(7) { order: 7; } /* Event Type */
.av-fields > .av-field:nth-child(8) { order: 8; } /* Venue Location */
.av-gdpr { order: 9; } /* GDPR note always last in the card */

/* Frames show placeholder-only fields (no visible labels). We keep a real
   <label> for a11y + JS validation messaging, but hide it visually. */
.av-field__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.av-input,
.av-select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    border: 1px solid var(--av-input-border);
    border-radius: var(--av-r-input);
    padding: 13px;
    font-family: inherit;
    font-size: var(--av-fs-input);
    line-height: 24px;
    color: var(--av-ink);
    background: #fff;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.av-input::placeholder {
    color: var(--av-placeholder);
}

.av-select {
    padding-right: 41px;
    color: var(--av-ink);
    /* custom chevron */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23181819' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px 20px;
}

/* Placeholder option (empty value) reads as muted like a placeholder. */
.av-select:has(option[value=""]:checked) {
    color: var(--av-placeholder);
}

.av-input:focus,
.av-select:focus {
    border-color: var(--av-accent);
    box-shadow: 0 0 0 3px rgba(191, 106, 173, .15);
}

.av-input--invalid,
.av-select--invalid {
    border-color: var(--av-danger);
}

.av-field__error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--av-danger);
    min-height: 0;
}

/* =========================================================
   Custom dropdown (enhances a native <select data-av-enhance>)
   Matches the Figma open-state frames: white rounded panel,
   custom rows, purple trigger + flipped chevron when open.
   The native <select> stays as the value source (JS hides it),
   so the page still works and submits before JS enhances it.
   ========================================================= */
.av-dd {
    position: relative;
    width: 100%;
}

.av-dd__trigger {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
    text-align: left;
    color: var(--av-ink);
}

.av-dd__value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.av-dd__value--placeholder {
    color: var(--av-placeholder);
}

/* Chevron/caret: a trivial UI affordance (no exported asset provided),
   drawn inline to match the Figma "Dropdown Icon" caret. */
.av-dd__chevron {
    flex: none;
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23181819' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    transition: transform .15s ease;
}

.av-dd.is-open .av-dd__chevron {
    transform: scaleY(-1);
}

/* Field variant (Event Type / Venue Location) */
.av-dd__trigger--field {
    border: 1px solid var(--av-input-border);
    border-radius: var(--av-r-input);
    padding: 13px;
    font-size: var(--av-fs-input);
    line-height: 24px;
}

.av-dd--field.is-open .av-dd__trigger--field,
.av-dd--field[data-invalid] .av-dd__trigger--field {
    border-color: var(--av-accent);
}

.av-dd--field[data-invalid] .av-dd__trigger--field {
    border-color: var(--av-danger);
}

/* Calendar variant (Month / Year) */
.av-dd__trigger--cal {
    border: 1px solid var(--av-border);
    border-radius: var(--av-r-ctl);
    padding: 10px 10px 10px 16px;
    min-height: 44px;
    /* iOS needs >=16px to avoid focus zoom; 14px restored on desktop below. */
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.7px;
    line-height: normal;
}

.av-dd--cal.is-open .av-dd__trigger--cal {
    border-color: var(--av-accent);
}

/* Panel */
.av-dd__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border-radius: var(--av-r-dropdown);
    box-shadow: var(--av-shadow-dropdown);
    max-height: 288px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.av-dd__panel[hidden] {
    display: none;
}

.av-dd__opt {
    display: flex;
    align-items: center;
    min-height: var(--av-dd-row-h);
    padding: 12px 16px;
    font-size: 16px;
    line-height: 26px;
    color: #000;
    cursor: pointer;
}

.av-dd__opt--disabled {
    color: var(--av-muted);
    cursor: not-allowed;
}

.av-dd__opt[aria-selected="true"] {
    font-weight: 600;
}

.av-dd__opt.is-active:not(.av-dd__opt--disabled) {
    background: var(--av-accent-soft);
}

.av-dd__group {
    padding: 12px 16px 4px;
    font-size: 14px;
    line-height: 20px;
    color: var(--av-muted);
    pointer-events: none;
}

/* GDPR note */
.av-gdpr {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--av-ink);
}

.av-gdpr a {
    color: inherit;
    text-decoration: underline;
}

/* =========================================================
   Calendar
   ========================================================= */
.av-calendar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.av-cal-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Once av-shared.js swaps each <select> for div.av-dd (width:100%), the dd is
   the flex item; without this its min-content width pins the row wider than a
   narrow card and the centred row pushes the nav buttons outside it. */
.av-cal-head > * {
    min-width: 0;
}

/* Enhanced dropdowns replace .av-cal-select; match its equal flex split so
   the two pickers share the row instead of each taking width:100%. */
.av-cal-head .av-dd--cal {
    flex: 1 1 0;
    min-width: 0;
}

.av-cal-nav {
    flex: none;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--av-border);
    border-radius: var(--av-r-ctl);
    background: #fff;
    color: var(--av-accent);
    cursor: pointer;
}

.av-cal-nav svg,
.av-cal-nav img {
    width: 20px;
    height: 20px;
}

.av-cal-nav:disabled {
    opacity: .35;
    cursor: default;
}

.av-cal-select {
    -webkit-appearance: none;
    appearance: none;
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    border: 1px solid var(--av-border);
    border-radius: var(--av-r-ctl);
    padding: 10px 34px 10px 16px;
    font-family: inherit;
    /* iOS needs >=16px to avoid focus zoom; the 14px Figma treatment is
       restored on desktop where zoom isn't a concern. */
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.7px;
    color: var(--av-ink);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23181819' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px 20px;
    cursor: pointer;
    outline: none;
}

.av-cal-select:focus {
    border-color: var(--av-accent);
}

.av-cal-week,
.av-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.av-cal-week {
    margin-bottom: 4px;
}

.av-cal-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3.2px;
    text-transform: uppercase;
    color: var(--av-muted);
    padding: 9px 0;
}

.av-cal-grid {
    gap: 0;
}

.av-day {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: var(--av-ink);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--av-r-day);
    cursor: pointer;
}

.av-day--empty {
    visibility: hidden;
    cursor: default;
}

.av-day--disabled {
    color: var(--av-ink);
    opacity: .3;
    cursor: default;
}

.av-day--selected {
    background: var(--av-accent);
    color: #fff;
}

/* =========================================================
   Action bar (Event date + Check Availability)
   ========================================================= */
.av-actionbar {
    margin-top: var(--av-gap-field);
    background: #fff;
    border-radius: var(--av-r-card);
    box-shadow: var(--av-shadow-card);
    padding: var(--av-gap-card);
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* iOS: keep clear of the home indicator when this is the last block. */
    padding-bottom: max(var(--av-gap-card), env(safe-area-inset-bottom));
}

.av-eventdate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 8px;
    font-size: 20px;
    line-height: 28px;
}

.av-eventdate svg,
.av-eventdate img {
    width: 20px;
    height: 20px;
    color: var(--av-muted);
    flex: none;
}

.av-eventdate__label,
.av-eventdate__value {
    /* Fallback first: older Android WebViews lack text-wrap. */
    white-space: nowrap;
    text-wrap: nowrap;
}

.av-eventdate__label {
    color: var(--av-muted);
}

.av-eventdate__value {
    font-weight: 600;
    color: #000;
}

/* Date-checker only: "Back to your results", shown by date-checker.js when the
   customer reached this form by leaving a results list. A link, not a second
   button - the amber CTA stays the only primary action in this bar - and never
   amber itself, being navigational.
   First in DOM so the desktop row can pull it into the dead space on the left
   with margin-right:auto; order:1 drops it below the CTA in the mobile column,
   where the mobile frame puts it. */
.av-actionbar__back {
    order: 1;
    align-self: center;
    position: relative;
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
    /* 600, not 500: §3.4 clears accent-on-white at 14px only when bold. */
    font-weight: 600;
    color: var(--av-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
    cursor: pointer;
}

/* 44px of hit area without growing the 22px line box the frames specify (which
   would change the height of the bar). */
.av-actionbar__back::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
}

.av-actionbar__back:focus-visible {
    outline: 2px solid var(--av-accent);
    outline-offset: 3px;
}

/* Colour only - §7 rules out transforms on this control. */
.av-actionbar__back:active {
    color: var(--av-accent-hover);
}

/* =========================================================
   CTA buttons
   ========================================================= */
.av-cta {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Box and type come from the sitewide yellow CTA spec (site.css). */
    min-height: var(--cta-yellow-min-h, 60px);
    padding: 0 32px;
    border-radius: var(--av-r-cta);
    background: linear-gradient(180deg, var(--av-cta-from), var(--av-cta-to));
    color: #000;
    font-family: inherit;
    font-size: var(--cta-yellow-fs, 16px);
    font-weight: var(--cta-yellow-fw, 600);
    line-height: var(--cta-yellow-lh, 24px);
    letter-spacing: 0.08px;
    box-shadow: var(--av-cta-shadow);
    text-decoration: none;
    transition: filter .18s ease, transform .18s ease;
}

.av-cta svg,
.av-cta img {
    width: 20px;
    height: 20px;
    flex: none;
}

.av-cta--full {
    width: 100%;
}

.av-cta:disabled {
    opacity: .6;
    cursor: default;
}

.av-cta:active {
    transform: translateY(1px);
}

.av-btn-outline {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: var(--av-r-input);
    border: 1px solid #eac7e2;
    background: #fff;
    color: var(--av-accent);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}

.av-btn-outline:active {
    background: var(--av-accent-soft);
}

/* =========================================================
   Result: sunburst backdrop + success banner
   ========================================================= */
[data-av-result-section] {
    position: relative;
    overflow: hidden;
}

.av-burst {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1040px;
    max-width: 150%;
    height: auto;
    pointer-events: none;
    z-index: 0;
}

/* Keep result content above the burst backdrop. */
[data-av-result-section] .av-shell {
    position: relative;
    z-index: 1;
}

.av-banner {
    display: flex;
    flex-direction: column; /* mobile: two stacked lines */
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    /* Bottom padding is the headline-to-stepper gap and is breakpoint-scoped:
       the stacked headline wraps, so 40px keeps the success message and the
       progress stepper reading as one group. Desktop keeps 60px (below). */
    padding: 8px 0 40px;
}

.av-banner__line {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.av-banner__icon {
    flex: none;
    width: 20px; /* mobile */
    height: 20px;
}

.av-banner__lead,
.av-banner__rest {
    font-size: 22px; /* mobile */
    line-height: 1.25;
    font-weight: 600;
    color: var(--av-ink);
}

.av-banner .av-banner__confetti {
    display: inline-block;
    width: 30px;
    height: auto;
    vertical-align: middle;
    margin-left: 0.4em; /* ~a letter-width gap after "date" */
}

/* =========================================================
   Result: step indicator
   ========================================================= */
.av-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 30px;
}

.av-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.av-step--upcoming {
    opacity: .5;
}

.av-step__badge {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--av-accent);
    color: #fff;
    font-size: 13.333px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.av-step__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: var(--av-navy);
    white-space: nowrap;
}

.av-step__line {
    flex: 1 1 0;
    min-width: 8px;
    max-width: 232px;
    height: 1px;
    background: rgba(3, 22, 50, .2);
}

/* =========================================================
   Result: layout
   ========================================================= */
.av-result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}

.av-result-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.av-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* Mobile interleaves the two desktop columns: Band, Event Date, What's
   included, Price Summary, Disclaimer. The column wrappers collapse
   (display:contents) so all five cards become direct grid items and can
   be ordered individually. Desktop restores the two-column wrappers. */
@media (max-width: 1023px) {
    .av-result-main,
    .av-summary {
        display: contents;
    }

    /* Scoped to the availability result grid so the ordering does not leak
       into other flows that reuse the same [data-av-card] cards (e.g. booking). */
    .av-result-grid [data-av-card="band"] { order: 1; }
    .av-result-grid [data-av-card="date"] { order: 2; }
    .av-result-grid [data-av-card="included"] { order: 3; }
    .av-result-grid [data-av-card="price"] { order: 4; }
    .av-result-grid [data-av-card="disclaimer"] { order: 5; }

    /* Event date card: icon-only change button on mobile. */
    .av-change__text { display: none; }
    .av-change { min-width: 44px; justify-content: center; }
}

/* Included card */
.av-block-title {
    font-size: 20px;
    line-height: 26px;
    font-weight: 600;
    color: #000;
    margin: 0 0 16px;
}

.av-included {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.av-included li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #000;
}

.av-included svg,
.av-included img {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: var(--av-accent);
}

/* Disclaimer card */
.av-disclaimer {
    margin: 0;
    padding-left: 21px;
    list-style: disc outside;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0.35px;
    color: var(--av-ink);
}

.av-disclaimer li {
    margin-bottom: 6px;
}

.av-disclaimer li:last-child {
    margin-bottom: 0;
}

/* Summary info cards (band / event date / price) */
.av-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.av-info__tile {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: var(--av-r-day);
    background: var(--av-tile-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--av-accent);
}

.av-info__tile svg,
.av-info__tile img {
    width: 24px;
    height: 24px;
}

.av-info__label {
    display: block;
    font-size: 14px;
    line-height: 1.3;
    color: var(--av-ink-2);
}

.av-info__value {
    display: block;
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    color: var(--av-ink);
}

.av-card--between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.av-change {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--av-accent);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    /* >=44px effective hit area without altering the visual position. */
    min-height: 44px;
    padding: 0 4px;
    margin: 0 -4px;
}

.av-change svg,
.av-change img {
    width: 20px;
    height: 20px;
}

/* Price summary */
.av-price {
    padding: 23px 20px;
}

.av-price__head {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.av-price__title {
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    color: var(--av-ink);
}

.av-price__rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.av-price__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: #000;
}

.av-price__value {
    color: var(--av-ink);
}

.av-price__divider {
    border: 0;
    border-top: 1px solid var(--av-border);
    margin: 0;
}

/* =========================================================
   Busy modal
   ========================================================= */
.av-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(24, 24, 25, .55);
    overscroll-behavior: contain;
}

.av-modal[hidden] {
    display: none;
}

.av-modal__shell {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: var(--av-r-card);
    padding: 30px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    padding-bottom: max(58px, env(safe-area-inset-bottom));
}
@media (min-width: 640px) {
    .av-modal__shell {
       
        padding: 58px;
       
    }
}

    .av-modal__close {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background: none;
        color: var(--av-ink-2);
        cursor: pointer;
    }

        .av-modal__close svg {
            width: 20px;
            height: 20px;
        }

    .av-modal__icon {
        width: 56px;
        height: 56px;
        color: var(--av-accent);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

        .av-modal__icon img,
        .av-modal__icon svg {
            width: 100%;
            height: 100%;
        }

    .av-modal__title {
        font-size: 20px;
        line-height: 28px;
        font-weight: 600;
        color: var(--av-ink);
        margin: 0;
    }

    .av-modal__text {
        font-size: 16px;
        color: var(--av-ink-2);
        margin: 0 0 4px;
    }

    .av-modal__actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 24px;
        margin-top: 4px;
    }

    /* Responsive copy: busy-modal primary button shows the short label on
   mobile and the full label on desktop, matching the two frames. */
    .av-txt-desktop {
        display: none;
    }

    .av-txt-mobile {
        display: inline;
    }

    /* =========================================================
   Loading spinner on the CTA
   ========================================================= */
    .av-spinner {
        width: 18px;
        height: 18px;
        border-radius: 999px;
        border: 2px solid rgba(0, 0, 0, .25);
        border-top-color: #000;
        animation: av-spin .7s linear infinite;
    }

    @keyframes av-spin {
        to {
            transform: rotate(360deg);
        }
    }

    /* Result section hidden until a free date is confirmed. */
    [hidden] {
        display: none !important;
    }

    /* =========================================================
   Tablet+ / Desktop
   ========================================================= */
    @media (min-width: 640px) {
        .av-fields {
            grid-template-columns: 1fr 1fr;
            /* Figma form grid: gap-x 20, gap-y 24. */
            gap: 24px 20px;
        }

            /* 2-column layout uses the desktop reading order (= DOM order). The
       :nth-child(n) matches every field and equals the base rules' specificity,
       so this later declaration wins and neutralises the mobile ordering. */
            .av-fields > .av-field:nth-child(n) {
                order: 0;
            }

        .av-gdpr {
            grid-column: 1 / -1;
        }
    }

    @media (min-width: 1024px) {
        .av-titlebar__inner {
            padding: 40px var(--av-pad-page);
        }

        .av-titlebar__title {
            font-size: 36px;
        }

        .av-titlebar__subtitle {
            font-size: 18px;
        }

        .av-section {
            padding: 36px 100px 48px;
        }

        .av-cal-select,
        .av-dd__trigger--cal {
            font-size: 14px;
            min-height: 0;
        }

        /* Desktop: headings share a row above their two columns. */
        .av-body {
            grid-template-columns: 1fr 1fr;
            grid-template-areas:
                "h1 h2"
                "d  c";
            gap: 16px 16px;
            align-items: stretch;
        }

        .av-stephead--date {
            margin-left: 4px;
        }

        /* Action bar becomes a full-width inline bar under the grid. */
        .av-actionbar {
            flex-direction: row;
            align-items: center;
            justify-content: flex-end;
            gap: 40px;
            padding-bottom: var(--av-gap-card);
        }

        /* Into the dead space at the left end of the row; the bar keeps its
           height and nothing else moves. */
        .av-actionbar__back {
            order: 0;
            margin-right: auto;
        }

        .av-eventdate {
            justify-content: flex-end;
        }

        .av-cta {
            width: auto;
        }

        /* Full-width CTAs (Next Step, modal actions) stay full width on desktop. */
        .av-cta--full {
            width: 100%;
        }

        /* Result: two columns (main + fixed summary). */
        .av-result-grid {
            grid-template-columns: minmax(0, 1fr) 480px;
            gap: 20px;
        }

        .av-stepper {
            gap: 12px;
        }

        .av-step__label {
            font-size: 14px;
            letter-spacing: 0.7px;
        }

        .av-banner {
            flex-direction: row;
            gap: 8px;
            padding-bottom: 60px;
        }

        .av-banner__icon {
            width: 32px;
            height: 32px;
        }

        .av-banner__lead,
        .av-banner__rest {
            font-size: 30px;
        }

        .av-txt-mobile {
            display: none;
        }

        .av-txt-desktop {
            display: inline;
        }
    }

    /* Phones and small tablets: content-size the year picker so month
       names like "September" are not clipped. Aligns with the existing
       640px two-column fields breakpoint. */
    @media (max-width: 639.98px) {
        .av-cal-head {
            gap: var(--av-gap-cal-narrow);
        }

        /* Content-sized bases: the 4-digit year keeps only what it needs so
           the month can take the slack. An equal split clips "September". */
        .av-cal-head .av-dd--cal {
            width: auto;
            flex: 1 1 auto;
        }

        .av-dd__trigger--cal {
            padding-inline: var(--av-pad-cal-ctl-narrow);
            gap: var(--av-gap-cal-ctl-narrow);
        }

        .av-dd--cal .av-dd__chevron {
            width: var(--av-chevron-cal-narrow);
            height: var(--av-chevron-cal-narrow);
        }

        /* Pre-JS native select: trim padding but keep 16px so iOS cannot zoom. */
        .av-cal-select {
            padding-inline: var(--av-pad-cal-ctl-narrow) 34px;
        }
    }

    /* Narrow phones only: tighter card padding and 14px picker type.
       390px (the Figma mobile frame) keeps 16px picker type. */
    @media (max-width: 389.98px) {
        .av-card--calendar,
        .av-actionbar {
            padding-inline: var(--av-pad-card-narrow);
        }

        .av-dd__trigger--cal {
            font-size: var(--av-fs-cal-narrow);
        }

        .av-eventdate {
            font-size: var(--av-fs-eventdate-narrow);
            line-height: var(--av-lh-eventdate-narrow);
        }

        .av-cal-weekday {
            letter-spacing: var(--av-ls-weekday-narrow);
        }
    }

    /* Hover only for real pointers (no sticky :hover on touch). */
    @media (hover: hover) and (pointer: fine) {
        .av-cta:hover {
            filter: brightness(1.03);
        }

        .av-cal-nav:hover:not(:disabled) {
            background: var(--av-accent-soft);
        }

        .av-day:hover:not(.av-day--disabled):not(.av-day--empty):not(.av-day--selected) {
            background: var(--av-accent-soft);
        }

        .av-btn-outline:hover {
            background: var(--av-accent-soft);
        }

        .av-change:hover {
            color: var(--av-accent-hover);
        }

        .av-actionbar__back:hover {
            color: var(--av-accent-hover);
        }

        .av-dd__opt:not(.av-dd__opt--disabled):hover {
            background: var(--av-accent-soft);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .av-cta,
        .av-spinner {
            transition: none;
            animation: none;
        }
    }
