@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

@font-face {
    font-family: 'Estedad';
    src: url('../fonts/Estedad/Estedad-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

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

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

:root {
    --dashboard-font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

html[data-font='vazirmatn'] {
    --dashboard-font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

html[data-font='estedad'] {
    --dashboard-font-family: 'Estedad', 'Vazirmatn', Tahoma, Arial, sans-serif;
}

@font-face {
    font-family: 'DanaFaNum';
    src: url('../fonts/DanaFaNum/DanaFaNum-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

@font-face {
    font-family: 'IRANSansWebFaNum';
    src: url('../fonts/IRANSansWebFaNum/IRANSansWebFaNum_Light.woff2') format('woff2');
    font-weight: 300 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansWebFaNum';
    src: url('../fonts/IRANSansWebFaNum/IRANSansWebFaNum_Bold.woff2') format('woff2');
    font-weight: 500 700;
    font-style: normal;
    font-display: swap;
}

html[data-font='danafanum'] {
    --dashboard-font-family: 'DanaFaNum', 'Vazirmatn', Tahoma, Arial, sans-serif;
}

html[data-font='iransansfanum'] {
    --dashboard-font-family: 'IRANSansWebFaNum', 'Vazirmatn', Tahoma, Arial, sans-serif;
}

/* Persian digits in RTL pages (see dashboard-main.css). */
@font-face {
    font-family: 'FaDigits';
    src: url('../fonts/IRANSansWebFaNum/IRANSansWebFaNum_Light.woff2') format('woff2');
    font-weight: 100 550;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0030-0039;
}

@font-face {
    font-family: 'FaDigits';
    src: url('../fonts/IRANSansWebFaNum/IRANSansWebFaNum_Bold.woff2') format('woff2');
    font-weight: 551 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0030-0039;
}

html[dir='rtl']:not([data-font]),
html[dir='rtl'][data-font='vazirmatn'] {
    --dashboard-font-family: 'FaDigits', 'Vazirmatn', Tahoma, Arial, sans-serif;
}

html[dir='rtl'][data-font='estedad'] {
    --dashboard-font-family: 'FaDigits', 'Estedad', 'Vazirmatn', Tahoma, Arial, sans-serif;
}

html[dir='rtl'] {
    --pt-display: 'FaDigits', 'YekanBakh', 'Vazirmatn', Tahoma, sans-serif;
    --ui-font-display: 'FaDigits', 'YekanBakh', var(--dashboard-font-family, 'Vazirmatn'), Tahoma, sans-serif;
}

html,
body,
button,
input,
select,
textarea,
.dropdown-menu,
.select2-container,
.select2-dropdown {
    font-family: var(--dashboard-font-family);
}

body {
    direction: rtl;
    text-align: right;
}

.font-option-help {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .75rem;
}

.font-option-help-item {
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: .75rem;
    padding: .85rem 1rem;
    background: rgba(255, 255, 255, .04);
}

.font-option-help-item strong {
    display: block;
    margin-bottom: .25rem;
}

.font-option-help-item span {
    color: var(--bs-secondary-color, #6c757d);
    font-size: .85rem;
}

.font-option-help-item[data-font-preview='estedad'] {
    font-family: 'Estedad', 'Vazirmatn', Tahoma, Arial, sans-serif;
}

.font-option-help-item[data-font-preview='vazirmatn'] {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

