/*
 * Make a store block's own Typography and Color settings reach StoreEngine's
 * markup inside it (ported from Academy LMS's blocks/typography.css).
 *
 * The cart, checkout, order and account templates set their own font sizes
 * and colours on inner elements, so a size or colour set on the block only
 * changed the wrapper. When one is set, the parts inside follow it; headings
 * keep their proportions.
 *
 * No !important: `:not(#storeengine-specificity)` matches every element and
 * only adds ID-level weight, so these rules outrank StoreEngine's class-based
 * rules while a theme or a block's own custom CSS can still win with an ID.
 * Buttons are styled separately (Native::button_styles()).
 */

/* Font size. */
:is(.wp-block-storeengine-cart-totals, .wp-block-storeengine-coupon-form, .wp-block-storeengine-mini-cart, .wp-block-storeengine-checkout-form, .wp-block-storeengine-checkout-contact, .wp-block-storeengine-checkout-billing, .wp-block-storeengine-checkout-shipping, .wp-block-storeengine-payment-methods, .wp-block-storeengine-order-summary, .wp-block-storeengine-order-confirmation, .wp-block-storeengine-order-details, .wp-block-storeengine-login-form, .wp-block-storeengine-dashboard):not(#storeengine-specificity):is([class*="-font-size"], [style*="font-size:"]) :where(p, li, ul, ol, dl, span, a, label, legend, fieldset, form, section, nav, div, table, thead, tbody, tfoot, tr, td, th, dt, dd, time, strong, em, b, small, button, input, select, textarea, caption):not(.storeengine-icon, [class*="storeengine-icon--"]) {
	font-size: inherit;
}

:is(.wp-block-storeengine-cart-totals, .wp-block-storeengine-coupon-form, .wp-block-storeengine-mini-cart, .wp-block-storeengine-checkout-form, .wp-block-storeengine-checkout-contact, .wp-block-storeengine-checkout-billing, .wp-block-storeengine-checkout-shipping, .wp-block-storeengine-payment-methods, .wp-block-storeengine-order-summary, .wp-block-storeengine-order-confirmation, .wp-block-storeengine-order-details, .wp-block-storeengine-login-form, .wp-block-storeengine-dashboard):not(#storeengine-specificity):is([class*="-font-size"], [style*="font-size:"]) :where(h1) { font-size: 2em; }
:is(.wp-block-storeengine-cart-totals, .wp-block-storeengine-coupon-form, .wp-block-storeengine-mini-cart, .wp-block-storeengine-checkout-form, .wp-block-storeengine-checkout-contact, .wp-block-storeengine-checkout-billing, .wp-block-storeengine-checkout-shipping, .wp-block-storeengine-payment-methods, .wp-block-storeengine-order-summary, .wp-block-storeengine-order-confirmation, .wp-block-storeengine-order-details, .wp-block-storeengine-login-form, .wp-block-storeengine-dashboard):not(#storeengine-specificity):is([class*="-font-size"], [style*="font-size:"]) :where(h2) { font-size: 1.5em; }
:is(.wp-block-storeengine-cart-totals, .wp-block-storeengine-coupon-form, .wp-block-storeengine-mini-cart, .wp-block-storeengine-checkout-form, .wp-block-storeengine-checkout-contact, .wp-block-storeengine-checkout-billing, .wp-block-storeengine-checkout-shipping, .wp-block-storeengine-payment-methods, .wp-block-storeengine-order-summary, .wp-block-storeengine-order-confirmation, .wp-block-storeengine-order-details, .wp-block-storeengine-login-form, .wp-block-storeengine-dashboard):not(#storeengine-specificity):is([class*="-font-size"], [style*="font-size:"]) :where(h3) { font-size: 1.25em; }
:is(.wp-block-storeengine-cart-totals, .wp-block-storeengine-coupon-form, .wp-block-storeengine-mini-cart, .wp-block-storeengine-checkout-form, .wp-block-storeengine-checkout-contact, .wp-block-storeengine-checkout-billing, .wp-block-storeengine-checkout-shipping, .wp-block-storeengine-payment-methods, .wp-block-storeengine-order-summary, .wp-block-storeengine-order-confirmation, .wp-block-storeengine-order-details, .wp-block-storeengine-login-form, .wp-block-storeengine-dashboard):not(#storeengine-specificity):is([class*="-font-size"], [style*="font-size:"]) :where(h4) { font-size: 1.1em; }
:is(.wp-block-storeengine-cart-totals, .wp-block-storeengine-coupon-form, .wp-block-storeengine-mini-cart, .wp-block-storeengine-checkout-form, .wp-block-storeengine-checkout-contact, .wp-block-storeengine-checkout-billing, .wp-block-storeengine-checkout-shipping, .wp-block-storeengine-payment-methods, .wp-block-storeengine-order-summary, .wp-block-storeengine-order-confirmation, .wp-block-storeengine-order-details, .wp-block-storeengine-login-form, .wp-block-storeengine-dashboard):not(#storeengine-specificity):is([class*="-font-size"], [style*="font-size:"]) :where(h5, h6) { font-size: 1em; }

/* Line height. */
:is(.wp-block-storeengine-cart-totals, .wp-block-storeengine-coupon-form, .wp-block-storeengine-mini-cart, .wp-block-storeengine-checkout-form, .wp-block-storeengine-checkout-contact, .wp-block-storeengine-checkout-billing, .wp-block-storeengine-checkout-shipping, .wp-block-storeengine-payment-methods, .wp-block-storeengine-order-summary, .wp-block-storeengine-order-confirmation, .wp-block-storeengine-order-details, .wp-block-storeengine-login-form, .wp-block-storeengine-dashboard):not(#storeengine-specificity)[style*="line-height:"] :where(p, li, ul, ol, span, a, label, legend, div, table, tr, td, th, dt, dd, time, strong, em, b, small, button, h1, h2, h3, h4, h5, h6) {
	line-height: inherit;
}

/* Text colour: text, headings, labels and tables take the block's colour. */
:is(.wp-block-storeengine-cart-totals, .wp-block-storeengine-coupon-form, .wp-block-storeengine-mini-cart, .wp-block-storeengine-checkout-form, .wp-block-storeengine-checkout-contact, .wp-block-storeengine-checkout-billing, .wp-block-storeengine-checkout-shipping, .wp-block-storeengine-payment-methods, .wp-block-storeengine-order-summary, .wp-block-storeengine-order-confirmation, .wp-block-storeengine-order-details, .wp-block-storeengine-login-form, .wp-block-storeengine-dashboard):not(#storeengine-specificity).has-text-color :where(h1, h2, h3, h4, h5, h6, p, li, span, label, legend, th, td, dt, dd, small, strong, em, b, time, caption) {
	color: inherit;
}

/* Link colour from the block's Color panel (Native::colors_style()). */
:is(.wp-block-storeengine-cart-totals, .wp-block-storeengine-coupon-form, .wp-block-storeengine-mini-cart, .wp-block-storeengine-checkout-form, .wp-block-storeengine-checkout-contact, .wp-block-storeengine-checkout-billing, .wp-block-storeengine-checkout-shipping, .wp-block-storeengine-payment-methods, .wp-block-storeengine-order-summary, .wp-block-storeengine-order-confirmation, .wp-block-storeengine-order-details, .wp-block-storeengine-login-form, .wp-block-storeengine-dashboard):not(#storeengine-specificity)[style*="--storeengine-link-color"] a:not(.storeengine-btn, [class*="button"], .wp-element-button) {
	color: var(--storeengine-link-color);
}
