/* Shared responsive rhythm for UK and Canada single-page forms. */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

html,
body.simple-form-single-page {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body.simple-form-single-page .simple-form-page-header {
    width: min(1040px, calc(100% - 32px)) !important;
    margin: 28px auto 0 !important;
}

body.simple-form-single-page .simple-form-page-form.manual-form-root[data-render-mode="singlepage"] {
    width: 100% !important; 
    margin: 32px auto 56px !important;
    padding-inline: clamp(16px, 4vw, 44px) !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] {
    --sf-font-size: 15px;
    --sf-label-size: 15px;
    --sf-help-size: 13px;
    --sf-section-title-size: 20px;
    --sf-line-height: 1.5;
    --sf-control-height: 44px;
    --sf-field-gap: 24px;
    --sf-section-gap: 36px;
    --sf-label-gap: 8px;
    width: min(100%, 1040px);
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 44px) !important;
    color: #1c252d;
    font-size: var(--sf-font-size) !important;
    line-height: var(--sf-line-height) !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] *,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] *::before,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] *::after {
    box-sizing: border-box;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] img,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] video,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] canvas {
    max-width: 100%;
    height: auto;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .wizard-step > .row {
    --bs-gutter-x: 22px !important;
    --bs-gutter-y: var(--sf-field-gap) !important;
    align-items: flex-start;
}

/* One spacing rule for every field; no field-id-specific margins. */
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] [data-field-container] {
    min-width: 0;
    max-width: 100%;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: var(--sf-font-size) !important;
    line-height: var(--sf-line-height) !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .wizard-step > .row > [data-field-container] {
    margin-top: var(--sf-field-gap) !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .wizard-step > .row > [data-field-name="AddressLine2"],
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .wizard-step > .row > [data-field-name="BillingAddressLine2"] {
    margin-top: 0 !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-label,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-choice-legend,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-composite-label,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-confirmation-question,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] label.form-label,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .floating-group > .floating-label {
    display: block;
    width: auto;
    margin: 0 0 var(--sf-label-gap) !important;
    color: #1c252d !important;
    font-size: var(--sf-label-size) !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    white-space: normal !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-content,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-content p,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-content li,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .form-check-label,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .ca-hard-block,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .ca-confirmation-copy {
    font-size: var(--sf-font-size) !important;
    line-height: var(--sf-line-height) !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-content p {
    margin: 0 0 10px !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-content p:last-child,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-content li:last-child {
    margin-bottom: 0 !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-content ul,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-content ol {
    margin: 10px 0 0 !important;
    padding-left: 24px !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-content li {
    margin-bottom: 6px !important;
}

/* Standard control sizing. */
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-control input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-control select,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-control textarea,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-control .form-control,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-control .form-select,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-payment-control .form-control,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-payment-control .form-select {
    width: 100%;
    min-height: var(--sf-control-height) !important;
    padding: 9px 12px !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-control textarea.form-control {
    min-height: 112px !important;
    resize: vertical;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .select2-container {
    width: 100% !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .select2-selection--single {
    min-height: var(--sf-control-height) !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .select2-selection--single .select2-selection__rendered {
    min-height: calc(var(--sf-control-height) - 2px) !important;
    padding: 10px 38px 10px 12px !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .select2-selection--single .select2-selection__arrow {
    height: calc(var(--sf-control-height) - 2px) !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .field-help,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .form-text,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-sublabel {
    display: block;
    margin-top: 6px !important;
    color: #68727b !important;
    font-size: var(--sf-help-size) !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .invalid-feedback,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .text-danger {
    margin-top: 6px !important;
    font-size: var(--sf-help-size) !important;
    line-height: 1.45 !important;
}

/* Large, predictable click/tap targets without changing the simple appearance. */
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-choice-group,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .radio-yn {
    gap: 8px 20px !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-choice-vertical {
    width: 100%;
    gap: 4px !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-choice-group:not(.mf-choice-buttons):not(.mf-choice-cards) > .mf-choice-item {
    display: grid;
    grid-template-columns: 19px minmax(0, 1fr);
    align-items: flex-start;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    touch-action: manipulation;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-choice-group:not(.mf-choice-buttons):not(.mf-choice-cards) > .mf-choice-item > .form-check-input {
    position: relative;
    z-index: 2;
    grid-row: 1;
    grid-column: 1;
    width: 19px !important;
    height: 19px !important;
    margin: 12px 0 0 !important;
    cursor: pointer;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-choice-group:not(.mf-choice-buttons):not(.mf-choice-cards) > .mf-choice-item > .form-check-label {
    display: flex;
    z-index: 1;
    grid-row: 1;
    grid-column: 1 / -1;
    align-items: center;
    min-width: 0;
    min-height: 44px;
    margin: 0 !important;
    padding: 8px 10px 8px 29px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-choice-group:not(.mf-choice-buttons):not(.mf-choice-cards) > .radio-yn__item > .form-check-label {
    min-width: 56px;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .form-check:not(.mf-choice-item) {
    display: grid;
    grid-template-columns: 19px minmax(0, 1fr);
    align-items: flex-start;
    min-height: 44px !important;
    margin: 0 !important;
    padding-left: 0 !important;
    touch-action: manipulation;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .form-check:not(.mf-choice-item) > .form-check-input {
    position: relative;
    z-index: 2;
    grid-row: 1;
    grid-column: 1;
    width: 19px !important;
    height: 19px !important;
    margin: 12px 0 0 !important;
    cursor: pointer;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .form-check:not(.mf-choice-item) > .form-check-label {
    display: flex;
    z-index: 1;
    grid-row: 1;
    grid-column: 1 / -1;
    align-items: center;
    min-height: 44px;
    margin: 0 !important;
    padding: 8px 0 8px 29px;
    cursor: pointer;
    touch-action: manipulation;
}

/* Semantic section spacing replaces market and field-id exceptions. */
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-field--heading,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-field--divider,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-section-title,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-section-divider,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-payment-heading,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .ca-section-title,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .ca-section-divider {
    margin-top: calc(var(--sf-section-gap) - var(--sf-field-gap)) !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-section-title h3,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-payment-heading h3,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .ca-section-title h3,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .ca-section-title h4,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .ca-privacy-title,
body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-photo-guide-title {
    margin: 0 !important;
    color: #1c252d !important;
    font-size: var(--sf-section-title-size) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .form-divider {
    margin: 0 !important;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-photo-guide {
    width: 100%;
    max-width: 920px;
}

body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .simple-form-photo-guide-image {
    display: block;
    width: 300px !important;
    max-width: 100% !important;
    margin: 12px 0 20px !important;
}

@media (max-width: 991.98px) {
    body.simple-form-single-page .simple-form-page-header {
        width: calc(100% - 28px) !important;
        margin-top: 22px !important;
    }

    body.simple-form-single-page .simple-form-page-form.manual-form-root[data-render-mode="singlepage"] {
        margin-top: 26px !important;
        margin-bottom: 44px !important;
        padding-inline: 16px !important;
    }

    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] {
        --sf-section-title-size: 19px;
        --sf-field-gap: 20px;
        --sf-section-gap: 30px;
        width: 100%;
        padding-inline: 16px !important;
    }

    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .wizard-step > .row {
        --bs-gutter-x: 0 !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .wizard-step > .row > [class*="col-"] {
        width: 100%;
        max-width: 100%;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-label-spacer {
        display: none !important;
    }

    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-choice-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 575.98px) {
    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] {
        --sf-control-height: 48px;
        --sf-label-size: 15px;
        padding-inline: 14px !important;
    }

    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .mf-choice-group,
    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .radio-yn {
        gap: 4px 12px !important;
    }

    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] #btnSubmit {
        width: 100%;
        min-height: 48px;
    }
}

@media (pointer: coarse) {
    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] button,
    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .btn,
    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] .form-check-label {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] *,
    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] *::before,
    body.simple-form-single-page .manual-form-root[data-render-mode="singlepage"] *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
