/* WooCheck typography foundation.
 *
 * The exact uploaded font is injected at runtime with @font-face. WooCheck keeps
 * the Vazir family first in every fallback stack and exposes context-specific
 * CSS custom properties for Cart / Checkout / Thank You / OTP.
 */
:root{
  --woocheck-font:"Vazir","Vazirmatn",Tahoma,"Segoe UI",Arial,sans-serif;
  --woocheck-font-checkout:var(--woocheck-font);
  --woocheck-font-cart:var(--woocheck-font);
  --woocheck-font-thankyou:var(--woocheck-font);
  --woocheck-font-otp:var(--woocheck-font);
  --woocheck-admin-font:var(--woocheck-font);
}

/* Admin: WooCheck owns its typography without affecting the rest of wp-admin. */
body.woocheck-admin-page .woocheck-admin,
body.woocheck-admin-page .woocheck-admin input,
body.woocheck-admin-page .woocheck-admin select,
body.woocheck-admin-page .woocheck-admin textarea,
body.woocheck-admin-page .woocheck-admin button,
body.woocheck-admin-page .woocheck-admin .button,
body.woocheck-admin-page .woocheck-admin table,
body.woocheck-admin-page .woocheck-admin code,
body.woocheck-admin-page .woocheck-admin kbd,
body.woocheck-admin-page .woocheck-admin .select2-container,
body.woocheck-admin-page .select2-container,
body.woocheck-admin-page .select2-dropdown,
body.woocheck-admin-page .select2-results,
body.woocheck-admin-page .select2-search__field{
  font-family:var(--woocheck-admin-font,"Vazir","Vazirmatn",Tahoma,Arial,sans-serif)!important;
}

/* Preserve WordPress icon glyphs. */
body.woocheck-admin-page .woocheck-admin .dashicons,
body.woocheck-admin-page .woocheck-admin .dashicons-before:before,
body.woocheck-admin-page .woocheck-admin [class^="dashicons-"],
body.woocheck-admin-page .woocheck-admin [class*=" dashicons-"]{
  font-family:dashicons!important;
}

/* Global frontend fallback. */
body.woocheck-takeover,
#woocheck-app,
.woocheck-toast-stack,
.woocheck-custom-sections,
.woocheck-bumps{
  font-family:var(--woocheck-font,"Vazir","Vazirmatn",Tahoma,Arial,sans-serif)!important;
}

/* Checkout can use its own uploaded font. */
body.woocheck-checkout-active:not(.woocheck-thankyou-active),
body.woocheck-takeover-checkout:not(.woocheck-thankyou-active),
body.woocheck-checkout-active:not(.woocheck-thankyou-active) #woocheck-app,
body.woocheck-takeover-checkout:not(.woocheck-thankyou-active) #woocheck-app{
  font-family:var(--woocheck-font-checkout,var(--woocheck-font))!important;
}

body.woocheck-checkout-active:not(.woocheck-thankyou-active) :where(input,select,textarea,button,.button,.select2-container,.select2-dropdown,.select2-results),
body.woocheck-takeover-checkout:not(.woocheck-thankyou-active) :where(input,select,textarea,button,.button,.select2-container,.select2-dropdown,.select2-results){
  font-family:var(--woocheck-font-checkout,var(--woocheck-font))!important;
}

/* Cart page + cart drawer. */
body.woocheck-cart-active,
body.woocheck-cart-active #woocheck-app,
body.woocheck-cart-active .woocommerce,
body.woocheck-cart-active :where(input,select,textarea,button,.button,.select2-container,.select2-dropdown,.select2-results),
body.woocheck-takeover-cart,
body.woocheck-takeover-cart #woocheck-app,
.woocheck-cart-drawer,
.woocheck-cart-drawer :where(input,select,textarea,button,.button){
  font-family:var(--woocheck-font-cart,var(--woocheck-font))!important;
}

/* Thank-you page wins over the generic checkout route class. */
body.woocheck-thankyou-active,
body.woocheck-thankyou-active #woocheck-app,
body.woocheck-thankyou-active .woocheck-thankyou,
body.woocheck-thankyou-active :where(input,select,textarea,button,.button,.select2-container,.select2-dropdown,.select2-results){
  font-family:var(--woocheck-font-thankyou,var(--woocheck-font))!important;
}

/* Forward-compatible OTP/login selectors. */
.woocheck-otp,
.woocheck-otp-login,
[data-woocheck-otp],
.woocheck-otp :where(input,select,textarea,button,.button),
.woocheck-otp-login :where(input,select,textarea,button,.button),
[data-woocheck-otp] :where(input,select,textarea,button,.button){
  font-family:var(--woocheck-font-otp,var(--woocheck-font))!important;
}

/* Generic WooCheck controls not covered above. */
#woocheck-app input,
#woocheck-app select,
#woocheck-app textarea,
#woocheck-app button,
#woocheck-app .button,
.woocheck-toast,
.woocheck-select2,
.select2-container.woocheck-select2{
  font-family:inherit!important;
}
