/* Theme chrome reset — loaded for every checkout template.
 *
 * The checkout templates deliberately drop the theme's stylesheets: they
 * remove `wp_enqueue_scripts` from `wp_head` so Astra (or whatever theme is
 * active) cannot fight the checkout design. They still call `wp_footer()`,
 * because the merchant's own footer integrations — chat widget, analytics,
 * pixels — live there.
 *
 * That leaves a gap: anything a theme or plugin *prints* on `wp_footer` lands
 * on the page with no CSS to lay it out. Astra's back-to-top is the case that
 * bit us — `<div id="ast-scroll-top">` plus an unsized arrow SVG and a
 * `.screen-reader-text` span rendered as a giant chevron and the literal words
 * "Retour en haut" in the page flow under the card.
 *
 * So the rules below are not styling. They are the small amount of the theme
 * stylesheet the checkout still needs once it has thrown the rest away, and
 * they are kept template-agnostic on purpose: a template added later gets them
 * without shipping anything, the same way payment-page-skeleton.css works.
 */

/* Screen-reader-only text. Core, WooCommerce and most plugins assume the theme
 * clips these; with no theme CSS the label is simply visible. Keep the standard
 * clip so injected a11y text stays audible but unseen. */
.screen-reader-text,
.sr-only,
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Back-to-top widgets. There is nothing to scroll back to on a checkout, and
 * without the theme's CSS they cannot position or size themselves. Astra's is
 * also unhooked in PHP (see paytreex_payment_page_suppress_theme_footer_chrome);
 * this covers the rest, and Astra too if a child theme re-adds it. */
#ast-scroll-top,
.ast-scroll-top-icon,
#scroll-to-top,
#back-to-top,
.back-to-top,
.scroll-to-top,
#toTop {
    display: none !important;
}

/* Skip links: same story — themes print them first in the body and rely on
 * their own CSS to hide them until focused. */
.skip-link,
.screen-reader-shortcut {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
