/* IranSans XFaNum Fonts */
@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/iransans/IRANSansXFaNum-Regular.woff2') format('woff2'),
         url('../fonts/iransans/IranianSans.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/iransans/IRANSansXFaNum-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/iransans/IRANSansXFaNum-UltraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/iransans/IRANSansXFaNum-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/iransans/IRANSansXFaNum-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/iransans/IRANSansXFaNum-DemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/iransans/IRANSansXFaNum-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/iransans/IRANSansXFaNum-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/iransans/IRANSansXFaNum-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* YekanBakh Fonts */
@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanbakh/YekanBakhFaNum-Regular.woff2') format('woff2'),
         url('../fonts/yekanbakh/Yekan.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanbakh/YekanBakhFaNum-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanbakh/YekanBakhFaNum-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanbakh/YekanBakhFaNum-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanbakh/YekanBakhFaNum-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanbakh/YekanBakhFaNum-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanbakh/YekanBakhFaNum-ExtraBlack.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Apply IranSans to all elements with YekanBakh as fallback */
* {
    font-family: 'IRANSans', 'YekanBakh', 'Tahoma', 'Arial', sans-serif !important;
    font-variant-numeric: normal !important;
    font-feature-settings: normal !important;
}

/* Ensure numbers use the same font and size */
input, select, textarea, button {
    font-family: 'IRANSans', 'YekanBakh', 'Tahoma', 'Arial', sans-serif !important;
    font-variant-numeric: normal !important;
    font-feature-settings: normal !important;
}

/* Specific MudBlazor components */
.mud-typography,
.mud-button,
.mud-text-field,
.mud-select,
.mud-table,
.mud-nav-menu,
.mud-app-bar,
.mud-drawer,
.mud-card,
.mud-paper,
.mud-chip,
.mud-alert,
.mud-dialog,
.mud-snackbar,
.mud-input,
.mud-input-control,
.mud-select-input {
    font-family: 'IRANSans', 'YekanBakh', 'Tahoma', 'Arial', sans-serif !important;
    font-variant-numeric: normal !important;
    font-feature-settings: normal !important;
}

/* YekanBakh specific classes for different use cases */
.font-yekan {
    font-family: 'YekanBakh', 'IRANSans', 'Tahoma', 'Arial', sans-serif !important;
}

.font-iransans {
    font-family: 'IRANSans', 'YekanBakh', 'Tahoma', 'Arial', sans-serif !important;
}

/* Fix RTL text alignment */
.mud-table th,
.mud-table td {
    text-align: right !important;
}

.mud-nav-menu .mud-nav-link {
    text-align: right !important;
}

.mud-text-field .mud-input-control {
    text-align: right !important;
}

.mud-select .mud-input-control {
    text-align: right !important;
}
