/* RTL Icons Override - Final Fix for Icon Display Issues */

/* High specificity rules to ensure icons display correctly in RTL */
html[dir="rtl"] .la,
html[dir="rtl"] .las,
html[dir="rtl"] .lab,
html[dir="rtl"] [class^="la-"],
html[dir="rtl"] [class*=" la-"],
body[dir="rtl"] .la,
body[dir="rtl"] .las,
body[dir="rtl"] .lab,
body[dir="rtl"] [class^="la-"],
body[dir="rtl"] [class*=" la-"] {
    font-family: "Line Awesome Free", "Line Awesome Brands", "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    speak: none !important;
}

/* Ensure pseudo-elements use icon fonts */
html[dir="rtl"] .la:before,
html[dir="rtl"] .las:before,
html[dir="rtl"] .lab:before,
html[dir="rtl"] [class^="la-"]:before,
html[dir="rtl"] [class*=" la-"]:before,
body[dir="rtl"] .la:before,
body[dir="rtl"] .las:before,
body[dir="rtl"] .lab:before,
body[dir="rtl"] [class^="la-"]:before,
body[dir="rtl"] [class*=" la-"]:before {
    font-family: "Line Awesome Free", "Line Awesome Brands", "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    speak: none !important;
}

/* Override any inherited font-family from parent elements */
[dir="rtl"] * .la,
[dir="rtl"] * .las,
[dir="rtl"] * .lab,
[dir="rtl"] * [class^="la-"],
[dir="rtl"] * [class*=" la-"] {
    font-family: "Line Awesome Free", "Line Awesome Brands" !important;
}

/* Specific overrides for common containers */
[dir="rtl"] .btn .la,
[dir="rtl"] .btn .las,
[dir="rtl"] .btn .lab,
[dir="rtl"] .btn [class^="la-"],
[dir="rtl"] .btn [class*=" la-"],
[dir="rtl"] .nav .la,
[dir="rtl"] .nav .las,
[dir="rtl"] .nav .lab,
[dir="rtl"] .nav [class^="la-"],
[dir="rtl"] .nav [class*=" la-"],
[dir="rtl"] .navbar .la,
[dir="rtl"] .navbar .las,
[dir="rtl"] .navbar .lab,
[dir="rtl"] .navbar [class^="la-"],
[dir="rtl"] .navbar [class*=" la-"],
[dir="rtl"] .dropdown .la,
[dir="rtl"] .dropdown .las,
[dir="rtl"] .dropdown .lab,
[dir="rtl"] .dropdown [class^="la-"],
[dir="rtl"] .dropdown [class*=" la-"],
[dir="rtl"] .card .la,
[dir="rtl"] .card .las,
[dir="rtl"] .card .lab,
[dir="rtl"] .card [class^="la-"],
[dir="rtl"] .card [class*=" la-"],
[dir="rtl"] .sidebar .la,
[dir="rtl"] .sidebar .las,
[dir="rtl"] .sidebar .lab,
[dir="rtl"] .sidebar [class^="la-"],
[dir="rtl"] .sidebar [class*=" la-"],
[dir="rtl"] .menu .la,
[dir="rtl"] .menu .las,
[dir="rtl"] .menu .lab,
[dir="rtl"] .menu [class^="la-"],
[dir="rtl"] .menu [class*=" la-"] {
    font-family: "Line Awesome Free", "Line Awesome Brands" !important;
}

/* Reset any text properties that might interfere */
.la,
.las,
.lab,
[class^="la-"],
[class*=" la-"] {
    text-transform: none !important;
    letter-spacing: normal !important;
    word-wrap: normal !important;
    white-space: nowrap !important;
    direction: ltr !important;
}

/* Ensure icons are inline-block */
.la,
.las,
.lab {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    vertical-align: baseline;
}

/* Debug helper - uncomment to see which elements are using wrong fonts */
/*
[dir="rtl"] .la:not([style*="font-family"]),
[dir="rtl"] .las:not([style*="font-family"]),
[dir="rtl"] .lab:not([style*="font-family"]),
[dir="rtl"] [class^="la-"]:not([style*="font-family"]),
[dir="rtl"] [class*=" la-"]:not([style*="font-family"]) {
    background-color: red !important;
    color: white !important;
}
*/