/* Loaded only on /pay/. Let Safari reveal focused fields by scrolling the
   document, rather than the nested scroll containers in the bank's form. */
html {
    scroll-behavior: auto !important;
}

.article__body {
    overflow: visible !important;
}

/* The bank switches to a viewport-fixed button by viewport HEIGHT, including
   landscape phones and desktops. Always use the button inside the form. */
#paykeeper_form-global_wrapper #paykeeper_form-article .mobile-goto-wrapper {
    display: none !important;
}

#paykeeper_form-global_wrapper .paykeeper_form-goto-wrapper {
    display: block !important;
    position: static !important;
}

#paykeeper_form-global_wrapper #paykeeper_form-goto {
    position: static !important;
}

/* The inline button needs its natural height even with the keyboard open. */
#paykeeper_form-global_wrapper #paykeeper_form-main {
    max-height: none !important;
}

#paykeeper_form-global_wrapper {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
}

/* hidden clips the sliding steps but also creates a programmatically scrollable
   ancestor. clip preserves the clipping without intercepting focus scrolling.
   clip-path is the fallback for older Safari versions without overflow: clip. */
#paykeeper_form-global_wrapper #paykeeper_form-article {
    overflow: visible !important;
    clip-path: inset(0);
    scroll-behavior: auto !important;
}

@supports (overflow: clip) {
    #paykeeper_form-global_wrapper #paykeeper_form-article {
        overflow: clip !important;
        clip-path: none;
    }
}

/* Prevent focus zoom on iOS. On narrow screens the existing form is zoomed
   to 0.86, so 19px keeps the displayed input text above the 16px threshold. */
#paykeeper_form-global_wrapper .paykeeper_form-fieldv2 {
    font-size: 16px !important;
}

/* The bank uses rem in this newer notice, but the theme's root font is ~1px.
   Keep the complete certificate notice readable without a disclosure toggle. */
#paykeeper_form-global_wrapper .paykeeper_form-payment_ssl-warning {
    height: auto !important;
    max-height: none !important;
    flex-shrink: 0 !important;
    padding: 16px 52px 16px 16px !important;
    margin-bottom: 16px !important;
}

#paykeeper_form-global_wrapper .paykeeper_form-payment_ssl-warning .o-text {
    display: block !important;
    font-size: 14px !important;
    line-height: 20px !important;
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    transition: none !important;
}

#paykeeper_form-global_wrapper .paykeeper_form-payment_ssl-warning .o-text + .o-text {
    margin-top: 12px !important;
}

#paykeeper_form-global_wrapper .paykeeper_form-payment_ssl-warning .jsShowMoreLink {
    display: none !important;
}

@media (max-width: 359px) {
    #paykeeper_form-global_wrapper .paykeeper_form-fieldv2 {
        font-size: 19px !important;
    }
}
