/* 
 * ملف CSS احتياطي للأيقونات
 * يستخدم عندما لا يتم تحميل Font Awesome بشكل صحيح
 */

/* تعريف fallback للأيقونات الأساسية */
.fas, .far, .fab, .fa {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands", sans-serif;
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    display: inline-block;
}

/* في حالة عدم تحميل Font Awesome، نعرض نص بديل محسن */
.fa-chart-line:before { content: "�"; }
.fa-file-invoice:before { content: "�"; }
.fa-check-circle:before { content: "✅"; }
.fa-clock:before { content: "⏱️"; }
.fa-users:before { content: "👥"; }
.fa-percentage:before { content: "📊"; }
.fa-external-link-alt:before { content: "🔗"; }
.fa-calendar-alt:before { content: "📅"; }
.fa-dollar-sign:before { content: "💰"; }
.fa-arrow-up:before { content: "📈"; }
.fa-arrow-down:before { content: "📉"; }
.fa-equals:before { content: "⚖️"; }
.fa-refresh:before { content: "🔄"; }
.fa-download:before { content: "📥"; }
.fa-print:before { content: "🖨️"; }
.fa-calculator:before { content: "🧮"; }
.fa-list-alt:before { content: "📋"; }
.fa-plus-circle:before { content: "➕"; }
.fa-chart-bar:before { content: "📊"; }
.fa-lock:before { content: "🔒"; }
.fa-inbox:before { content: "📥"; }
.fa-folder-open:before { content: "📁"; }
.fa-chevron-down:before { content: "⬇️"; }
.fa-file-alt:before { content: "📄"; }
.fa-eye:before { content: "👁️"; }
.fa-edit:before { content: "✏️"; }
.fa-coins:before { content: "🪙"; }
.fa-info-circle:before { content: "ℹ️"; }
.fa-file-pdf:before { content: "📄"; }

/* تحسينات للأيقونات البديلة */
.fas:before, .far:before, .fab:before, .fa:before {
    font-size: 1em;
    vertical-align: middle;
}

/* إذا تم تحميل Font Awesome بنجاح، نخفي الأيقونات البديلة */
@supports (font-family: "Font Awesome 5 Free") {
    .fa-chart-line:before,
    .fa-file-invoice:before,
    .fa-check-circle:before,
    .fa-clock:before,
    .fa-users:before,
    .fa-percentage:before,
    .fa-external-link-alt:before,
    .fa-calendar-alt:before,
    .fa-dollar-sign:before,
    .fa-arrow-up:before,
    .fa-arrow-down:before,
    .fa-equals:before,
    .fa-refresh:before,
    .fa-download:before,
    .fa-print:before,
    .fa-calculator:before,
    .fa-list-alt:before,
    .fa-plus-circle:before,
    .fa-chart-bar:before,
    .fa-lock:before,
    .fa-inbox:before,
    .fa-folder-open:before,
    .fa-chevron-down:before,
    .fa-file-alt:before,
    .fa-eye:before,
    .fa-edit:before,
    .fa-coins:before,
    .fa-info-circle:before,
    .fa-file-pdf:before {
        content: initial;
    }
}

/* CSS لضمان عرض الأيقونات في حالة عدم وجود اتصال بالإنترنت */
.dmp-icon-fallback {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    text-align: center;
    line-height: 1;
    font-size: 1.2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: normal !important;
    vertical-align: middle;
}

/* تحسين عرض الأيقونات في بطاقات الإحصائيات */
.dmp-stat-icon-modern i:before,
.dmp-stat-icon i:before {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

/* أنماط للحاوي عندما Font Awesome غير متوفر */
.dmp-fontawesome-fallback .fas,
.dmp-fontawesome-fallback .far,
.dmp-fontawesome-fallback .fab,
.dmp-fontawesome-fallback .fa {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-weight: normal !important;
}

/* تأكيد عرض الأيقونات في الحالة العادية */
.dmp-stat-icon-modern,
.dmp-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dmp-stat-icon-modern i,
.dmp-stat-icon i {
    font-size: inherit;
    line-height: 1;
}

/* معالجة خاصة للمربعات الفارغة */
i[class*="fa-"]:empty:after {
    content: "◊";
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-style: normal;
    font-weight: normal;
    opacity: 0.5;
}

/* إخفاء المعالجة إذا كان هناك محتوى */
i[class*="fa-"]:not(:empty):after {
    content: none;
}
