/* ============================================================
   RTL + Arabic typography for SudanAds (Arabic locale only)
   Loaded conditionally when app locale = ar
   ============================================================ */

:root {
    --font-ar: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

body {
    direction: rtl;
    text-align: right;
    font-family: var(--font-ar) !important;
}

h1, h2, h3, h4, h5, h6,
.btn, button, input, textarea, select,
p, span, a, li, label, td, th, div {
    font-family: var(--font-ar) !important;
}

/* ---- Text alignment ---- */
.text-start { text-align: right !important; }
.text-end   { text-align: left !important; }

/* ---- Lists ---- */
ul, ol { padding-right: 0; }

/* ---- Bootstrap float helpers ---- */
.float-start, .float-left  { float: right !important; }
.float-end,   .float-right { float: left  !important; }

/* ---- Margins (start/end aware) ---- */
.me-1{margin-left:.25rem!important;margin-right:0!important}
.me-2{margin-left:.5rem!important;margin-right:0!important}
.me-3{margin-left:1rem!important;margin-right:0!important}
.ms-1{margin-right:.25rem!important;margin-left:0!important}
.ms-2{margin-right:.5rem!important;margin-left:0!important}
.ms-3{margin-right:1rem!important;margin-left:0!important}
.ml-auto{margin-right:auto!important;margin-left:0!important}
.mr-auto{margin-left:auto!important;margin-right:0!important}

/* ---- Dropdowns / positioning ---- */
.dropdown-menu { text-align: right; right: 0; left: auto; }

/* ---- Forms ---- */
.form-check { padding-right: 1.5em; padding-left: 0; }
.form-check .form-check-input { float: right; margin-right: -1.5em; margin-left: 0; }
.input-group > .form-control { text-align: right; }

/* ---- Navigation / header ---- */
.header-menu, .nav, .navbar-nav { padding-right: 0; }

/* ---- Icons that imply direction ---- */
.la-angle-right:before { content: "\f104"; } /* swap chevrons visually */
.la-angle-left:before  { content: "\f105"; }

/* ---- Tables ---- */
table { text-align: right; }
.table thead th, .table td { text-align: right; }

/* ---- Numbers / prices keep LTR to render correctly ---- */
.ltr, .price, .amount, .balance, [dir="ltr"] {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}

/* ---- Dashboard sidebar (advertiser / publisher panels) ---- */
.dashboard .sidebar-menu {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid hsl(var(--black) / 0.15);
}
.dashboard__right {
    margin-left: 0;
    margin-right: 300px;
}
.dashboard .sidebar-menu__close {
    right: auto;
    left: 16px;
}
@media screen and (max-width: 991px) {
    .dashboard .sidebar-menu {
        -webkit-transform: translateX(100%);
        transform: translateX(100%);
    }
    .dashboard .sidebar-menu.show-sidebar {
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }
    .dashboard__right {
        margin-right: 0;
    }
}

/* ---- Preloader / misc unaffected ---- */
.preloader { direction: ltr; }
