/* ====================================
   Urdu Language Special Font Handling
   Applied only when locale is 'ur'
   ==================================== */

/* Import Noto Nastaliq Urdu from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:300,400,600,700&display=swap');

/* Apply Urdu font and RTL when html has urdu-mode class */
html.urdu-mode {
    direction: rtl;
}

html.urdu-mode body,
html.urdu-mode * {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Preserve icon fonts - prevent Urdu font from overriding icons */
html.urdu-mode .ti,
html.urdu-mode [class*="ti-"],
html.urdu-mode .fa,
html.urdu-mode .fas,
html.urdu-mode .far,
html.urdu-mode .fal,
html.urdu-mode .fad,
html.urdu-mode [data-feather] {
    font-family: 'tabler-icons', 'Font Awesome 6 Free', 'Font Awesome 6 Pro', 'Feather Icons', sans-serif !important;
}

/* Ensure proper line height for Urdu text */
html.urdu-mode p,
html.urdu-mode span,
html.urdu-mode div,
html.urdu-mode h1,
html.urdu-mode h2,
html.urdu-mode h3,
html.urdu-mode h4,
html.urdu-mode h5,
html.urdu-mode h6,
html.urdu-mode a,
html.urdu-mode button,
html.urdu-mode input,
html.urdu-mode textarea,
html.urdu-mode label {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
    line-height: 2.2 !important;
}

/* Specific adjustments for headings */
html.urdu-mode h1,
html.urdu-mode h2,
html.urdu-mode h3,
html.urdu-mode h4,
html.urdu-mode h5,
html.urdu-mode h6 {
    font-weight: 700 !important;
    line-height: 2.5 !important;
}

/* Button text styling */
html.urdu-mode button,
html.urdu-mode .btn,
html.urdu-mode a.btn {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Form elements */
html.urdu-mode input,
html.urdu-mode textarea,
html.urdu-mode select {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Table content */
html.urdu-mode table,
html.urdu-mode th,
html.urdu-mode td {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Card and panel content */
html.urdu-mode .card,
html.urdu-mode .card-body,
html.urdu-mode .panel,
html.urdu-mode .panel-body {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Navigation and menu items */
html.urdu-mode nav,
html.urdu-mode .navbar,
html.urdu-mode .nav-link,
html.urdu-mode .menu-item {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Modal content */
html.urdu-mode .modal,
html.urdu-mode .modal-content,
html.urdu-mode .modal-body {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Dropdown and list items */
html.urdu-mode .dropdown-menu,
html.urdu-mode .dropdown-item,
html.urdu-mode .list-group-item {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Form labels and help text */
html.urdu-mode label,
html.urdu-mode .form-label,
html.urdu-mode .form-text,
html.urdu-mode .help-block {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Alert and notification text */
html.urdu-mode .alert,
html.urdu-mode .toast,
html.urdu-mode .notification {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Breadcrumb */
html.urdu-mode .breadcrumb {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Footer */
html.urdu-mode footer,
html.urdu-mode .footer {
    font-family: 'Nunito', 'Jameel Noori Nastaleeq', 'Nafees Nastaleeq', 'Alvi Nastaleeq', sans-serif !important;
}

/* Ensure proper text alignment for Urdu */
html.urdu-mode {
    text-align: right;
}

/* Override any LTR-specific styles for Urdu */
html.urdu-mode .text-start,
html.urdu-mode .text-left {
    text-align: right !important;
}

/* Preserve LTR for specific elements like phone numbers, emails, etc. */
html.urdu-mode .phone-number,
html.urdu-mode .email,
html.urdu-mode [dir="ltr"],
html.urdu-mode input[type="tel"],
html.urdu-mode input[type="email"],
html.urdu-mode input[type="url"] {
    direction: ltr !important;
    text-align: left !important;
    font-family: 'Nunito', sans-serif !important;
}
i, svg {
    direction: ltr;
}