/* RTL Base Styles */
.rtl {
    direction: rtl;
    text-align: right;
}

/* Text Alignment */
.rtl .text-left {
    text-align: right !important;
}

.rtl .text-right {
    text-align: left !important;
}

.rtl .text-center {
    text-align: center !important;
}

/* Margins */
.rtl .ml-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

.rtl .ml-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

.rtl .ml-3 {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

.rtl .ml-4 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

.rtl .ml-5 {
    margin-left: 0 !important;
    margin-right: 1.25rem !important;
}

.rtl .ml-6 {
    margin-left: 0 !important;
    margin-right: 1.5rem !important;
}

.rtl .ml-8 {
    margin-left: 0 !important;
    margin-right: 2rem !important;
}

.rtl .ml-10 {
    margin-left: 0 !important;
    margin-right: 2.5rem !important;
}

.rtl .ml-12 {
    margin-left: 0 !important;
    margin-right: 3rem !important;
}

.rtl .ml-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

.rtl .mr-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

.rtl .mr-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

.rtl .mr-3 {
    margin-right: 0 !important;
    margin-left: 0.75rem !important;
}

.rtl .mr-4 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

.rtl .mr-5 {
    margin-right: 0 !important;
    margin-left: 1.25rem !important;
}

.rtl .mr-6 {
    margin-right: 0 !important;
    margin-left: 1.5rem !important;
}

.rtl .mr-8 {
    margin-right: 0 !important;
    margin-left: 2rem !important;
}

.rtl .mr-10 {
    margin-right: 0 !important;
    margin-left: 2.5rem !important;
}

.rtl .mr-12 {
    margin-right: 0 !important;
    margin-left: 3rem !important;
}

.rtl .mr-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

/* Padding */
.rtl .pl-1 {
    padding-left: 0 !important;
    padding-right: 0.25rem !important;
}

.rtl .pl-2 {
    padding-left: 0 !important;
    padding-right: 0.5rem !important;
}

.rtl .pl-3 {
    padding-left: 0 !important;
    padding-right: 0.75rem !important;
}

.rtl .pl-4 {
    padding-left: 0 !important;
    padding-right: 1rem !important;
}

.rtl .pl-5 {
    padding-left: 0 !important;
    padding-right: 1.25rem !important;
}

.rtl .pl-6 {
    padding-left: 0 !important;
    padding-right: 1.5rem !important;
}

.rtl .pl-8 {
    padding-left: 0 !important;
    padding-right: 2rem !important;
}

.rtl .pl-10 {
    padding-left: 0 !important;
    padding-right: 2.5rem !important;
}

.rtl .pl-12 {
    padding-left: 0 !important;
    padding-right: 3rem !important;
}

.rtl .pr-1 {
    padding-right: 0 !important;
    padding-left: 0.25rem !important;
}

.rtl .pr-2 {
    padding-right: 0 !important;
    padding-left: 0.5rem !important;
}

.rtl .pr-3 {
    padding-right: 0 !important;
    padding-left: 0.75rem !important;
}

.rtl .pr-4 {
    padding-right: 0 !important;
    padding-left: 1rem !important;
}

.rtl .pr-5 {
    padding-right: 0 !important;
    padding-left: 1.25rem !important;
}

.rtl .pr-6 {
    padding-right: 0 !important;
    padding-left: 1.5rem !important;
}

.rtl .pr-8 {
    padding-right: 0 !important;
    padding-left: 2rem !important;
}

.rtl .pr-10 {
    padding-right: 0 !important;
    padding-left: 2.5rem !important;
}

.rtl .pr-12 {
    padding-right: 0 !important;
    padding-left: 3rem !important;
}

/* Positioning */
.rtl .left-0 {
    left: auto !important;
    right: 0 !important;
}

.rtl .right-0 {
    right: auto !important;
    left: 0 !important;
}

.rtl .left-auto {
    left: auto !important;
    right: auto !important;
}

.rtl .right-auto {
    right: auto !important;
    left: auto !important;
}

/* Borders */
.rtl .border-l {
    border-left: 0 !important;
    border-right: 1px solid !important;
}

.rtl .border-r {
    border-right: 0 !important;
    border-left: 1px solid !important;
}

.rtl .border-l-0 {
    border-left-width: 0 !important;
    border-right-width: 1px !important;
}

.rtl .border-r-0 {
    border-right-width: 0 !important;
    border-left-width: 1px !important;
}

.rtl .border-l-2 {
    border-left-width: 0 !important;
    border-right-width: 2px !important;
}

.rtl .border-r-2 {
    border-right-width: 0 !important;
    border-left-width: 2px !important;
}

.rtl .border-l-4 {
    border-left-width: 0 !important;
    border-right-width: 4px !important;
}

.rtl .border-r-4 {
    border-right-width: 0 !important;
    border-left-width: 4px !important;
}

.rtl .border-l-8 {
    border-left-width: 0 !important;
    border-right-width: 8px !important;
}

.rtl .border-r-8 {
    border-right-width: 0 !important;
    border-left-width: 8px !important;
}

/* Flexbox and Grid */
.rtl .flex-row {
    flex-direction: row-reverse;
}

.rtl .flex-row-reverse {
    flex-direction: row;
}

.rtl .space-x-2>*+* {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

.rtl .space-x-3>*+* {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

.rtl .space-x-4>*+* {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

.rtl .space-x-6>*+* {
    margin-left: 0 !important;
    margin-right: 1.5rem !important;
}

.rtl .space-x-8>*+* {
    margin-left: 0 !important;
    margin-right: 2rem !important;
}

/* Grid spacing */
.rtl .gap-2 {
    gap: 0.5rem;
}

.rtl .gap-4 {
    gap: 1rem;
}

.rtl .gap-6 {
    gap: 1.5rem;
}

.rtl .gap-8 {
    gap: 2rem;
}

/* Float */
.rtl .float-left {
    float: right !important;
}

.rtl .float-right {
    float: left !important;
}

/* Clear */
.rtl .clear-left {
    clear: right !important;
}

.rtl .clear-right {
    clear: left !important;
}

/* Arabic Font Styling */
.rtl body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    line-height: 1.8;
    letter-spacing: 0;
}

/* Form Elements */
.rtl input,
.rtl textarea,
.rtl select {
    text-align: right;
}

/* Dropdowns and Menus */
.rtl .dropdown-menu {
    text-align: right;
    left: auto !important;
    right: 0 !important;
}

.rtl .dropdown-menu.dropdown-left {
    left: 0 !important;
    right: auto !important;
}

/* List styling */
.rtl ul,
.rtl ol {
    padding-right: 1.5rem;
    padding-left: 0;
}

.rtl .list-disc {
    list-style-type: disc;
}

.rtl .list-decimal {
    list-style-type: decimal;
}

/* Custom Utilities */
.rtl .start-auto {
    left: auto !important;
    right: auto !important;
}

.rtl .end-auto {
    right: auto !important;
    left: auto !important;
}

.rtl .translate-x-full {
    transform: translateX(-100%) !important;
}

.rtl .-translate-x-full {
    transform: translateX(100%) !important;
}