/*
 * AX Contact Form.
 *
 * Every colour, radius, and dimension is exposed as a CSS custom property on
 * .ax-contact-form__wrap. The defaults reproduce the reference design; a theme
 * or child stylesheet can retarget the whole form by redeclaring the variables
 * without touching this file. Fonts are always inherited from the theme.
 */
:root {
    --ax-contact-accent:
        var(--ax-contact-accent-custom,
        var(--amm-primary-1,
        var(--action,
        var(--primary,
        var(--wp--preset--color--primary,
        var(--wp--preset--color--accent,
        #00696b))))));

 
    --ax-contact-accent-hover:
        var(--ax-contact-accent-hover-custom,
        var(--amm-primary-2,
        var(--action-hover,
        var(--primary-hover,
        color-mix(in srgb, var(--ax-contact-accent) 82%, #000)))));

    --ax-contact-accent-text:
        var(--ax-contact-accent-text-custom,
        var(--amm-on-primary,
        var(--action-text,
        #ffffff)));

   
    --ax-contact-button-radius:
        var(--ax-contact-button-radius-custom,
        var(--button-border-radius,
        var(--wp--custom--button--border-radius,
        999px)));
}

.ax-contact-form__wrap {
    /* Palette */
    --ax-contact-text: #2f3437;
    --ax-contact-label: #3f4649;
    --ax-contact-muted: #98a1a6;
    --ax-contact-border: #d5d7da;
    --ax-contact-border-strong: #b6bbbf;
    --ax-contact-required: #d93025;
    --ax-contact-field-bg: #ffffff;
    --ax-contact-prefix-bg: #f1f2f3;
    --ax-contact-hover-bg: #f4f6f6;

    /* Card */
    --ax-contact-card-bg: #ffffff;
    --ax-contact-card-border: #e7e9eb;
    --ax-contact-card-radius: 12px;
    --ax-contact-card-pad: 2rem;
    --ax-contact-card-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);

    /* Metrics */
    --ax-contact-consent-bg: #f7f8f9;
    --ax-contact-max: 100%;
    --ax-contact-row-gap: 1.125rem;
    --ax-contact-col-gap: 1.25rem;
    --ax-contact-field-height: 3.25rem;
    --ax-contact-field-radius: 8px;
    --ax-contact-field-pad: 1rem;
    --ax-contact-font-size: 1.5rem;
    --ax-contact-label-size: 1.25rem;

    /*
     * Submit button, sized from the fields rather than fixed.
     *
     * These used to be hard-coded at 14px text in 10px/20px padding, which was
     * the reference design's proportions against its own 15px fields. Raising
     * --ax-contact-font-size left the button behind at its original size, so the
     * form's primary action ended up the smallest thing on it. Deriving the
     * three from the field metrics keeps the button in proportion whatever the
     * form is scaled to, and each stays overridable on its own.
     */
    /*
     * The button's own colours, defaulting to the form's accent.
     *
     * Separate tokens rather than the accent itself because the accent is also
     * the focus ring, the links in the consent text, the product field's rule,
     * the step markers, and the confirmation tick. Recolouring the button should
     * recolour the button; a form whose send button is set to red should not end
     * up with red focus outlines and red links.
     *
     * FormSettings::colour_style() overrides these per form, as inline custom
     * properties on the wrapper — the stylesheet is one file shared by every
     * form on the site, and these differ between them.
     */
    --ax-contact-button-bg: var(--ax-contact-accent);
    --ax-contact-button-bg-hover: var(--ax-contact-accent-hover);
    --ax-contact-button-text: var(--ax-contact-accent-text);

    --ax-contact-button-font-size: max(1rem, calc(var(--ax-contact-font-size) * 0.8));
    --ax-contact-button-height: var(--ax-contact-field-height);
    --ax-contact-button-pad-x: 2em;
    --ax-contact-button-min-width: 11rem;

    max-width: var(--ax-contact-max);
    width: 100%;
    overflow: hidden;
    color: var(--ax-contact-text);
    box-sizing: border-box;
}

.ax-contact-form__wrap *,
.ax-contact-form__wrap *::before,
.ax-contact-form__wrap *::after {
    box-sizing: border-box;
}

.ax-contact-form__wrap--card {
    background: var(--ax-contact-card-bg);
    border: 1px solid var(--ax-contact-card-border);
    border-radius: var(--ax-contact-card-radius);
    padding: var(--ax-contact-card-pad);
    box-shadow: var(--ax-contact-card-shadow);
}

.ax-contact-form__intro {
    margin: 0 0 1.5rem;
    font-size: var(--ax-contact-font-size);
    line-height: 1.5;
    color: var(--ax-contact-label);
}

/* Product-context field: heading = product name, sub-heading = product URL.
   Shown when a product CTA passes the product in the URL; hidden otherwise. */
.ax-contact-form__product {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--ax-contact-border);
    border-left: 3px solid var(--ax-contact-accent);
    border-radius: var(--ax-contact-field-radius);
    background: var(--ax-contact-hover-bg);
}

.ax-contact-form__product > *[hidden] {
    display: none !important;
    margin: 0;
    padding: 0;
    height: 0;
    overflow: hidden;
}

.ax-contact-form__product[hidden] {
    display: none;
}

.ax-contact-form__product-intro {
    font-size: var(--ax-contact-label-size);
    color: var(--ax-contact-label);
}

.ax-contact-form__product-heading {
    font-weight: 700;
    font-size: 1.0625rem;
    line-height: 1.3;
    color: var(--ax-contact-text);
}

/* Placeholder state (no product in the URL) reads a touch quieter than a real
   product heading. */
.ax-contact-form__product[data-ax-product-state="placeholder"] .ax-contact-form__product-heading {
    font-weight: 600;
    color: var(--ax-contact-label);
}

.ax-contact-form__product-subheading {
    font-size: var(--ax-contact-label-size);
    color: var(--ax-contact-accent);
    text-decoration: none;
    word-break: break-all;
    margin: 0;
}

.ax-contact-form__product-subheading[hidden] {
    display: none;
}

.ax-contact-form__product-subheading:hover {
    text-decoration: underline;
}

.ax-contact-form__product-items {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: var(--ax-contact-label-size);
    color: var(--ax-contact-text);
}

.ax-contact-form__product-items[hidden] {
    display: none;
}

.ax-contact-form__product-items li {
    padding: 0.3rem 0.5rem;
    background: var(--ax-contact-field-bg);
    border: 1px solid var(--ax-contact-border);
    border-radius: var(--ax-contact-field-radius);
}

.ax-contact-form__product-items-table {
    margin: 0.625rem 0 0;
    width: 100%;
    border-collapse: collapse;
    font-size: var(--ax-contact-label-size);
    color: var(--ax-contact-text);
}

.ax-contact-form__product-items-table[hidden] {
    display: none !important;
}

.ax-contact-form__product .table-scroll-wrapper:has([hidden]) {
    display: none;
}

.ax-contact-form__product .table-scroll-wrapper:has(table[hidden]) {
    display: none;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.ax-contact-form__product-items-table thead th {
    text-align: left;
    font-weight: 600;
    padding: 0.4rem 0.625rem;
    border-bottom: 2px solid var(--ax-contact-border);
    white-space: nowrap;
}

.ax-contact-form__product-items-table tbody td {
    padding: 0.4rem 0.625rem;
    border-bottom: 1px solid var(--ax-contact-border);
}

.ax-contact-form__product-items-table tbody tr:last-child td {
    border-bottom: none;
}

.ax-contact-form__product-items-table tfoot td {
    padding: 0.4rem 0.625rem;
    font-weight: 600;
    border-top: 2px solid var(--ax-contact-border);
}

.ax-contact-form__product-items-table tfoot[hidden] {
    display: none;
}

/* ---------- Layout ---------- */

/*
 * Fields lay out on a 12-column grid. Each field spans a number of columns
 * chosen in the field builder (Width): full = 12, two-thirds = 8, half = 6,
 * third = 4. Two half-width fields therefore sit side by side; three thirds
 * fill a row; a third + two-thirds pair up. Columns collapse to a single
 * stack on narrow screens.
 */
.ax-contact-form__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--ax-contact-col-gap);
    row-gap: var(--ax-contact-row-gap);
    align-items: start;
}

.ax-contact-form__field[hidden] {
    display: none;
}

/*
 * A field the form's conditions hide before anything is filled in. The server
 * renders this so gated fields are not briefly visible while the script loads,
 * and stay hidden when JavaScript is unavailable. Once form.js runs it removes
 * the class and drives visibility with the hidden attribute instead.
 *
 * The class is doubled deliberately. On its own it weighs the same as the
 * .ax-contact-form__field rule below, which sets display:flex and comes later —
 * so the later rule won and this one did nothing at all. Doubling it matches the
 * weight of the [hidden] rule above and no longer depends on source order.
 */
.ax-contact-form__field--gated.ax-contact-form__field--gated {
    display: none;
}

.ax-contact-form__field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    /* Default span when no width class is present (half width). */
    grid-column: span 6;
}

.ax-contact-form__field--w-full,
.ax-contact-form__field--full {
    grid-column: 1 / -1;
}

.ax-contact-form__field--w-two-thirds {
    grid-column: span 8;
}

.ax-contact-form__field--w-half {
    grid-column: span 6;
}

.ax-contact-form__field--w-third {
    grid-column: span 4;
}

.ax-contact-form__field--w-three-quarters {
    grid-column: span 9;
}

.ax-contact-form__field--w-quarter {
    grid-column: span 3;
}

@media (max-width: 782px) {
    /* Tablet: thirds become halves so they don't get too cramped. */
    .ax-contact-form__field--w-third,
    .ax-contact-form__field--w-two-thirds {
        grid-column: span 6;
    }

    .ax-contact-form__field--w-three-quarters {
        grid-column: span 8;
    }

    .ax-contact-form__field--w-quarter {
        grid-column: span 4;
    }

    /* When state is visible, address/state/postal still share one row at tablet
       but give address more room: 6 + 3 + 3 = 12 */
    .ax-contact-form__grid:has([data-ax-state-wrap]:not([hidden])) [data-ax-field="address"] {
        grid-column: span 6;
    }

    .ax-contact-form__grid:has([data-ax-state-wrap]:not([hidden])) [data-ax-state-wrap] {
        grid-column: span 3;
    }

    .ax-contact-form__grid:has([data-ax-state-wrap]:not([hidden])) [data-ax-field="postal_code"] {
        grid-column: span 3;
    }
}

@media (max-width: 640px) {
    .ax-contact-form__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ax-contact-form__field {
        grid-column: 1 / -1 !important;
    }

    .ax-contact-form__wrap--card {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .ax-contact-form__phone .ax-contact-form__dropdown {
        width: 100%;
        max-width: 100%;
    }
}

/* ---------- Labels and controls ---------- */

.ax-contact-form__label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: var(--ax-contact-label-size);
    font-weight: 500;
    line-height: 1.4;
    color: var(--ax-contact-label);
}

.ax-contact-form__required {
    color: var(--ax-contact-required);
}

.ax-contact-form__control {
    width: 100%;
    height: var(--ax-contact-field-height);
    padding: 0 var(--ax-contact-field-pad);
    font: inherit;
    font-size: var(--ax-contact-font-size);
    line-height: 1.4;
    color: var(--ax-contact-text);
    background-color: var(--ax-contact-field-bg);
    border: 1px solid var(--ax-contact-border);
    border-radius: var(--ax-contact-field-radius);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ax-contact-form__control:hover {
    border-color: var(--ax-contact-border-strong);
}

.ax-contact-form__control:focus,
.ax-contact-form__control:focus-visible {
    outline: none;
    border-color: var(--ax-contact-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ax-contact-accent) 18%, transparent);
}

.ax-contact-form__control::placeholder {
    color: var(--ax-contact-muted);
    opacity: 1;
}

.ax-contact-form__textarea {
    height: auto;
    min-height: 8.25rem;
    padding: 0.75rem var(--ax-contact-field-pad);
    resize: vertical;
}

/* ---------- Select ---------- */

.ax-contact-form__select {
    position: relative;
}

.ax-contact-form__select .ax-contact-form__control {
    padding-right: 2.5rem;
    /*
     * Re-asserted here, and background-image cleared with it: a theme that
     * styles bare `select` with its own arrow image paints one underneath the
     * chevron drawn below, and the field ends up with two.
     */
    -webkit-appearance: none;
    appearance: none;
    background-image: none;
}

/* Inline data URI: self-contained, no external request. */
.ax-contact-form__select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.9375rem;
    width: 0.75rem;
    height: 0.75rem;
    transform: translateY(-50%);
    pointer-events: none;
    background-color: var(--ax-contact-label);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.8 5.4 8 10.6l5.2-5.2' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.8 5.4 8 10.6l5.2-5.2' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- Phone with dial-code picker ---------- */

.ax-contact-form__phone {
    position: relative;
    display: flex;
    align-items: stretch;
    min-width: 0;
}

.ax-contact-form__dial {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex: 0 0 auto;
    height: var(--ax-contact-field-height);
    margin: 0;
    padding: 0 0.625rem;
    font: inherit;
    font-size: var(--ax-contact-font-size);
    color: var(--ax-contact-text);
    background: var(--ax-contact-prefix-bg);
    border: 1px solid var(--ax-contact-border);
    border-right: 0;
    border-radius: var(--ax-contact-field-radius) 0 0 var(--ax-contact-field-radius);
    cursor: pointer;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}

.ax-contact-form__dial:hover {
    background: var(--ax-contact-hover-bg);
}

.ax-contact-form__dial:focus-visible {
    outline: 2px solid var(--ax-contact-accent);
    outline-offset: -2px;
}

.ax-contact-form__phone .ax-contact-form__control {
    flex: 1 1 auto;
    min-width: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.ax-contact-form__flag {
    font-size: 1.05em;
    line-height: 1;
}

/* Shown only when the platform cannot render regional-indicator emoji
   (notably Windows), where the flag would otherwise collapse to letters. */
.ax-contact-form__iso {
    display: none;
    font-size: 0.8125em;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ax-contact-label);
}

.ax-no-flag-emoji .ax-contact-form__flag {
    display: none;
}

.ax-no-flag-emoji .ax-contact-form__iso {
    display: inline;
}

.ax-contact-form__caret {
    width: 0.5rem;
    height: 0.5rem;
    border-right: 1.5px solid var(--ax-contact-label);
    border-bottom: 1.5px solid var(--ax-contact-label);
    transform: translateY(-2px) rotate(45deg);
}

.ax-contact-form__dial[aria-expanded="true"] .ax-contact-form__caret {
    transform: translateY(1px) rotate(-135deg);
}

/* Dropdown */

.ax-contact-form__dropdown {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    width: max(100%, 20rem);
    max-width: 100vw;
    background: var(--ax-contact-field-bg);
    border: 1px solid var(--ax-contact-border);
    border-radius: var(--ax-contact-field-radius);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
    overflow: hidden;
}

.ax-contact-form__dropdown[hidden] {
    display: none;
}

.ax-contact-form__search {
    display: block;
    width: 100%;
    height: 2.375rem;
    padding: 0 0.75rem;
    font: inherit;
    font-size: var(--ax-contact-font-size);
    color: var(--ax-contact-text);
    background: var(--ax-contact-field-bg);
    border: 0;
    border-bottom: 1px solid var(--ax-contact-border);
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

.ax-contact-form__search:focus {
    outline: none;
    border-bottom-color: var(--ax-contact-accent);
}

.ax-contact-form__options {
    max-height: 15rem;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.ax-contact-form__option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-size: var(--ax-contact-font-size);
    line-height: 1.3;
    cursor: pointer;
}

.ax-contact-form__option[hidden] {
    display: none;
}

.ax-contact-form__option:hover,
.ax-contact-form__option.is-active {
    background: var(--ax-contact-hover-bg);
}

.ax-contact-form__option[aria-selected="true"] {
    font-weight: 600;
}

.ax-contact-form__option-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ax-contact-form__option-dial {
    flex: 0 0 auto;
    color: var(--ax-contact-muted);
    font-variant-numeric: tabular-nums;
}

.ax-contact-form__empty {
    margin: 0;
    padding: 0.75rem;
    font-size: var(--ax-contact-font-size);
    color: var(--ax-contact-muted);
}

.ax-contact-form__empty[hidden] {
    display: none;
}

/* ---------- Inline validation errors ---------- */

.ax-contact-form__field-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--ax-contact-required);
    animation: ax-error-fade-in 0.2s ease-out;
}

.ax-contact-form__field-error::before {
    content: "";
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    background-color: var(--ax-contact-required);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1C4.134 1 1 4.134 1 8s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zm0 12.5A5.506 5.506 0 0 1 2.5 8c0-3.033 2.467-5.5 5.5-5.5s5.5 2.467 5.5 5.5-2.467 5.5-5.5 5.5z' fill='%23d93025'/%3E%3Cpath d='M7.25 4.75h1.5v4.5h-1.5zm0 5.5h1.5v1.5h-1.5z' fill='%23d93025'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1C4.134 1 1 4.134 1 8s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zm0 12.5A5.506 5.506 0 0 1 2.5 8c0-3.033 2.467-5.5 5.5-5.5s5.5 2.467 5.5 5.5-2.467 5.5-5.5 5.5z' fill='%23d93025'/%3E%3Cpath d='M7.25 4.75h1.5v4.5h-1.5zm0 5.5h1.5v1.5h-1.5z' fill='%23d93025'/%3E%3C/svg%3E") no-repeat center / contain;
}

@keyframes ax-error-fade-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ax-contact-form__field.is-invalid .ax-contact-form__control,
.ax-contact-form__field.is-invalid .ax-contact-form__dial {
    border-color: var(--ax-contact-required);
}

.ax-contact-form__field.is-invalid .ax-contact-form__control:focus,
.ax-contact-form__field.is-invalid .ax-contact-form__dial:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ax-contact-required) 18%, transparent);
}

/* ---------- Consent ---------- */

/*
 * Content block — prose placed in the form's flow that collects nothing.
 * Inherits theme typography like the rest of the form; only spacing and the
 * muted link/heading treatment are set here.
 */
.ax-contact-form__content {
    font-size: var(--ax-contact-font-size);
    line-height: 1.55;
    color: var(--ax-contact-text);
}

.ax-contact-form__content > :first-child {
    margin-top: 0;
}

.ax-contact-form__content > :last-child {
    margin-bottom: 0;
}

.ax-contact-form__content p,
.ax-contact-form__content ul,
.ax-contact-form__content ol {
    margin: 0 0 0.75rem;
}

.ax-contact-form__content ul,
.ax-contact-form__content ol {
    padding-left: 1.25rem;
}

.ax-contact-form__content h2,
.ax-contact-form__content h3,
.ax-contact-form__content h4 {
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.ax-contact-form__content a {
    color: var(--ax-contact-accent, currentColor);
    text-decoration: underline;
}

.ax-contact-form__content hr {
    height: 1px;
    margin: 0.5rem 0;
    border: 0;
    background: var(--ax-contact-border);
}

.ax-contact-form__consent {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: 0.25rem;
}

.ax-contact-form__consent-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.ax-contact-form__consent-row input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0.2rem 0 0;
    accent-color: var(--ax-contact-accent);
    cursor: pointer;
}

.ax-contact-form__consent-row label {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--ax-contact-label);
    cursor: pointer;
}

.ax-contact-form__consent-row label a {
    color: var(--ax-contact-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.ax-contact-form__consent-row label a:hover {
    color: var(--ax-contact-accent-hover);
}

.ax-contact-form__consent-row label strong {
    font-weight: 600;
}

/* ---------- Submit ---------- */

.ax-contact-form__actions {
    margin-top: 0.75rem;
}

.ax-contact-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    align-self: flex-start;
    width: auto;
    min-width: var(--ax-contact-button-min-width);
    /* min-height rather than a height, so a wrapped label still fits. The
       vertical padding is a floor for the same reason. */
    min-height: var(--ax-contact-button-height);
    padding: 0.6em var(--ax-contact-button-pad-x);
    font: inherit;
    font-size: var(--ax-contact-button-font-size);
    font-weight: 600;
    line-height: 1.2;
    color: var(--ax-contact-button-text);
    background: var(--ax-contact-button-bg);
    border: 0;
    border-radius: var(--ax-contact-button-radius);
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ax-contact-form__submit:hover {
    background: var(--ax-contact-button-bg-hover);
    color: var(--ax-contact-button-text);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--ax-contact-button-bg) 30%, transparent);
}

.ax-contact-form__submit:active {
    transform: translateY(0);
    box-shadow: none;
}

.ax-contact-form__submit:focus-visible {
    outline: 2px solid var(--ax-contact-button-bg);
    outline-offset: 2px;
    background: var(--ax-contact-button-bg-hover);
    color: var(--ax-contact-button-text);
}

.ax-contact-form__submit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Sized in em so the arrow tracks the label instead of shrinking beside it
       as the button scales up. */
    width: 0.8em;
    height: 0.8em;
}

.ax-contact-form__submit-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Loading spinner on submit button */
.ax-contact-form__submit.is-loading {
    pointer-events: none;
    position: relative;
}

.ax-contact-form__submit.is-loading .ax-contact-form__submit-text {
    visibility: hidden;
}

.ax-contact-form__submit.is-loading .ax-contact-form__submit-icon {
    visibility: hidden;
}

.ax-contact-form__submit.is-loading::after {
    content: "";
    position: absolute;
    width: 1.1em;
    height: 1.1em;
    /* Derived from the button's own text colour so the spinner stays visible
       whatever colour the button ends up. */
    border: 2px solid color-mix(in srgb, var(--ax-contact-button-text) 30%, transparent);
    border-top-color: var(--ax-contact-button-text);
    border-radius: 50%;
    animation: ax-spin 0.6s linear infinite;
}

@keyframes ax-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Notices and state ---------- */

.ax-contact-form__notice {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    font-size: var(--ax-contact-font-size);
    font-weight: 500;
    text-align: center;
    border-radius: var(--ax-contact-field-radius);
    animation: ax-notice-slide-in 0.25s ease-out;
}

.ax-contact-form__notice--success {
    color: var(--ax-contact-accent);
    background: color-mix(in srgb, var(--ax-contact-accent) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--ax-contact-accent) 25%, transparent);
}

.ax-contact-form__notice--error {
    color: var(--ax-contact-required);
    background: none;
    border: none;
    padding: 0;
    margin: 0.5rem 0 0;
    font-size: 0.8em;
    text-align: left;
}

@keyframes ax-notice-slide-in {
    from {
        opacity: 0;
        transform: translateY(-0.25rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ax-contact-form.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.ax-contact-form.is-loading .ax-contact-form__submit:not(.is-loading) {
    opacity: 0.5;
}

.ax-contact-form__control[aria-invalid="true"] {
    border-color: var(--ax-contact-required);
}

.ax-contact-form__control[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ax-contact-required) 18%, transparent);
}

/* Honeypot: removed from view and the accessibility tree. */
.ax-contact-form__hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ax-contact-form__grid:has([data-ax-state-wrap]:not([hidden])) [data-ax-field="address"] {
    grid-column: span 6;
}

.ax-contact-form__grid:has([data-ax-state-wrap]:not([hidden])) [data-ax-state-wrap] {
    grid-column: span 3;
}

.ax-contact-form__grid:has([data-ax-state-wrap]:not([hidden])) [data-ax-field="postal_code"] {
    grid-column: span 3;
}

/* ---------- Groups ---------- */

.ax-contact-form__group {
    margin-bottom: 1.5rem;
}

.ax-contact-form__group:last-child {
    margin-bottom: 0;
}

.ax-contact-form__group + .ax-contact-form__group {
    padding-top: 1.5rem;
    border-top: 1px solid var(--ax-contact-border);
}

/* ---------- Autocomplete ---------- */

.ax-contact-form__autocomplete {
    position: relative;
    width: 100%;
}

.ax-contact-form__autocomplete-input {
    width: 100%;
}

.ax-contact-form__autocomplete-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 2px);
    left: 0;
    width: 100%;
    max-height: 15rem;
    overflow-y: auto;
    background: var(--ax-contact-field-bg);
    border: 1px solid var(--ax-contact-border);
    border-top: 0;
    border-radius: 0 0 var(--ax-contact-field-radius) var(--ax-contact-field-radius);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
    animation: ax-autocomplete-slide-in 0.12s ease-out;
}

.ax-contact-form__autocomplete-results[hidden] {
    display: none;
}

@keyframes ax-autocomplete-slide-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ax-contact-form__autocomplete-option {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font: inherit;
    font-size: var(--ax-contact-font-size);
    line-height: 1.3;
    color: var(--ax-contact-text);
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.ax-contact-form__autocomplete-option:hover,
.ax-contact-form__autocomplete-option.is-active {
    background: var(--ax-contact-hover-bg);
}

.ax-contact-form__autocomplete-option[aria-selected="true"] {
    font-weight: 600;
    background: color-mix(in srgb, var(--ax-contact-accent) 8%, transparent);
}

/* ---------- Results ---------- */

.ax-contact-form__results {
    margin-top: 1.25rem;
}

.ax-contact-form__wrap--submitted form.ax-contact-form {
    display: none;
}

@media (max-width: 480px) {
    .ax-contact-form__outcome-panel {
        padding: 2rem 1.25rem 1.5rem;
    }
    .ax-contact-form__outcome-icon {
        width: 3rem;
        height: 3rem;
    }
    .ax-contact-form__outcome-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
    .ax-contact-form__outcome-title {
        font-size: 1rem;
    }
}

/* ---------- Outcome overlay (success/error) ---------- */

.ax-contact-form__outcome {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ax-contact-form__outcome.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.ax-contact-form__outcome-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ax-contact-form__outcome-panel {
    position: relative;
    width: 100%;
    max-width: 28rem;
    background: #fff;
    border: 1px solid #e7e9eb;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(16, 24, 40, 0.12), 0 4px 16px rgba(16, 24, 40, 0.06);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    transform: translateY(10px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ax-contact-form__outcome.is-visible .ax-contact-form__outcome-panel {
    transform: translateY(0) scale(1);
}

.ax-contact-form__outcome-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.ax-contact-form__outcome-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.ax-contact-form__outcome--success .ax-contact-form__outcome-icon {
    background: #ecfdf5;
    color: #16a34a;
}

.ax-contact-form__outcome--error .ax-contact-form__outcome-icon {
    background: #fef2f2;
    color: #dc2626;
}

/* The outcome check/cross glyphs are stroked (fill="none" stroke="currentColor"),
   so colour them via the container's text colour, not fill. */
.ax-contact-form__outcome-icon svg {
    fill: none;
    stroke: currentColor;
}

.ax-contact-form__outcome-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 0.375rem;
    line-height: 1.3;
}

.ax-contact-form__outcome-message {
    font-size: 0.9375rem;
    color: #646970;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.ax-contact-form__outcome-close {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ax-contact-accent-text);
    background: var(--ax-contact-accent);
    border: 0;
    border-radius: var(--ax-contact-button-radius);
    cursor: pointer;
    transition: background-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ax-contact-form__outcome-close:hover {
    background: var(--ax-contact-accent-hover);
}

.ax-contact-form__outcome-close:focus-visible {
    outline: 2px solid var(--ax-contact-accent);
    outline-offset: 2px;
}

.ax-contact-form__consent-label {
    display: block;
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--ax-contact-label);
    cursor: pointer;
}

.ax-contact-form__consent-label a {
    color: var(--ax-contact-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.ax-contact-form__consent-label a:hover {
    color: var(--ax-contact-accent-hover);
}

.ax-contact-form__consent-label strong {
    font-weight: 600;
}

@media (max-width: 640px) {
    /* Full width on a phone: the thumb target is the whole row, and there is no
       column to sit beside. The size still comes from the tokens above. */
    .ax-contact-form__submit {
        width: 100%;
        justify-content: center;
        min-height: max(3rem, var(--ax-contact-button-height));
    }

    .ax-contact-form__actions {
        margin-top: 1rem;
    }

    .ax-contact-form__card-wrap {
        padding: 1.25rem;
    }

    /*
     * iOS zooms the page when a focused input's text is under 16px, so 16px is a
     * floor here — not a fixed size. It used to be fixed, which meant raising
     * --ax-contact-font-size made the form larger everywhere except the phones
     * this block is for, where text shrank back to 16px.
     */
    .ax-contact-form__control {
        font-size: max(16px, var(--ax-contact-font-size));
        height: max(48px, var(--ax-contact-field-height));
    }

    .ax-contact-form__dial {
        height: max(48px, var(--ax-contact-field-height));
    }

    .ax-contact-form__search {
        font-size: max(16px, var(--ax-contact-font-size));
        height: 2.75rem;
    }

    .ax-contact-form__textarea {
        font-size: max(16px, var(--ax-contact-font-size));
        min-height: 7rem;
    }

    select.ax-contact-form__control {
        font-size: max(16px, var(--ax-contact-font-size));
    }
}

@media (max-width: 480px) {
    .ax-contact-form__wrap {
        --ax-contact-col-gap: 1rem;
        --ax-contact-row-gap: 0.875rem;
        --ax-contact-card-pad: 1rem;
    }

    .ax-contact-form__wrap--card {
        padding: 1rem;
        border-radius: 8px;
    }

    .ax-contact-form__intro {
        margin-bottom: 1.25rem;
    }

    .ax-contact-form__consent-row label {
        font-size: 0.8125rem;
    }

    .ax-contact-form__consent-row {
        gap: 0.625rem;
    }

    .ax-contact-form__label {
        font-size: 0.8125rem;
    }

    .ax-contact-form__dial {
        padding: 0 0.5rem;
        gap: 0.25rem;
    }

    .ax-contact-form__dialcode {
        font-size: 0.8125rem;
    }

    .ax-contact-form__product {
        padding: 0.625rem 0.75rem;
    }

    .ax-contact-form__product-heading {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ax-contact-form__control,
    .ax-contact-form__submit {
        transition: none;
    }

    .ax-contact-form__field-error,
    .ax-contact-form__notice,
    .ax-contact-form__autocomplete-results {
        animation: none;
    }

    .ax-contact-form__submit.is-loading::after {
        animation-duration: 1.2s;
    }
}

.pac-container {
    font-family: inherit;
    font-size: var(--ax-contact-font-size, 0.9375rem);
    border: 1px solid var(--ax-contact-border, #d5d7da);
    border-top: 0;
    border-radius: 0 0 var(--ax-contact-field-radius, 8px) var(--ax-contact-field-radius, 8px);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
    z-index: 10000;
}

.pac-item {
    padding: 0.5rem 0.75rem;
    line-height: 1.4;
    font-size: var(--ax-contact-font-size, 0.9375rem);
    color: var(--ax-contact-text, #2f3437);
    border-top: 1px solid var(--ax-contact-border, #d5d7da);
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.pac-item:first-child {
    border-top: 0;
}

.pac-item:hover,
.pac-item.pac-item-selected {
    background: var(--ax-contact-hover-bg, #f4f6f6);
}

.pac-item-query {
    font-size: inherit;
    color: var(--ax-contact-text, #2f3437);
    font-weight: 600;
}

.pac-matched {
    font-weight: 700;
}

.pac-icon {
    display: none;
}

/* "Powered by Google" footer styling */
.pac-container::after {
    padding: 0.375rem 0.75rem;
    font-size: 0.6875rem;
}

/*
 * Radio and checkbox groups.
 *
 * A group is one question, so it renders as a fieldset with a legend styled to
 * match the labels on every other field — the visual weight should be the same
 * whether a question is answered by typing or by choosing.
 */
.ax-contact-form__fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.ax-contact-form__choice-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ax-contact-form__choice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: var(--ax-contact-font-size);
    line-height: 1.4;
    cursor: pointer;
}

.ax-contact-form__choice input {
    flex: 0 0 auto;
    margin: 0.15rem 0 0;
    accent-color: var(--ax-contact-accent, currentColor);
}

.ax-contact-form__choice span {
    min-width: 0;
    overflow-wrap: break-word;
}

/* The box that appears when "Other" is chosen. */
.ax-contact-form__other {
    margin: 0.25rem 0 0 1.5rem;
}

.ax-contact-form__other[hidden] {
    display: none;
}

/*
 * A link placed in the form. It collects nothing, so it sits at the same
 * rhythm as the fields around it without pretending to be one.
 */
.ax-contact-form__linkfield {
    justify-content: center;
}

.ax-contact-form__link {
    font-size: var(--ax-contact-font-size);
    color: var(--ax-contact-accent, currentColor);
    text-decoration: underline;
}

/* Prompt under a radio or checkbox question — the placeholder equivalent for a
   group, which has no input to put one inside. */
.ax-contact-form__hint {
    margin: 0.25rem 0 0;
    font-size: 0.85em;
    line-height: 1.4;
    color: var(--ax-contact-muted);
}

/* ---------- Button width ---------- */

/*
 * Set once on the form, so the Back and Continue buttons the stepper builds are
 * covered by the same rule without the script knowing the setting exists.
 *
 * "Inline" needs no rule of its own — it is what .ax-contact-form__submit
 * already does, and the phone rule further down widens it there regardless.
 */
.ax-contact-form--submit-full .ax-contact-form__submit {
    width: 100%;
}

/*
 * Beside a Back button, "full width" can only mean the rest of the row — 100%
 * of the row plus a Back button is wider than the row, and the two would wrap
 * onto separate lines. flex-grow gives it everything Back is not using, which
 * is what full width means once there is something else on the line.
 *
 * Scoped to the two rows that actually lay out horizontally. The plain actions
 * row of an un-stepped form is a flex *column*, where flex-grow would stretch
 * the button downwards and width:auto would shrink it back to its label —
 * exactly the opposite of what was asked for.
 */
.ax-contact-form--submit-full .ax-contact-form__step-actions .ax-contact-form__submit,
.ax-contact-form--submit-full.ax-contact-form--stepped .ax-contact-form__actions .ax-contact-form__submit {
    flex: 1 1 auto;
    width: auto;
}

/* ---------- Revealed fields ---------- */

/*
 * A field the conditions have just opened up. The animation is short and small
 * on purpose: it is there to connect the answer to the field that appeared, not
 * to be noticed as an effect. Applied only to fields revealed in response to
 * something the visitor did — the ones resolved on load appear with the page.
 */
@keyframes ax-reveal {
    from {
        opacity: 0;
        transform: translateY(-0.375rem);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.ax-contact-form__field.is-revealing {
    animation: ax-reveal 0.22s ease-out;
}

/* ---------- Optional marker ---------- */

/*
 * Not aria-hidden, unlike the required asterisk: the input's required attribute
 * already tells a screen reader which fields are compulsory, but nothing in the
 * markup says which are not.
 */
.ax-contact-form__optional {
    margin-left: 0.35em;
    font-size: 0.8em;
    font-weight: 400;
    color: var(--ax-contact-muted);
}

/* ---------- Error summary ---------- */

.ax-contact-form__errors {
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--ax-contact-required);
    border-left-width: 4px;
    border-radius: var(--ax-contact-field-radius);
    background: color-mix(in srgb, var(--ax-contact-required) 6%, transparent);
}

.ax-contact-form__errors[hidden] {
    display: none;
}

.ax-contact-form__errors:focus-visible {
    outline: 2px solid var(--ax-contact-required);
    outline-offset: 2px;
}

.ax-contact-form__errors-title {
    margin: 0 0 0.5rem;
    font-size: var(--ax-contact-label-size);
    font-weight: 600;
    color: var(--ax-contact-required);
}

.ax-contact-form__errors-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
}

.ax-contact-form__errors-list li {
    margin: 0.25rem 0;
}

/* A button styled as a link: it moves focus rather than navigating, so it is
   not an anchor, but it has to read as something to click. */
.ax-contact-form__errors-link {
    padding: 0;
    font: inherit;
    font-size: 0.9em;
    color: var(--ax-contact-required);
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: none;
    border: 0;
    cursor: pointer;
}

.ax-contact-form__errors-link:hover {
    text-decoration-thickness: 2px;
}

/* ---------- Steps ---------- */

.ax-contact-form__steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.ax-contact-form__steps[hidden] {
    display: none;
}

.ax-contact-form__step-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    font: inherit;
    font-size: 0.9em;
    color: var(--ax-contact-muted);
    background: none;
    border: 0;
    cursor: pointer;
}

/* A step ahead of you is not a destination yet, so it reads as inert rather
   than as something that failed to respond. */
.ax-contact-form__step-button:disabled {
    cursor: default;
}

.ax-contact-form__step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9em;
    height: 1.9em;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1;
    color: var(--ax-contact-muted);
    border: 1px solid var(--ax-contact-border);
    border-radius: 50%;
    background: var(--ax-contact-field-bg);
}

.ax-contact-form__step.is-done .ax-contact-form__step-number,
.ax-contact-form__step.is-current .ax-contact-form__step-number {
    color: var(--ax-contact-accent-text);
    background: var(--ax-contact-accent);
    border-color: var(--ax-contact-accent);
}

.ax-contact-form__step.is-current .ax-contact-form__step-button,
.ax-contact-form__step.is-done .ax-contact-form__step-button {
    color: var(--ax-contact-text);
}

.ax-contact-form__step.is-current .ax-contact-form__step-title {
    font-weight: 600;
}

/* One step at a time, so the dividing rule between stacked groups has nothing
   left to divide. */
.ax-contact-form--stepped .ax-contact-form__group + .ax-contact-form__group {
    padding-top: 0;
    border-top: 0;
}

.ax-contact-form__group[hidden] {
    display: none;
}

.ax-contact-form__step-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Back is the secondary of the pair, so it carries the button's shape without
   its weight — the primary action stays the one that moves you forward. */
.ax-contact-form__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--ax-contact-button-height);
    padding: 0.6em 1.5em;
    font: inherit;
    font-size: var(--ax-contact-button-font-size);
    font-weight: 600;
    line-height: 1.2;
    color: var(--ax-contact-text);
    background: none;
    border: 1px solid var(--ax-contact-border-strong);
    border-radius: var(--ax-contact-button-radius);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ax-contact-form__back:hover {
    background: var(--ax-contact-hover-bg);
    border-color: var(--ax-contact-text);
}

/* The actions row on the last step holds Back and Send side by side. */
.ax-contact-form--stepped .ax-contact-form__actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ---------- Saved draft ---------- */

.ax-contact-form__draft {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    font-size: 0.9em;
    color: var(--ax-contact-label);
    background: var(--ax-contact-hover-bg);
    border-left: 3px solid var(--ax-contact-accent);
    border-radius: var(--ax-contact-field-radius);
}

.ax-contact-form__draft-clear {
    padding: 0;
    font: inherit;
    font-size: inherit;
    font-weight: 600;
    color: var(--ax-contact-accent);
    background: none;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

/* ---------- Inline confirmation ---------- */

/*
 * Takes the form's place on success. Sized to roughly where the form was so the
 * page does not collapse upward the moment it is sent — a layout jump at the
 * exact moment of confirmation reads as something having gone wrong.
 */
.ax-contact-form__confirmation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    animation: ax-reveal 0.3s ease-out;
}

.ax-contact-form__confirmation:focus {
    outline: none;
}

.ax-contact-form__confirmation:focus-visible {
    outline: 2px solid var(--ax-contact-accent);
    outline-offset: 4px;
    border-radius: var(--ax-contact-field-radius);
}

.ax-contact-form__confirmation-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    color: var(--ax-contact-accent-text);
    background: var(--ax-contact-accent);
    border-radius: 50%;
}

.ax-contact-form__confirmation-title {
    margin: 0;
    font-size: calc(var(--ax-contact-font-size) * 1.1);
    font-weight: 600;
    color: var(--ax-contact-text);
}

.ax-contact-form__confirmation-text {
    max-width: 34em;
    margin: 0;
    font-size: var(--ax-contact-font-size);
    line-height: 1.5;
    color: var(--ax-contact-label);
}

/* ---------- Screen-reader-only ---------- */

/*
 * The live region the script announces revealed fields and step changes
 * through. It has to be in the layout — display:none and visibility:hidden are
 * both ignored by assistive technology — so it is clipped to nothing instead.
 */
.ax-contact-form__sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .ax-contact-form__step-actions,
    .ax-contact-form--stepped .ax-contact-form__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .ax-contact-form__back {
        width: 100%;
    }

    /* Those rows are column-reverse here, so "fill the rest of the row" has no
       row to fill — the button goes back to filling its own line. */
    .ax-contact-form--submit-full .ax-contact-form__step-actions .ax-contact-form__submit,
    .ax-contact-form--submit-full.ax-contact-form--stepped .ax-contact-form__actions .ax-contact-form__submit {
        flex: 0 0 auto;
        width: 100%;
    }

    /* Names would wrap into a wall of text on a narrow screen, so the numbers
       carry the progress and the current step's name is the only one shown. */
    .ax-contact-form__step:not(.is-current) .ax-contact-form__step-title {
        display: none;
    }

    .ax-contact-form__steps {
        gap: 0.5rem 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ax-contact-form__field.is-revealing,
    .ax-contact-form__confirmation {
        animation: none;
    }
}

/* ---------- File upload ---------- */

/*
 * The note under a file field's label, stating its size and type limits. Also
 * available to any other field with a subtext.
 */
.ax-contact-form__subtext {
    margin: 0 0 0.5rem;
    font-size: 0.8em;
    line-height: 1.45;
    color: var(--ax-contact-muted);
}

/*
 * The drop zone wraps the real file input rather than replacing it. The input
 * is stretched across the zone and made transparent, so a click anywhere opens
 * the picker and the field keeps working with no script at all — the label,
 * keyboard focus, and form submission are all the browser's own.
 */
.ax-contact-form__dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(var(--ax-contact-field-height) * 1.6);
    padding: 1rem;
    text-align: center;
    border: 1px dashed var(--ax-contact-border-strong);
    border-radius: var(--ax-contact-field-radius);
    background: var(--ax-contact-field-bg);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ax-contact-form__dropzone:hover,
.ax-contact-form__dropzone.is-dragover {
    border-color: var(--ax-contact-accent);
    background: var(--ax-contact-hover-bg);
}

/* Focus lands on the input, so the ring has to be drawn on the zone around it
   or a keyboard visitor sees nothing at all. */
.ax-contact-form__dropzone:focus-within {
    border-color: var(--ax-contact-accent);
    outline: 2px solid var(--ax-contact-accent);
    outline-offset: 2px;
}

.ax-contact-form__file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ax-contact-form__dropzone-text {
    font-size: 0.9em;
    color: var(--ax-contact-muted);
    pointer-events: none;
}

.ax-contact-form__file-list {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.ax-contact-form__file-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.85em;
    border: 1px solid var(--ax-contact-border);
    border-radius: var(--ax-contact-field-radius);
    background: var(--ax-contact-hover-bg);
}

.ax-contact-form__file-list li + li {
    margin-top: 0.375rem;
}

/* A file the field already knows it cannot take, marked before anything is
   uploaded rather than after the transfer finishes. */
.ax-contact-form__file-list li.is-invalid {
    border-color: var(--ax-contact-required);
    background: color-mix(in srgb, var(--ax-contact-required) 6%, transparent);
}

.ax-contact-form__file-name {
    font-weight: 500;
    color: var(--ax-contact-text);
    overflow-wrap: anywhere;
}

.ax-contact-form__file-size {
    color: var(--ax-contact-muted);
}

.ax-contact-form__file-problem {
    margin-left: auto;
    font-weight: 600;
    color: var(--ax-contact-required);
}

.ax-contact-form__field.is-invalid .ax-contact-form__dropzone {
    border-color: var(--ax-contact-required);
}

/* The control that takes one wrong file back out of the selection. */
.ax-contact-form__file-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6em;
    height: 1.6em;
    margin-left: auto;
    padding: 0;
    flex-shrink: 0;
    color: var(--ax-contact-muted);
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.ax-contact-form__file-remove:hover {
    color: var(--ax-contact-required);
    background: color-mix(in srgb, var(--ax-contact-required) 12%, transparent);
}

.ax-contact-form__file-remove:focus-visible {
    outline: 2px solid var(--ax-contact-accent);
    outline-offset: 1px;
    color: var(--ax-contact-required);
}

/* The problem text and the remove button both want the end of the row, so the
   text gives up the auto margin and the button keeps it. */
.ax-contact-form__file-list li.is-invalid .ax-contact-form__file-problem {
    margin-left: auto;
}

.ax-contact-form__file-list li.is-invalid .ax-contact-form__file-remove {
    margin-left: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
    .ax-contact-form__file-remove { transition: none; }
}

/*
 * Said after the field has already trimmed an over-large selection down to what
 * it accepts. Informational rather than an error: what is left is legal, so it
 * is not styled as something the visitor has to go and fix.
 */
.ax-contact-form__file-note {
    margin: 0.5rem 0 0;
    font-size: 0.8em;
    line-height: 1.45;
    color: var(--ax-contact-label);
}

/* The running total, once a field caps what everything may come to together. */
.ax-contact-form__file-note--over {
    font-weight: 600;
    color: var(--ax-contact-required);
}


/* --------------------------------------------------------------------------
   A form that is closed: outside its dates, over its cap, or needing a login.

   Sits where the form was rather than as loose text, because the page around it
   was laid out for a form.
   -------------------------------------------------------------------------- */
.ax-contact-form__closed-message {
    margin: 0;
    color: var(--ax-contact-text, inherit);
    font-size: var(--ax-contact-font-size, 1.5rem);
    line-height: 1.5;
}

.ax-contact-form__closed-message > :first-child { margin-top: 0; }
.ax-contact-form__closed-message > :last-child { margin-bottom: 0; }
