/**
 * RTL-Specific Styles
 * This file loads only when body has dir="rtl" attribute
 * Contains all RTL font and typography overrides
 */

/* ===== RTL FONT OVERRIDES ===== */
/* Apply RTL font ONLY to elements with specific RTL classes */
/* No universal selectors - only class-based elements get RTL font */

/* ===== RTL TYPOGRAPHY CLASSES ===== */
/* These classes apply RTL font and sizes when RTL CSS is loaded */

/* RTL Menu Text - 18px */
.rtl-menu {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* RTL Title Text - 20px */
.rtl-title {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

/* RTL Label Text - 16px */
.rtl-label {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* RTL Body Text - 16px */
.rtl-body {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

/* RTL Small Text - 14px */
.rtl-small {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}

/* RTL Large Text - 18px */
.rtl-large {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* RTL Input/Form Elements - 16px */
.rtl-input {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

/* RTL Button Text - 16px */
.rtl-button {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
}

/* RTL Table Text - 16px */
.rtl-table {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

/* RTL Table Header - 16px */
.rtl-table-header {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

/* RTL Navigation Items - 18px */
.rtl-nav {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
}

/* RTL Card Title - 20px */
.rtl-card-title {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
}

/* RTL Card Text - 16px */
.rtl-card-text {
    font-family: 'Bahij Lotus', 'Segoe UI', Tahoma, Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

/* ===== RTL LAYOUT FIXES ===== */
/* RTL-specific layout adjustments */

/* Navigation alignment */
.navbar-vertical .nav-link {
    text-align: right !important;
}

.navbar-vertical .nav-link .nav-link-icon {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

.navbar-vertical .nav-link .nav-link-text {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

/* DataTables RTL alignment */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    text-align: right !important;
}

/* Table alignment */
.table th,
.table td {
    text-align: right !important;
}

/* Form elements alignment */
.form-control,
.form-select,
.form-check-label {
    text-align: right !important;
}

/* Labels alignment */
.form-label {
    text-align: right !important;
}

/* ===== RTL FONT LOADING OPTIMIZATION ===== */
/* Ensure smooth font loading */
body {
    font-display: swap;
}

/* Font loading indicator */
.font-loading {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.font-loaded {
    opacity: 1;
}
