/**
 * Commerce / utility typography cleanup -- Phase 2B.2B, extended in the
 * commerce-cleanup pass with a 4th section for the single-product sticky
 * add-to-cart bar.
 *
 * Typography only. No redesign: no color, spacing, geometry, or layout
 * changes anywhere in this file. Converts the remaining Oswald surfaces
 * (top announcement bar, ModernCart drawer, CartFlows/WooCommerce checkout,
 * single-product sticky add-to-cart bar) to the TSC Inter / Inter Display
 * system.
 *
 * Each section below was live-verified independently against the actual
 * site before being written -- selectors, specificity, and (where used)
 * the evidence for !important are documented inline per section, not
 * assumed.
 *
 * Enqueued after tsc-tokens only, same reasoning as hero.css/
 * shop-by-category.css/audio-software.css: typography.css explicitly
 * excludes the homepage and checkout, and none of these three surfaces are
 * homepage/#content anyway.
 */

/* ============================================================
 * 1. TOP ANNOUNCEMENT BAR (Simple Banner plugin)
 * ============================================================
 * #simple-banner is a unique ID, a direct <body> sibling of the header --
 * live-verified it currently gets Oswald purely by inheriting Astra's own
 * global `body, button, input, select, textarea { font-family: Oswald }`
 * rule (the Simple Banner plugin's own CSS sets no font-family at all).
 * An ID selector trivially outranks that un-important, class-only Astra
 * rule -- no !important needed here.
 *
 * Font-size compensation at mobile only: live-verified the banner already
 * wraps to 4 lines / ~43px tall at 400px width with Oswald at 13px: Inter
 * is wider per character at the same size and pushed it to 5 lines / 65px
 * -- a real height regression the brief asked to check for. 11.5px Inter
 * was live-verified to restore the original 4-line / ~44px result. Only
 * the text span's size changes; height/padding/colors/alignment/wording/
 * close-button/link behavior are all otherwise untouched, and desktop
 * (1440px) was live-verified unaffected by the font change at all (45px
 * before and after) so no desktop size change is made.
 */
#simple-banner,
#simple-banner-close-button {
	font-family: var(--tsc-font-body);
}

@media (max-width: 767px) {
	.simple-banner-text span {
		font-size: 11.5px;
	}
}

/* ============================================================
 * 2. MODERNCART SLIDE-OUT DRAWER
 * ============================================================
 * .moderncart-panel is a unique, third-party-plugin-owned class (global
 * floating overlay, not scoped to any body class) -- live-verified via
 * matched-rule tracing that only bare-element Astra rules (`button`,
 * specificity (0,0,1)) compete here, no CartFlows-style hidden overrides
 * like checkout has. A class-scoped override at (0,1,1)+ wins cleanly, no
 * !important needed -- confirmed live for the remove button, quantity
 * input, and drawer title.
 *
 * Base font-family cascades via normal inheritance to plain text elements
 * (span/div/a/p) that have no direct competing rule. button/input/select/
 * textarea need an explicit override since Astra's rule targets those
 * tags directly, not via inheritance.
 *
 * "Review Your Cart" is the one genuine major heading (drawer title,
 * confirmed live: `.moderncart-slide-out-header-title`) -- Inter Display.
 * Everything else (product title, price, Remove, quantity, "Got a
 * Discount Code?", Subtotal/Total, "Proceed to Checkout") is functional
 * body text and stays Inter, per the brief.
 */
.moderncart-panel {
	font-family: var(--tsc-font-body);
}

.moderncart-panel button,
.moderncart-panel input,
.moderncart-panel select,
.moderncart-panel textarea {
	font-family: var(--tsc-font-body);
}

.moderncart-panel .moderncart-slide-out-header-title {
	font-family: var(--tsc-font-display);
	font-weight: 600;
}

