/**
 * Crypto gateway theme bridge
 *
 * Loaded only on cart, checkout, my-account, and WC endpoint URLs
 * (see functions.php `wp_enqueue_scripts` hook).
 *
 * The crypto-pay-gateway plugin ships its own ~950-line stylesheet
 * (`/wp-content/plugins/crypto-pay-gateway/assets/css/checkout.css`).
 * That sheet is battle-tested on production and handles all of the UI
 * states — selector cards, countdown, wallet connect, QR, copy-button,
 * manual tx entry, wallet-browser mode, and more.
 *
 * This file is PURELY a thin bridge between the plugin's defaults and
 * the block-theme's markup conventions. Keep it small. Full Direction B
 * brand bridging (purple #7c3aed → aqua #7AA5B5 for interactive accent)
 * is deferred to a live-checkout iteration session during Phase 3
 * validation — it requires visually walking the 4-currency flow
 * (BTC / SOL / USDC / PYUSD) and is too risky to apply blind.
 *
 * Do NOT use `var(--wp--preset--spacing--*)` here: WP does not expose
 * those tokens as root-level CSS vars, they silently resolve to 0
 * outside of block-style attributes. Use literal rem values.
 */

/* ==========================================================================
   Wallet in-app browser mode — block-theme selectors
   ==========================================================================
   The plugin's checkout.css strips site chrome inside wallet in-app
   browsers (Phantom/Solflare/Backpack/Exodus) by hiding Storefront's
   `.site-header`, `#masthead`, `.site-footer`, `#colophon` etc. Those
   selectors don't match pgb-theme's block-theme output, which emits
   plain `<header>` and `<footer>` tags wrapped in `wp-block-group`.

   Add the block-theme targets so the strip works here too. */
.cpg-wallet-browser-mode > header.wp-block-group,
.cpg-wallet-browser-mode > footer.wp-block-group,
.cpg-wallet-browser-mode header.wp-block-template-part,
.cpg-wallet-browser-mode footer.wp-block-template-part {
    display: none !important;
}

/* ==========================================================================
   Order-again button — text-color override
   ==========================================================================
   theme.json sets elements.button.color.text = surface (#fff) but WC's
   `p.order-again a.button.wp-element-button` selector wins specificity
   somewhere in WC's stylesheet, leaving the link inheriting the page's
   default <a> color (which is `primary`, identical to the button background).
   Result: invisible label. Force the surface color back.
   Verified live: rgb(30,58,95) on rgb(30,58,95) → 0 contrast. */
p.order-again a.button,
.woocommerce-MyAccount-content p.order-again a {
    color: var(--color-on-primary);
}
