/* ====================================================
    RTL (Right-to-Left) Styles for Arabic
==================================================== */

/* Basic RTL Setup */
body.rtl {
    direction: rtl;
    text-align: right;
}

/* Reset text alignment for specific elements */
body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6 {
    text-align: right;
}

body.rtl p {
    text-align: right;
}

/* Input and Form Elements */
body.rtl input[type="text"],
body.rtl input[type="email"],
body.rtl input[type="password"],
body.rtl input[type="tel"],
body.rtl input[type="number"],
body.rtl input[type="search"],
body.rtl textarea,
body.rtl select {
    text-align: right;
    direction: rtl;
}

body.rtl input[type="text"]::-webkit-input-placeholder,
body.rtl input[type="email"]::-webkit-input-placeholder,
body.rtl input[type="password"]::-webkit-input-placeholder,
body.rtl input[type="tel"]::-webkit-input-placeholder,
body.rtl input[type="number"]::-webkit-input-placeholder,
body.rtl input[type="search"]::-webkit-input-placeholder,
body.rtl textarea::-webkit-input-placeholder {
    text-align: right;
}

body.rtl input[type="text"]::placeholder,
body.rtl input[type="email"]::placeholder,
body.rtl input[type="password"]::placeholder,
body.rtl input[type="tel"]::placeholder,
body.rtl input[type="number"]::placeholder,
body.rtl input[type="search"]::placeholder,
body.rtl textarea::placeholder {
    text-align: right;
}

/* Float Reversals */
body.rtl .float-left {
    float: right !important;
}

body.rtl .float-right {
    float: left !important;
}

/* Text Alignment */
body.rtl .text-left {
    text-align: right !important;
}

body.rtl .text-right {
    text-align: left !important;
}

/* Margin and Padding Reversals - Extended */
body.rtl .ml-0 { margin-left: 0 !important; margin-right: 0 !important; }
body.rtl .ml-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
body.rtl .ml-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
body.rtl .ml-3 { margin-left: 0 !important; margin-right: 1rem !important; }
body.rtl .ml-4 { margin-left: 0 !important; margin-right: 1.5rem !important; }
body.rtl .ml-5 { margin-left: 0 !important; margin-right: 3rem !important; }
body.rtl .ml-auto { margin-left: 0 !important; margin-right: auto !important; }

body.rtl .mr-0 { margin-right: 0 !important; margin-left: 0 !important; }
body.rtl .mr-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
body.rtl .mr-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
body.rtl .mr-3 { margin-right: 0 !important; margin-left: 1rem !important; }
body.rtl .mr-4 { margin-right: 0 !important; margin-left: 1.5rem !important; }
body.rtl .mr-5 { margin-right: 0 !important; margin-left: 3rem !important; }
body.rtl .mr-auto { margin-right: 0 !important; margin-left: auto !important; }

body.rtl .pl-0 { padding-left: 0 !important; padding-right: 0 !important; }
body.rtl .pl-1 { padding-left: 0 !important; padding-right: 0.25rem !important; }
body.rtl .pl-2 { padding-left: 0 !important; padding-right: 0.5rem !important; }
body.rtl .pl-3 { padding-left: 0 !important; padding-right: 1rem !important; }
body.rtl .pl-4 { padding-left: 0 !important; padding-right: 1.5rem !important; }
body.rtl .pl-5 { padding-left: 0 !important; padding-right: 3rem !important; }

body.rtl .pr-0 { padding-right: 0 !important; padding-left: 0 !important; }
body.rtl .pr-1 { padding-right: 0 !important; padding-left: 0.25rem !important; }
body.rtl .pr-2 { padding-right: 0 !important; padding-left: 0.5rem !important; }
body.rtl .pr-3 { padding-right: 0 !important; padding-left: 1rem !important; }
body.rtl .pr-4 { padding-right: 0 !important; padding-left: 1.5rem !important; }
body.rtl .pr-5 { padding-right: 0 !important; padding-left: 3rem !important; }

/* Bootstrap Flexbox Reversals */
body.rtl .justify-content-start { justify-content: flex-end !important; }
body.rtl .justify-content-end { justify-content: flex-start !important; }
body.rtl .flex-row { flex-direction: row-reverse !important; }
body.rtl .flex-row-reverse { flex-direction: row !important; }

/* Border Radius Reversals */
body.rtl .rounded-left {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0.25rem !important;
    border-bottom-right-radius: 0.25rem !important;
}

body.rtl .rounded-right {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 0.25rem !important;
    border-bottom-left-radius: 0.25rem !important;
}
