@import url("../../IranSans/css/fontiran.css");

/* === Global IranSans enforcement === */
:root {
	--font-base: "IranSans", "IRANSans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

html, body,
.wp-site-blocks, .site, .site-content, .entry-content,
.wp-block, .wp-block-group, .wp-block-post-content,
button, input, select, textarea,
.widget, .menu, nav, .breadcrumb,
.woocommerce, .wc-block-components, .elementor, .elementor-widget,
[class*="gf_"], .wpcf7, .contact-form, .form-control,
table, th, td, p, li, span, a, div {
	font-family: var(--font-base) !important;
}

/* Preserve monospace */
code, pre, kbd, samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

/* Do not break icon fonts */
[class*="fa-"], .fa, .dashicons,
[class*="icon"], .material-icons, .bi::before, .icm, .icomoon {
	font-family: inherit !important;
	font-style: normal;
	font-weight: normal;
}

/* Headings inherit */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-base) !important;
	font-weight: inherit;
}

/* Common block/UI fixes */
.wp-element-button, .wp-block-button__link,
.wp-block-navigation, .wp-block-query, .wp-block-post-title,
.editor-styles-wrapper, .interface-interface-skeleton__content {
	font-family: var(--font-base) !important;
}

/* === Zento Theme Specific Overrides === */

/* Override CSS Custom Properties */
:root {
	--epcl-font-family: var(--font-base) !important;
	--epcl-title-font-family: var(--font-base) !important;
}

/* Override variable usage throughout theme */
body,
.block-editor-block-list__layout,
.editor-block-list__layout {
	font-family: var(--font-base) !important;
}

/* Target specific theme selectors that use title fonts */
.title, .widget-title, .entry-title,
.post-title, .page-title, .archive-title,
.comment-author, .author-name,
.wp-block-quote cite, .wp-block-quote__citation,
blockquote cite, blockquote__citation,
.wp-block-pullquote cite, .wp-block-pullquote__citation,
.wp-block-comments__comment-meta,
.wp-block-latest-comments__comment-meta,
.has-drop-cap:not(:focus):first-letter,
.editor-post-title__input,
.editor-post-title__block .editor-post-title__input,
table th {
	font-family: var(--font-base) !important;
}

/* Forms and inputs */
input[type="text"], input[type="email"], input[type="url"],
input[type="password"], input[type="search"], input[type="tel"],
input[type="number"], textarea, select,
.wp-block-search__input, .wp-block-search__button,
.wpcf7 input, .wpcf7 textarea, .wpcf7 select,
.contact-form-7 input, .contact-form-7 textarea {
	font-family: var(--font-base) !important;
}

/* Buttons */
button, .button, .btn,
.wp-element-button, .wp-block-button__link,
input[type="submit"], input[type="button"],
.wpcf7 input[type="submit"] {
	font-family: var(--font-base) !important;
}

/* Navigation */
.main-navigation, .primary-navigation, .secondary-navigation,
.wp-block-navigation, .nav-menu, .menu,
.site-header .navigation, .header-navigation {
	font-family: var(--font-base) !important;
}

/* Widgets */
.widget, .widget-title, .widget-content,
.sidebar .widget, .footer .widget,
aside .widget, aside .widget-title {
	font-family: var(--font-base) !important;
}

/* Footer specific */
#footer, #footer .widget, #footer .widget-title,
#footer .title, footer, .site-footer {
	font-family: var(--font-base) !important;
}

/* Meta information */
.meta, .post-meta, .entry-meta,
.comment-metadata, .comment-meta,
.byline, .posted-on, .author, .category-links {
	font-family: var(--font-base) !important;
}

/* WooCommerce specific overrides */
.woocommerce, .woocommerce-page,
.wc-block-components-button,
.wc-block-cart__submit-container,
.woocommerce .button, .woocommerce button,
.woocommerce input, .woocommerce select, .woocommerce textarea {
	font-family: var(--font-base) !important;
}

/* Gutenberg Editor specific */
.editor-styles-wrapper,
.editor-styles-wrapper .editor-block-list__layout,
.editor-styles-wrapper h1, .editor-styles-wrapper h2,
.editor-styles-wrapper h3, .editor-styles-wrapper h4,
.editor-styles-wrapper h5, .editor-styles-wrapper h6,
.block-editor-block-list__layout,
.block-editor-block-list__layout h1,
.block-editor-block-list__layout h2,
.block-editor-block-list__layout h3,
.block-editor-block-list__layout h4,
.block-editor-block-list__layout h5,
.block-editor-block-list__layout h6 {
	font-family: var(--font-base) !important;
}

/* Override any remaining variable-based declarations */
*[style*="font-family: var(--epcl-font-family)"],
*[style*="font-family: var(--epcl-title-font-family)"] {
	font-family: var(--font-base) !important;
}

/* High specificity overrides for stubborn elements */
html body *:not(code):not(pre):not(kbd):not(samp):not([class*="fa-"]):not(.fa):not(.dashicons):not([class*="icon"]):not(.material-icons):not(.icomoon) {
	font-family: var(--font-base) !important;
}

/* Additional plugin compatibility */
.elementor *, .elementor-widget *,
.contact-form-7 *, .wpcf7 *,
.gform_wrapper *, [class*="gf_"] * {
	font-family: var(--font-base) !important;
}

/* Exception for icon fonts in plugins */
.elementor [class*="fa-"], .elementor .fa,
.wpcf7 [class*="fa-"], .wpcf7 .fa,
.gform_wrapper [class*="fa-"], .gform_wrapper .fa {
	font-family: inherit !important;
}