/* ================================================
   INLINE INVOICE DISCOUNTS - Custom Styles
   ================================================ */

/* Discount column styling */
.bill_col_discount {
    min-width: 150px;
}

.bill_col_discount .input-group-append {
    width: 60px;
}

.bill_col_discount .js_item_discount_type {
    font-size: 12px;
    padding: 0.25rem;
}

/* Hide discount column when needed */
.bill_col_discount.hidden {
    display: none !important;
}

/* Disabled button styling */
button.disabled,
a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================== */
/* [RTL] SIDEBAR COLLAPSE & LAYOUT FIXES                          */
/* ============================================================== */

@media (min-width: 768px) {

    /* 1. Base State (Sidebar Open) - Explicitly define normal width/margin */
    html[dir="rtl"] .page-wrapper,
    html[dir="rtl"] .footer {
        margin-right: 230px !important;
        /* Standard Sidebar Width */
        margin-left: 0 !important;
        width: auto !important;
        transition: all 0.2s ease-in-out !important;
        /* Smooth Transition */
    }

    /* 2. Collapsed State (Sidebar Closed) - Override for mini-sidebar */
    html[dir="rtl"] body.mini-sidebar .page-wrapper,
    html[dir="rtl"] body.mini-sidebar .footer {
        margin-right: 75px !important;
        /* Mini Sidebar Width */
        margin-left: 0 !important;
        width: calc(100% - 75px) !important;
        /* Force full width minus sidebar */
        flex: 0 0 calc(100% - 75px) !important;
        max-width: calc(100% - 75px) !important;
    }

    /* 3. Header Layout (RTL) - Reorder Toggle & Search */
    html[dir="rtl"] .topbar .top-navbar .navbar-nav.mr-auto {
        float: right !important;
        flex-direction: row !important;
        margin-right: 0 !important;
    }

    /* 4. Sidebar Position (RTL) - Move Sidebar to Right */
    html[dir="rtl"] .left-sidebar,
    html[dir="rtl"] .left-sidebar.settings-menu {
        right: 0 !important;
        left: auto !important;
        position: fixed !important;
    }

    /* 5. Settings Page Specifics (RTL) */
    /* Ensure the settings wrapper pushes content to the left of the sidebar */
    html[dir="rtl"] #settings-wrapper {
        margin-right: 230px !important;
        margin-left: 0 !important;
    }

    /* Settings Menu Item Padding Flip */
    html[dir="rtl"] .settings .settings-menu .sidebar-nav ul li ul {
        padding-right: 15px !important;
        padding-left: 0 !important;
    }

    html[dir="rtl"] .settings .left-sidebar .sidebar-nav {
        padding-left: 10px !important;
        padding-right: 0 !important;
    }
}