/* Arabic Custom Styles for Metronic RTL */

/* Arabic Font Family */
body,
html {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* RTL Enhancements */
[dir="rtl"] {
    text-align: right;
}

/* Arabic Typography */
.fw-bold,
.fw-bolder {
    font-weight: 600 !important;
}

.fw-semibold {
    font-weight: 500 !important;
}

/* Menu Adjustments for Arabic */
.menu .menu-title {
    font-weight: 600;
}

.menu .menu-link {
    font-weight: 500;
}

/* Card Headers */
.card-header .card-title {
    font-weight: 600;
}

/* Buttons */
.btn {
    font-weight: 500;
}

/* Alerts */
.alert h4 {
    font-weight: 600;
}

/* Better spacing for Arabic text */
p,
span,
div {
    line-height: 1.8;
}

/* Sidebar Menu RTL Fix */
.aside-menu .menu-title {
    text-align: right;
}

/* Header Menu RTL Fix */
.header-menu .menu-title {
    text-align: right;
}

/* Form Labels */
label {
    font-weight: 500;
}

/* Table Headers */
th {
    font-weight: 600;
}

/* Breadcrumb */
.breadcrumb-item {
    font-weight: 500;
}

/* Dropdown Menu */
.dropdown-menu {
    text-align: right;
}

/* Badge */
.badge {
    font-weight: 500;
}

/* Toolbar */
.toolbar .page-title h1 {
    font-weight: 700;
}

/* User Menu */
.symbol-label {
    font-weight: 600;
}

/* Notice Box */
.notice {
    line-height: 1.8;
}

/* List Items */
ul li,
ol li {
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Separator */
.separator {
    margin: 1rem 0;
}

/* Card Body Spacing */
.card-body {
    line-height: 1.8;
}

/* Better number display in Arabic context */
.text-break {
    word-break: break-word;
}

/* Icon Spacing for RTL */
[dir="rtl"] .ki-duotone {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Button Icon Spacing */
[dir="rtl"] .btn i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Fix for menu icons */
.menu-icon {
    margin-left: 0.75rem;
    margin-right: 0;
}

/* Responsive Typography */
@media (max-width: 991.98px) {
    body {
        font-size: 0.95rem;
    }
}

/* Print Styles */
@media print {
    body {
        font-family: 'Cairo', Arial, sans-serif;
    }
}

/* Keen Icons Fallback - استخدام Font Awesome */
.ki-eye:before,
.ki-duotone.ki-eye:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f06e";
}

.ki-trash:before,
.ki-duotone.ki-trash:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f2ed";
}

.ki-pencil:before,
.ki-duotone.ki-pencil:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f303";
}

.ki-plus:before,
.ki-duotone.ki-plus:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f067";
}

.ki-check:before,
.ki-duotone.ki-check:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f00c";
}

.ki-cross:before,
.ki-duotone.ki-cross:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f00d";
}

.ki-arrow-right:before,
.ki-duotone.ki-arrow-right:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f061";
}

.ki-arrow-left:before,
.ki-duotone.ki-arrow-left:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f060";
}

.ki-search:before,
.ki-duotone.ki-search:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f002";
}

.ki-filter:before,
.ki-duotone.ki-filter:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f0b0";
}

.ki-download:before,
.ki-duotone.ki-download:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f019";
}

.ki-upload:before,
.ki-duotone.ki-upload:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f093";
}

.ki-refresh:before,
.ki-duotone.ki-refresh:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f021";
}

.ki-settings:before,
.ki-duotone.ki-settings:before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    content: "\f013";
}

/* إزالة الأيقونات الداخلية من ki-duotone */
.ki-duotone > span {
    display: none !important;
}

/* التأكد من أن الأيقونات تظهر بشكل صحيح */
[class*="ki-"]:before {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}
