/* فونت webi برای Perfex CRM */
@font-face {
    font-family: 'webi';
    src: url('../fonts/webi.eot');
    src: url('../fonts/webi.eot?#iefix') format('embedded-opentype'),
         url('../fonts/webi.woff2') format('woff2'),
         url('../fonts/webi.woff') format('woff'),
         url('../fonts/webi.ttf') format('truetype'),
         url('../fonts/webi.svg#webi') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* اعمال فونت webi به تمامی عناصر به جز آیکون‌ها */
body,
html {
    font-family: 'webi', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* اعمال فونت webi به عناصر خاص (به جز آیکون‌ها) */
*:not([class*="fa-"]):not([class*="icon-"]):not([class*="glyphicon-"]):not([class*="fc-icon"]):not(i[class]):not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not(.fa-regular):not(.fa-solid):not(.fa-light):not(.fa-thin):not(.fa-duotone):not(.fa-brands) {
    font-family: 'webi', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* حفظ فونت پیش‌فرض برای آیکون‌ها */
[class*="fa-"],
[class*="icon-"],
[class*="glyphicon-"],
[class*="fc-icon"],
i[class*="fa"],
.fa,
.fas,
.far,
.fal,
.fab,
.fa-regular,
.fa-solid,
.fa-light,
.fa-thin,
.fa-duotone,
.fa-brands,
.glyphicon {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Brands", "FontAwesome", "Glyphicons Halflings" !important;
}

/* حفظ فونت اختصاصی برای آیکون‌های FullCalendar */
[class*="fc-icon"],
.fc-icon {
    font-family: "fcicons" !important;
    font-weight: normal !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* تنظیم font-weight برای انواع مختلف آیکون‌ها */
.fas,
.fa-solid {
    font-weight: 900 !important;
}

.far,
.fa-regular {
    font-weight: 400 !important;
}

.fal,
.fa-light {
    font-weight: 300 !important;
}

.fat,
.fa-thin {
    font-weight: 100 !important;
}

.fab,
.fa-brands {
    font-weight: 400 !important;
}

/* تنظیمات خاص برای عناصر مختلف (به جز آیکون‌ها) */
.navbar:not([class*="fa-"]):not([class*="fc-icon"]),
.sidebar:not([class*="fa-"]):not([class*="fc-icon"]),
.panel:not([class*="fa-"]):not([class*="fc-icon"]),
.widget:not([class*="fa-"]):not([class*="fc-icon"]),
.form-control:not([class*="fa-"]):not([class*="fc-icon"]),
.btn:not([class*="fa-"]):not([class*="fc-icon"]),
.table:not([class*="fa-"]):not([class*="fc-icon"]),
.modal:not([class*="fa-"]):not([class*="fc-icon"]),
.dropdown-menu:not([class*="fa-"]):not([class*="fc-icon"]),
.nav:not([class*="fa-"]):not([class*="fc-icon"]),
.breadcrumb:not([class*="fa-"]):not([class*="fc-icon"]),
.alert:not([class*="fa-"]):not([class*="fc-icon"]),
.badge:not([class*="fa-"]):not([class*="fc-icon"]),
.label:not([class*="fa-"]):not([class*="fc-icon"]),
input:not([class*="fa-"]):not([class*="fc-icon"]),
textarea:not([class*="fa-"]):not([class*="fc-icon"]),
select:not([class*="fa-"]):not([class*="fc-icon"]),
option:not([class*="fa-"]):not([class*="fc-icon"]) {
    font-family: 'webi', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* اطمینان از عدم تداخل با آیکون‌های داخل عناصر */
.navbar [class*="fa-"],
.sidebar [class*="fa-"],
.panel [class*="fa-"],
.widget [class*="fa-"],
.btn [class*="fa-"],
.dropdown-menu [class*="fa-"],
.nav [class*="fa-"],
.breadcrumb [class*="fa-"],
.alert [class*="fa-"],
.badge [class*="fa-"],
.label [class*="fa-"],
.navbar .fa-regular,
.sidebar .fa-regular,
.panel .fa-regular,
.widget .fa-regular,
.btn .fa-regular,
.dropdown-menu .fa-regular,
.nav .fa-regular,
.breadcrumb .fa-regular,
.alert .fa-regular,
.badge .fa-regular,
.label .fa-regular {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Brands", "FontAwesome" !important;
}

/* تنظیم font-weight برای آیکون‌های داخل عناصر */
.navbar .fa-regular,
.sidebar .fa-regular,
.panel .fa-regular,
.widget .fa-regular,
.btn .fa-regular,
.dropdown-menu .fa-regular,
.nav .fa-regular {
    font-weight: 400 !important;
}

.navbar .fa-solid,
.sidebar .fa-solid,
.panel .fa-solid,
.widget .fa-solid,
.btn .fa-solid,
.dropdown-menu .fa-solid,
.nav .fa-solid {
    font-weight: 900 !important;
}

/* حفظ آیکون‌های FullCalendar در تمامی عناصر */
.fc [class*="fc-icon"],
.fc-toolbar [class*="fc-icon"],
.fc-button [class*="fc-icon"],
.fc-header [class*="fc-icon"],
.fc-daygrid [class*="fc-icon"],
.fc-timegrid [class*="fc-icon"] {
    font-family: "fcicons" !important;
    font-weight: normal !important;
}

/* تنظیمات خاص برای متن‌های فارسی */
[lang="fa"],
.persian-text,
.rtl {
    font-family: 'webi', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    direction: rtl;
    text-align: right;
}

/* بهبود خوانایی فونت */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