/* ============================================================
 * 3. CARTFLOWS / WOOCOMMERCE CHECKOUT
 * ============================================================
 * !important IS used here -- evidenced, not assumed. Live matched-rule
 * tracing found CartFlows' own checkout-template.css (v3.2.0) plus a
 * per-page INLINE <style> block explicitly re-declare
 * `font-family: Oswald, sans-serif` on checkout elements via unusually
 * specific, ID-anchored selectors, e.g.:
 *   .wcf-embed-checkout-form .woocommerce form #payment button
 *     (specificity 1 id + 2 classes + 2 elements)
 * This pattern repeats across every element category tested (buttons,
 * labels, inputs, headings) -- not a one-off. A body.woocommerce-checkout-
 * scoped override without !important was live-tested and lost to these
 * rules every time; even a body-level `!important` alone failed to reach
 * many descendants (labels, anchors, notices, select2 dropdown text, table
 * cells) despite normal CSS inheritance rules -- live-verified repeatedly,
 * cause not fully diagnosable from outside CartFlows' own generated CSS.
 * `body.woocommerce-checkout *` with !important was live-verified to
 * reliably reach every element tested (buttons, inputs, labels, anchors,
 * notices, select2, table cells) regardless of that mechanism. This is
 * still tightly scoped -- never leaves body.woocommerce-checkout, matches
 * the scope this task itself specified -- not a sitewide `body {}` rule.
 *
 * h3 (Contact / Billing details / Additional information / Payment /
 * Your order -- all 5 live-confirmed as bare <h3>, no distinguishing
 * class) gets Inter Display as the genuine major-heading treatment; its
 * higher selector specificity (body.woocommerce-checkout h3) naturally
 * wins over the broader `*` rule even though both are !important.
 *
 * Untouched by design: the existing black checkout-header inline-style fix
 * (a different property, background-color, on a different selector,
 * printed via tsc_checkout_inline_styles() in functions.php -- not part of
 * this file at all); any Stripe Elements/Link iframe content (cross-origin,
 * structurally unreachable by any CSS on this page); CartFlows' own
 * structure/markup; checkout colors, spacing, and layout.
 */
body.woocommerce-checkout,
body.woocommerce-checkout * {
	font-family: var(--tsc-font-body) !important;
}

body.woocommerce-checkout h3 {
	font-family: var(--tsc-font-display) !important;
	font-weight: 600;
}

/* ============================================================
 * 4. SINGLE-PRODUCT STICKY ADD-TO-CART BAR (Astra native feature)
 * ============================================================
 * Owner confirmed from local Astra source (astra/inc/compatibility/
 * woocommerce/class-astra-woocommerce.php,
 * single_product_sticky_add_to_cart()): this is Astra's own built-in
 * "Sticky Add to Cart" feature, printed on `wp_footer` -- a genuinely
 * separate, server-rendered element (not a JS clone of the main product
 * form; live-verified the two buttons are different DOM nodes). Because
 * it's printed on wp_footer, its parent is <body> directly, structurally
 * outside #content -- confirmed live -- which is why typography.css's
 * existing #content-scoped Inter rules already reach the *main* product
 * title/price/button (confirmed live, already Inter) but never reached
 * this bar.
 *
 * The product title and price are treated as functional/compact utility-
 * bar text (Inter), not a major heading -- same treatment already given to
 * ModernCart's cart-item product titles -- since this is a persistent
 * secondary strip, not a page-level statement.
 *
 * The button rule needs `button` in the selector (not just its two
 * classes): live-verified a near-tie against Astra's own dynamic
 * Customizer CSS (`.woocommerce button.button { font-family: inherit }`,
 * specificity 201) -- `.ast-sticky-add-to-cart .single_add_to_cart_button`
 * alone was 200 and lost by one point; adding the element selector brings
 * it to 202. No !important needed once specificity is actually higher.
 *
 * Quantity is not addressed here -- handled at the behavior level (see
 * inc/digital-store.php's woocommerce_is_sold_individually filter), which
 * this bar's markup already respects natively: it calls WooCommerce's own
 * woocommerce_template_single_add_to_cart() (confirmed in the same Astra
 * source), the identical core template function used by the main form, so
 * no separate CSS or hook is needed for its quantity control at all.
 */
.ast-sticky-add-to-cart-title {
	font-family: var(--tsc-font-body);
}

.ast-sticky-add-to-cart-action-price {
	font-family: var(--tsc-font-body);
}

.ast-sticky-add-to-cart button.single_add_to_cart_button {
	font-family: var(--tsc-font-body);
}
