/* RTL (Right-to-Left) Support for Arabic */

body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

body.rtl * {
    direction: inherit;
}

/* Flip flexbox layouts */
body.rtl .header-top,
body.rtl .header-icons,
body.rtl .nav-menu,
body.rtl .bottom-nav-items,
body.rtl .services-grid,
body.rtl .dashboard-stats,
body.rtl .dashboard-actions,
body.rtl .form-row,
body.rtl .search-bar {
    flex-direction: row-reverse;
}

/* Text alignment */
body.rtl .text-center {
    text-align: center;
}

body.rtl .text-left {
    text-align: right;
}

body.rtl .text-right {
    text-align: left;
}

/* Margins and padding */
body.rtl .ml-sm { margin-left: 0; margin-right: var(--spacing-sm); }
body.rtl .ml-md { margin-left: 0; margin-right: var(--spacing-md); }
body.rtl .ml-lg { margin-left: 0; margin-right: var(--spacing-lg); }
body.rtl .mr-sm { margin-right: 0; margin-left: var(--spacing-sm); }
body.rtl .mr-md { margin-right: 0; margin-left: var(--spacing-md); }
body.rtl .mr-lg { margin-right: 0; margin-left: var(--spacing-lg); }

body.rtl .pl-sm { padding-left: 0; padding-right: var(--spacing-sm); }
body.rtl .pl-md { padding-left: 0; padding-right: var(--spacing-md); }
body.rtl .pl-lg { padding-left: 0; padding-right: var(--spacing-lg); }
body.rtl .pr-sm { padding-right: 0; padding-left: var(--spacing-sm); }
body.rtl .pr-md { padding-right: 0; padding-left: var(--spacing-md); }
body.rtl .pr-lg { padding-right: 0; padding-left: var(--spacing-lg); }

/* Search bar icon position */
body.rtl .search-bar {
    flex-direction: row-reverse;
}

body.rtl .search-icon {
    order: -1;
}

/* Banner carousel */
body.rtl .banner-slide {
    flex-direction: row-reverse;
}

body.rtl .carousel-nav {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

/* Service cards */
body.rtl .service-card-compact {
    flex-direction: row-reverse;
}

body.rtl .service-card-info {
    text-align: right;
}

/* Forms */
body.rtl .form-group label {
    text-align: right;
}

body.rtl .form-group input,
body.rtl .form-group select,
body.rtl .form-group textarea {
    text-align: right;
}

body.rtl .form-group input::placeholder,
body.rtl .form-group textarea::placeholder {
    text-align: right;
}

/* Buttons */
body.rtl .btn {
    text-align: center;
}

/* Navigation - Modern Navbar RTL */
body.rtl .navbar {
    direction: rtl;
    text-align: right;
}

body.rtl .navbar .container {
    flex-direction: row-reverse;
}

body.rtl .nav-menu {
    flex-direction: row-reverse;
}

body.rtl .nav-menu a {
    text-align: right;
}

/* Notifications page RTL */
body.rtl .notifications-card-header {
    text-align: right;
}

body.rtl .notification-item {
    grid-template-columns: 1fr 40px;
}

body.rtl .notification-icon {
    justify-self: end;
}

body.rtl .notifications-pagination {
    direction: rtl;
}

body.rtl .pagination-btn {
    flex-direction: row-reverse;
}

@media (max-width: 480px) {
    body.rtl .notification-item {
        grid-template-columns: 1fr 32px;
    }
}

body.rtl .nav-brand {
    order: 2;
}

body.rtl .nav-toggle {
    order: 1;
}

body.rtl .lang-switcher {
    margin-left: 0;
    margin-right: auto;
}

/* Bottom navigation */
body.rtl .bottom-nav-items {
    flex-direction: row-reverse;
}

/* Dashboard stats */
body.rtl .dashboard-stats {
    flex-direction: row-reverse;
}

body.rtl .stat-card {
    text-align: center;
}

/* Dashboard actions */
body.rtl .dashboard-actions {
    flex-direction: row-reverse;
}

/* Alert messages */
body.rtl .alert {
    text-align: right;
}

body.rtl .alert ul {
    text-align: right;
    padding-right: var(--spacing-lg);
    padding-left: 0;
}

/* Flash messages */
body.rtl .flash-message {
    flex-direction: row-reverse;
}

body.rtl .flash-close {
    order: -1;
}

/* Section headers */
body.rtl .section-header {
    flex-direction: row-reverse;
}

body.rtl .section-title {
    text-align: right;
}

/* See all link - RTL fixes */
body.rtl .see-all-link {
    flex-direction: row-reverse;
}

body.rtl .see-all-link:hover i {
    transform: translateX(-3px);
}

/* Service icons */
body.rtl .service-icon {
    text-align: center;
}

body.rtl .service-label {
    text-align: center;
}

/* Calendar RTL */
body.rtl .calendar-navigation {
    flex-direction: row-reverse;
}

body.rtl .appointment-date-header {
    flex-direction: row-reverse;
}

body.rtl .appointment-card {
    flex-direction: row-reverse;
}

body.rtl .appointment-card:hover {
    transform: translateX(-4px);
}

body.rtl .appointment-time {
    justify-content: flex-end;
}

body.rtl .appointment-details {
    text-align: right;
}

body.rtl .appointment-details p {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

body.rtl .appointment-status {
    margin-right: 0;
    margin-left: var(--spacing-sm);
}

/* Page headers */
body.rtl .page-header,
body.rtl .dashboard-header {
    text-align: right;
}

body.rtl .dashboard-header h1 {
    text-align: right;
}

/* Order form */
body.rtl .order-form .form-group {
    text-align: right;
}

body.rtl .form-actions {
    flex-direction: row-reverse;
}

/* Status badges */
body.rtl .status-badge {
    text-align: center;
}

/* Cards */
body.rtl .card {
    text-align: right;
}

/* Auth cards */
body.rtl .auth-card {
    text-align: right;
}

body.rtl .auth-link {
    text-align: center;
}

/* Footer */
body.rtl .footer {
    text-align: center;
}

/* Mobile header */
body.rtl .mobile-header {
    text-align: right;
}

body.rtl .header-title {
    text-align: right;
}

/* App Header - RTL Support - Modern Design */
body.rtl .app-header {
    direction: rtl;
    text-align: right;
}

body.rtl .app-header::before {
    background: linear-gradient(270deg, var(--purple), var(--purple-light), var(--purple));
}

body.rtl .header-top-bar {
    flex-direction: row-reverse;
    align-items: center;
}

body.rtl .header-left {
    order: 2;
    justify-content: flex-start;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

body.rtl .header-right {
    order: 1;
    justify-content: flex-end;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

body.rtl .header-actions {
    flex-direction: row-reverse;
    gap: 0.375rem;
    display: flex;
    align-items: center;
}

body.rtl .header-profile-section {
    flex-direction: row-reverse;
    text-align: right;
    justify-content: flex-start;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

body.rtl .profile-info {
    text-align: right;
    flex: 1;
    min-width: 0;
}

body.rtl .greeting-text {
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.rtl .user-name {
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* Notification Dropdown - RTL - Modern Design */
body.rtl .notification-dropdown {
    right: auto;
    left: 0;
    text-align: right;
}

body.rtl .notification-wrapper {
    position: relative;
}

body.rtl .notification-header {
    flex-direction: row-reverse;
    gap: var(--spacing-sm);
}

body.rtl .notification-header-actions {
    flex-direction: row-reverse;
}

body.rtl .notification-header h3 {
    text-align: right;
    margin: 0;
}

body.rtl .mark-all-read {
    text-align: left;
    direction: ltr;
}

body.rtl .notification-item {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .notification-content {
    text-align: right;
}

body.rtl .notification-title {
    text-align: right;
}

body.rtl .notification-time {
    text-align: right;
}

body.rtl .notification-badge {
    right: auto;
    left: -4px;
    top: -4px;
}

body.rtl .notification-btn {
    position: relative;
}

body.rtl .notification-empty {
    text-align: center;
}

/* News Slider - RTL - Modern Compact Design */
body.rtl .news-slider-container {
    direction: rtl;
}

body.rtl .news-slider {
    direction: rtl;
}

body.rtl .news-item {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .news-item:not(.active) {
    transform: translateX(-15px);
}

body.rtl .news-slider {
    transform-origin: right center;
}

/* Language Switcher Button - RTL */
body.rtl .lang-switcher-btn {
    flex-direction: row-reverse;
    gap: 0.25rem;
}

body.rtl .lang-switcher-btn .lang-text {
    direction: ltr;
    text-align: center;
}

/* Responsive RTL fixes for App Header - Modern Design */
@media (max-width: 768px) {
    body.rtl .header-top-bar {
        flex-direction: row-reverse;
        align-items: center;
        padding: 0.5rem var(--spacing-sm);
        min-height: 52px;
    }
    
    body.rtl .header-left {
        order: 2;
        justify-content: flex-start;
        display: flex;
        align-items: center;
        flex: 1;
        min-width: 0;
    }
    
    body.rtl .header-right {
        order: 1;
        justify-content: flex-end;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    body.rtl .header-profile-section {
        gap: 0.5rem;
    }
    
    body.rtl .profile-picture {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        border-width: 2px;
    }
    
    body.rtl .notification-dropdown {
        left: 0;
        right: auto;
        width: 300px;
        max-width: calc(100vw - 20px);
    }
}

@media (max-width: 480px) {
    body.rtl .header-top-bar {
        flex-direction: row-reverse;
        align-items: center;
        flex-wrap: nowrap;
        padding: 0.5rem var(--spacing-sm);
        min-height: 50px;
    }
    
    body.rtl .header-left {
        order: 2;
        width: auto;
        flex: 1;
        min-width: 0;
    }
    
    body.rtl .header-right {
        order: 1;
        width: auto;
        justify-content: flex-end;
        flex-shrink: 0;
    }
    
    body.rtl .header-actions {
        justify-content: flex-end;
        gap: 0.25rem;
    }
    
    body.rtl .header-profile-section {
        gap: 0.5rem;
    }
    
    body.rtl .profile-picture {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }
    
    body.rtl .profile-picture i {
        font-size: 1.25rem;
    }
    
    body.rtl .user-name {
        font-size: 0.8125rem;
        max-width: 100px;
    }
    
    body.rtl .greeting-text {
        font-size: 0.5625rem;
    }
    
    body.rtl .header-action-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    body.rtl .notification-dropdown {
        left: 0;
        right: auto;
        width: calc(100vw - 20px);
        max-width: 320px;
    }
}

/* Service card price */
body.rtl .service-card-price {
    text-align: left;
}

/* Provider information */
body.rtl .dashboard-info {
    text-align: right;
}

body.rtl .dashboard-info p {
    text-align: right;
}

/* Table alignment (if any tables exist) */
body.rtl table {
    direction: rtl;
}

body.rtl th,
body.rtl td {
    text-align: right;
}

/* Dropdown menus */
body.rtl select {
    direction: rtl;
}

/* Input fields with icons */
body.rtl .form-group i {
    left: auto;
    right: var(--spacing-md);
}

/* Float utilities */
body.rtl .float-left {
    float: right;
}

body.rtl .float-right {
    float: left;
}

/* Position adjustments */
body.rtl [class*="left-"] {
    left: auto;
    right: 0;
}

body.rtl [class*="right-"] {
    right: auto;
    left: 0;
}

/* Checkbox RTL Support */
body.rtl .checkbox-label {
    padding-left: 0;
    padding-right: 35px; /* Increased from 30px to prevent text overlap */
    direction: rtl;
}

body.rtl .checkbox-label::before {
    left: auto;
    right: 0;
}

body.rtl .checkbox-label input[type="checkbox"] {
    left: auto;
    right: 0;
}

body.rtl .checkbox-label::after {
    left: auto;
    right: 7px;
}

/* Ensure text doesn't overlap checkbox in RTL */
body.rtl .checkbox-label span {
    margin-right: 8px; /* Add space between checkbox and text */
    margin-left: 0;
    padding-right: 0;
}

/* Override inline checkbox padding for RTL */
body.rtl .checkbox-label:not(.checkbox-group .checkbox-label) {
    padding-right: 35px; /* Ensure proper spacing in RTL */
    padding-left: 0;
}

body.rtl .checkbox-group .checkbox-label {
    padding-left: var(--spacing-md);
    padding-right: calc(var(--spacing-md) + 35px); /* Increased to match base padding */
}

body.rtl .checkbox-group .checkbox-label:hover {
    transform: translateX(-4px);
}

/* RTL support for checkboxes without .checkbox-label class */
body.rtl label:has(input[type="checkbox"]):not(.checkbox-label) {
    padding-left: 0;
    padding-right: 35px;
    direction: rtl;
}

body.rtl label:has(input[type="checkbox"]):not(.checkbox-label)::before {
    left: auto;
    right: 0;
}

body.rtl label:has(input[type="checkbox"]):not(.checkbox-label) input[type="checkbox"] {
    left: auto;
    right: 0;
}

body.rtl label:has(input[type="checkbox"]):not(.checkbox-label)::after {
    left: auto;
    right: 7px;
}

body.rtl label:has(input[type="checkbox"]):not(.checkbox-label) span {
    margin-right: 8px;
    margin-left: 0;
}

/* Checkbox size variants RTL */
body.rtl .checkbox-label.checkbox-large {
    padding-right: 40px; /* Increased for larger checkbox */
}

body.rtl .checkbox-label.checkbox-large::after {
    right: 9px;
}

body.rtl .checkbox-label.checkbox-small {
    padding-right: 28px; /* Increased for smaller checkbox */
}

body.rtl .checkbox-label.checkbox-small::after {
    right: 6px;
}

/* Tablet checkbox RTL adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    body.rtl .checkbox-label {
        padding-right: 36px; /* Slightly increased for tablets */
    }
    
    body.rtl .checkbox-label span {
        margin-right: 9px; /* Adequate space on tablets */
    }
    
    body.rtl .checkbox-group .checkbox-label {
        padding-right: calc(var(--spacing-md) + 36px);
    }
    
    body.rtl label:has(input[type="checkbox"]):not(.checkbox-label) {
        padding-right: 36px;
    }
    
    body.rtl label:has(input[type="checkbox"]):not(.checkbox-label) span {
        margin-right: 9px;
    }
}

/* Mobile checkbox RTL adjustments */
@media (max-width: 768px) {
    body.rtl .checkbox-label {
        padding-right: 38px; /* Increased for larger mobile checkboxes */
    }
    
    body.rtl .checkbox-label::after {
        right: 8px;
    }
    
    body.rtl .checkbox-label span {
        margin-right: 10px; /* More space on mobile */
    }
    
    body.rtl .checkbox-group .checkbox-label {
        padding-right: calc(var(--spacing-md) + 38px);
    }
    
    body.rtl label:has(input[type="checkbox"]):not(.checkbox-label) {
        padding-right: 38px;
    }
    
    body.rtl label:has(input[type="checkbox"]):not(.checkbox-label) span {
        margin-right: 10px;
    }
}

/* RTL Support for Custom Checkbox Implementations (.checkbox-custom) */
/* These are used in admin/cms/offers.php, profile/index.php, profile/locations.php */
body.rtl .checkbox-label:has(.checkbox-custom) {
    flex-direction: row-reverse;
    direction: rtl;
}

body.rtl .checkbox-label:has(.checkbox-custom) .checkbox-text {
    margin-right: var(--spacing-sm);
    margin-left: 0;
    text-align: right;
}

body.rtl .checkbox-label:has(.checkbox-custom) .checkbox-custom {
    order: 2; /* Place checkbox on the right in RTL */
    margin-right: 0;
    margin-left: var(--spacing-sm);
}

/* Fallback for browsers without :has() support */
body.rtl .checkbox-label .checkbox-custom {
    order: 2;
    margin-right: 0;
    margin-left: var(--spacing-sm);
}

body.rtl .checkbox-label .checkbox-text {
    order: 1;
    margin-right: var(--spacing-sm);
    margin-left: 0;
    text-align: right;
}

/* Ensure proper spacing for checkbox with custom implementation */
body.rtl .checkbox-label:has(.checkbox-custom) {
    padding-right: 0;
    padding-left: 0;
}

/* Mobile adjustments for custom checkboxes */
@media (max-width: 768px) {
    body.rtl .checkbox-label:has(.checkbox-custom) .checkbox-text {
        margin-right: var(--spacing-md);
    }
    
    body.rtl .checkbox-label .checkbox-text {
        margin-right: var(--spacing-md);
    }
}

/* Ensure icons and images don't flip */
body.rtl i,
body.rtl .fas,
body.rtl .far,
body.rtl .fab,
body.rtl img {
    transform: none;
}

/* Fix for specific icon directions that should stay the same */
body.rtl .fa-arrow-left::before {
    content: "\f060"; /* Keep as left arrow */
}

body.rtl .fa-arrow-right::before {
    content: "\f061"; /* Keep as right arrow */
}

/* Ensure proper spacing for RTL */
body.rtl .container {
    direction: rtl;
}

/* Fix for header action buttons alignment in RTL */
body.rtl .header-action-btn {
    direction: ltr; /* Keep icons in correct direction */
}

body.rtl .header-action-btn i {
    direction: ltr;
}

/* Fix for news slider icon direction */
body.rtl .news-item i {
    direction: ltr;
}

/* Fix for profile picture - keep circular shape */
body.rtl .profile-picture {
    direction: ltr;
    margin-left: 0;
    margin-right: 0;
}

body.rtl .profile-picture img {
    direction: ltr;
}

body.rtl .profile-picture-link {
    margin-left: 0;
    margin-right: 0;
}

/* Service grid - keep grid layout but reverse order */
body.rtl .services-grid {
    direction: rtl;
}

/* Cleaning services list */
body.rtl .cleaning-services-list {
    direction: rtl;
}

/* Banner content */
body.rtl .banner-content {
    text-align: right;
    padding-right: 0;
    padding-left: 120px;
}

@media (max-width: 480px) {
    body.rtl .banner-content {
        padding-left: 100px;
    }
}

/* Banner image RTL support */
body.rtl .banner-image {
    right: auto;
    left: var(--spacing-lg);
}

@media (max-width: 480px) {
    body.rtl .banner-image {
        left: var(--spacing-md);
    }
}

/* Banner slide decorative elements RTL */
body.rtl .banner-slide::before {
    right: auto;
    left: -20%;
}

/* Beta download text RTL */
body.rtl .beta-download-text {
    margin-left: 0;
    margin-right: 4px;
}

/* Hero section decorative elements RTL */
body.rtl .hero-section::before {
    right: auto;
    left: -20%;
}

body.rtl .hero-section::after {
    left: auto;
    right: -10%;
}

/* Offer card decorative elements RTL */
body.rtl .offer-card::before {
    right: auto;
    left: -20%;
}

body.rtl .offer-card::after {
    left: auto;
    right: -10%;
}

/* Offer cards */
body.rtl .offer-card {
    flex-direction: row-reverse;
}

body.rtl .offer-content {
    text-align: right;
}

/* Ads banners carousel - RTL fixes */
body.rtl .offer-card-gradient {
    flex-direction: row-reverse;
}

body.rtl .offer-content-left {
    text-align: right;
}

body.rtl .offer-image-right {
    order: -1;
}

body.rtl .offer-carousel-dots {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

/* Form container */
body.rtl .form-container {
    direction: rtl;
}

/* Auth container */
body.rtl .auth-container {
    direction: rtl;
}

/* Additional RTL fixes for common elements */

/* Service icon grid - ensure proper RTL flow */
body.rtl .services-grid .service-icon {
    direction: rtl;
}

/* Form row - reverse for RTL */
body.rtl .form-row {
    flex-direction: row-reverse;
}

/* Filter buttons */
body.rtl .service-filters {
    flex-direction: row-reverse;
}

body.rtl .filter-btn {
    direction: rtl;
}

/* Order cards and lists */
body.rtl .order-card {
    text-align: right;
}

body.rtl .order-card-header {
    flex-direction: row-reverse;
}

body.rtl .order-card-footer {
    flex-direction: row-reverse;
}

/* Order Page RTL Support - Enhanced */
body.rtl .orders-page {
    direction: rtl;
}

body.rtl .orders-help-card {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .orders-help-card .help-content {
    text-align: right;
}

body.rtl .orders-help-card .help-actions {
    justify-content: flex-start;
}

body.rtl .orders-list-modern {
    direction: rtl;
}

body.rtl .orders-grid {
    direction: rtl;
}

body.rtl .order-card-modern {
    direction: rtl;
    text-align: right;
}

body.rtl .order-card-header-modern {
    flex-direction: row-reverse;
}

body.rtl .order-service-info-modern {
    flex-direction: row-reverse;
}

body.rtl .order-title-row {
    flex-direction: row-reverse;
}

body.rtl .service-details-modern {
    text-align: right;
}

body.rtl .order-status-wrapper {
    text-align: left;
}

body.rtl .order-card-body-modern {
    direction: rtl;
}

body.rtl .order-info-grid-modern {
    direction: rtl;
}

body.rtl .info-item-modern {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .info-content-modern {
    text-align: right;
}

body.rtl .info-label-modern {
    text-align: right;
}

body.rtl .info-value-modern {
    text-align: right;
}

body.rtl .order-card-footer-modern {
    flex-direction: row-reverse;
}

body.rtl .order-footer-main,
body.rtl .order-footer-actions {
    flex-direction: row-reverse;
}

body.rtl .order-price-modern {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .price-label {
    text-align: right;
}

body.rtl .price-value-modern {
    direction: ltr; /* Keep currency LTR */
    text-align: left;
}

body.rtl .order-notes-modern {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .order-action-hint {
    flex-direction: row-reverse;
}

body.rtl .order-images-title {
    flex-direction: row-reverse;
}

@media (max-width: 767px) {
    body.rtl .orders-help-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

body.rtl .notes-text {
    text-align: right;
}

/* Filters Section RTL */
body.rtl .filters-section-modern {
    direction: rtl;
}

body.rtl .filters-header {
    flex-direction: row-reverse;
}

body.rtl .filters-title {
    text-align: right;
}

body.rtl .filters-form-modern {
    direction: rtl;
}

body.rtl .filters-grid {
    direction: rtl;
}

body.rtl .filter-group-modern {
    direction: rtl;
}

body.rtl .filter-label {
    text-align: right;
    flex-direction: row-reverse;
}

body.rtl .filter-input-wrapper {
    direction: rtl;
}

body.rtl .filter-select-modern {
    direction: rtl;
    text-align: right;
}

body.rtl .search-input-modern {
    direction: rtl;
    text-align: right;
}

body.rtl .filter-actions-modern {
    flex-direction: row-reverse;
}

/* Orders Stats RTL */
body.rtl .orders-stats-modern {
    flex-direction: row-reverse;
}

body.rtl .stat-card-mini {
    flex-direction: row-reverse;
}

body.rtl .stat-content-mini {
    text-align: right;
}

body.rtl .stat-value-mini {
    direction: ltr; /* Keep numbers LTR */
}

/* Order Details Page RTL */
body.rtl .order-details {
    direction: rtl;
}

body.rtl .order-status-banner {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .status-content {
    flex-direction: row-reverse;
}

body.rtl .detail-card {
    direction: rtl;
}

body.rtl .detail-card-header {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .detail-card-body {
    direction: rtl;
}

body.rtl .detail-item {
    flex-direction: row-reverse;
}

body.rtl .detail-item-full {
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
}

body.rtl .detail-label {
    text-align: right;
}

body.rtl .detail-value {
    text-align: right;
}

body.rtl .detail-item-full .detail-value {
    text-align: right;
    width: 100%;
}

body.rtl .detail-value.price-large {
    direction: ltr; /* Keep currency LTR */
    text-align: left;
}

body.rtl .detail-link {
    flex-direction: row-reverse;
}

/* Enhanced Order View Page RTL Support */
body.rtl .orders-view-page {
    direction: rtl;
}

body.rtl .order-details-enhanced {
    direction: rtl;
}

/* Enhanced Status Banner RTL */
body.rtl .order-status-banner-enhanced {
    direction: rtl;
    text-align: right;
}

body.rtl .status-content-enhanced {
    flex-direction: row-reverse;
}

body.rtl .status-icon-wrapper {
    order: 2;
}

body.rtl .status-info-wrapper {
    order: 1;
    text-align: right;
}

body.rtl .status-actions {
    flex-direction: row-reverse;
}

body.rtl .status-title {
    text-align: right;
}

body.rtl .status-badge-enhanced {
    direction: rtl;
}

body.rtl .status-message {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .status-message i {
    order: 2;
}

body.rtl .status-message span {
    order: 1;
}

/* Enhanced Detail Cards RTL */
body.rtl .detail-card-highlight {
    direction: rtl;
    text-align: right;
}

body.rtl .detail-card-icon-wrapper {
    order: 2;
}

body.rtl .detail-card-header .detail-card-icon-wrapper + h2 {
    order: 1;
    text-align: right;
}

body.rtl .detail-item-highlight {
    direction: rtl;
    text-align: right;
    grid-template-columns: 1fr auto;
}

body.rtl .detail-item-highlight .detail-label {
    order: 2;
    text-align: right;
    flex-direction: row-reverse;
}

body.rtl .detail-item-highlight .detail-label i {
    margin-right: 0;
    margin-left: var(--spacing-sm);
}

body.rtl .detail-value-emphasis {
    order: 1;
    text-align: left;
}

body.rtl .price-emphasis {
    direction: ltr; /* Keep currency LTR */
    text-align: left;
}

body.rtl .detail-item-price-highlight {
    direction: rtl;
}

/* Map Container RTL */
body.rtl .map-container-wrapper {
    direction: rtl;
}

body.rtl .order-location-map {
    direction: ltr; /* Maps are always LTR */
}

body.rtl .btn-map-directions {
    direction: rtl;
    flex-direction: row-reverse;
}

body.rtl .btn-map-directions i {
    order: 2;
}

body.rtl .btn-map-directions span {
    order: 1;
}

/* Waiting Provider Card RTL */
body.rtl .waiting-provider-card {
    direction: rtl;
    text-align: center;
}

body.rtl .waiting-provider-title {
    text-align: center;
}

body.rtl .waiting-provider-message {
    text-align: center;
}

/* Contact Information RTL */
body.rtl .contact-item {
    direction: rtl;
    flex-direction: row-reverse;
}

body.rtl .contact-item .detail-label {
    order: 2;
    text-align: right;
    flex-direction: row-reverse;
}

body.rtl .contact-item .detail-label i {
    margin-right: 0;
    margin-left: var(--spacing-sm);
}

body.rtl .contact-link {
    order: 1;
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .contact-link i {
    order: 2;
    margin-left: 0;
    margin-right: var(--spacing-xs);
}

body.rtl .contact-link span,
body.rtl .contact-link {
    order: 1;
}

body.rtl .contact-value {
    order: 1;
    text-align: right;
}

body.rtl .contact-unavailable-card {
    direction: rtl;
    text-align: center;
}

body.rtl .contact-unavailable-text {
    flex-direction: row-reverse;
    justify-content: center;
}

body.rtl .contact-unavailable-text i {
    margin-right: 0;
    margin-left: var(--spacing-sm);
}

/* Cancellation Alert RTL */
body.rtl .cancellation-alert {
    direction: rtl;
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .cancellation-alert i {
    order: 2;
}

body.rtl .alert-content {
    order: 1;
    text-align: right;
}

body.rtl .alert-content strong {
    text-align: right;
}

body.rtl .alert-content p {
    text-align: right;
}

body.rtl .btn-contact-admin {
    direction: rtl;
    flex-direction: row-reverse;
}

body.rtl .btn-contact-admin i {
    order: 2;
}

body.rtl .btn-contact-admin span {
    order: 1;
}

/* Responsive RTL - Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    body.rtl .detail-item-highlight {
        grid-template-columns: 1fr 200px;
    }
    
    body.rtl .detail-item-highlight .detail-label {
        order: 1;
        text-align: right;
    }
    
    body.rtl .detail-value-emphasis {
        order: 2;
        text-align: left;
    }
}

/* Responsive RTL - Mobile */
@media (max-width: 767px) {
    body.rtl .status-content-enhanced {
        flex-direction: column;
        align-items: center;
    }
    
    body.rtl .status-icon-wrapper {
        order: 1;
    }
    
    body.rtl .status-info-wrapper {
        order: 2;
        text-align: center;
    }
    
    body.rtl .status-title {
        text-align: center;
    }
    
    body.rtl .status-badge-enhanced {
        align-self: center;
    }
    
    body.rtl .status-message {
        flex-direction: column;
        text-align: center;
    }
    
    body.rtl .status-message i {
        order: 1;
    }
    
    body.rtl .status-message span {
        order: 2;
    }
    
    body.rtl .detail-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    body.rtl .detail-card-icon-wrapper {
        order: 1;
    }
    
    body.rtl .detail-card-header h2 {
        order: 2;
        text-align: right;
    }
    
    body.rtl .detail-item-highlight {
        grid-template-columns: 1fr;
        text-align: right;
    }
    
    body.rtl .detail-item-highlight .detail-label {
        order: 1;
        text-align: right;
        margin-bottom: var(--spacing-xs);
    }
    
    body.rtl .detail-value-emphasis {
        order: 2;
        text-align: right;
        width: 100%;
    }
    
    body.rtl .cancellation-alert {
        flex-direction: column;
        text-align: center;
    }
    
    body.rtl .cancellation-alert i {
        order: 1;
        align-self: center;
    }
    
    body.rtl .alert-content {
        order: 2;
        text-align: center;
    }
}

/* Responsive RTL - Desktop */
@media (min-width: 1024px) {
    body.rtl .detail-item-highlight {
        grid-template-columns: 1fr 250px;
    }
    
    body.rtl .detail-item-highlight .detail-label {
        order: 1;
        text-align: right;
    }
    
    body.rtl .detail-value-emphasis {
        order: 2;
        text-align: left;
    }
}

/* Pagination RTL */
body.rtl .pagination-container {
    direction: rtl;
}

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

body.rtl .pagination-info {
    text-align: center;
}

/* No Results RTL */
body.rtl .no-results-modern {
    direction: rtl;
    text-align: center;
}

body.rtl .no-results-content {
    text-align: center;
}

body.rtl .no-results-title {
    text-align: center;
}

body.rtl .no-results-description {
    text-align: center;
}

/* Order Action Forms RTL */
body.rtl .order-action-form {
    direction: rtl;
}

body.rtl .order-card-footer-modern .btn {
    direction: rtl;
}

/* Back Button RTL */
body.rtl .back-button-mobile {
    order: 2;
}

body.rtl .page-title-mobile {
    flex-direction: row-reverse;
}

body.rtl .page-title-mobile h1 {
    text-align: right;
}

/* Order Creation Form RTL Support */
body.rtl .orders-header {
    direction: rtl;
}

body.rtl .page-header-content {
    flex-direction: row-reverse;
}

body.rtl .page-title-section {
    flex-direction: row-reverse;
}

body.rtl .page-title-section .back-button {
    order: 2;
}

body.rtl .page-title-section > div {
    order: 1;
    text-align: right;
}

body.rtl .page-title {
    text-align: right;
}

body.rtl .page-subtitle {
    text-align: right;
}

body.rtl .form-container {
    direction: rtl;
}

body.rtl .order-form {
    direction: rtl;
}

body.rtl .form-section {
    direction: rtl;
}

body.rtl .form-section-header {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .form-section-header h2 {
    text-align: right;
}

body.rtl .form-group {
    direction: rtl;
}

body.rtl .form-group label {
    text-align: right;
    flex-direction: row-reverse;
}

body.rtl .form-group label i {
    margin-left: var(--spacing-sm);
    margin-right: 0;
}

body.rtl .form-select-enhanced,
body.rtl .form-input,
body.rtl .form-group input[type="text"],
body.rtl .form-group input[type="date"],
body.rtl .form-group input[type="time"],
body.rtl .form-group textarea {
    direction: rtl;
    text-align: right;
}

body.rtl .form-group input[type="number"],
body.rtl .form-group input[type="date"],
body.rtl .form-group input[type="time"] {
    direction: ltr; /* Keep dates/times LTR */
}

body.rtl .form-group input::placeholder,
body.rtl .form-group textarea::placeholder {
    text-align: right;
}

body.rtl .form-hint {
    text-align: right;
}

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

body.rtl .form-actions {
    flex-direction: row-reverse;
}

body.rtl .price-display {
    direction: ltr; /* Keep currency LTR */
    text-align: left;
}

body.rtl .address-selection {
    direction: rtl;
}

body.rtl .location-gps {
    direction: rtl;
}

body.rtl .location-gps > div {
    flex-direction: row-reverse;
}

body.rtl .location-status {
    text-align: right;
}

body.rtl #locationInfoContainer {
    direction: rtl;
    text-align: right;
}

body.rtl #locationInfoContainer > div {
    flex-direction: row-reverse;
}

body.rtl #coordinatesText {
    direction: ltr; /* Keep coordinates LTR */
}

body.rtl #locationMapContainer {
    direction: rtl;
}

body.rtl #locationMapContainer > div:first-child {
    text-align: right;
}

body.rtl #locationMapContainer > div:first-child small {
    text-align: right;
}

body.rtl .alert {
    direction: rtl;
    text-align: right;
}

body.rtl .alert-content {
    text-align: right;
}

body.rtl .alert ul {
    padding-right: var(--spacing-lg);
    padding-left: 0;
    text-align: right;
}

body.rtl .alert li {
    text-align: right;
}

/* Card actions */
body.rtl .card-actions {
    flex-direction: row-reverse;
}

/* Modal and dialog */
body.rtl .modal-header {
    flex-direction: row-reverse;
}

body.rtl .modal-footer {
    flex-direction: row-reverse;
}

/* Breadcrumbs */
body.rtl .breadcrumb {
    flex-direction: row-reverse;
}

body.rtl .breadcrumb-item::after {
    content: '/';
    margin: 0 var(--spacing-xs);
}

body.rtl .breadcrumb-item:last-child::after {
    display: none;
}

/* Pagination */
body.rtl .pagination {
    flex-direction: row-reverse;
}

/* Badge and tag alignment */
body.rtl .badge,
body.rtl .tag {
    direction: rtl;
}

/* Tooltip positioning */
body.rtl .tooltip {
    direction: rtl;
    text-align: right;
}

/* Sub-Services Management Page RTL Support */
body.rtl .enhanced-filters-section {
    direction: rtl;
}

body.rtl .filters-card {
    direction: rtl;
}

body.rtl .page-header {
    flex-direction: row-reverse;
}

body.rtl .page-header-actions {
    flex-direction: row-reverse;
}

body.rtl .stats-grid {
    direction: rtl;
}

body.rtl .stat-card {
    flex-direction: row-reverse;
}

body.rtl .stat-content {
    text-align: right;
}

body.rtl .content-grid {
    direction: rtl;
}

body.rtl .form-section,
body.rtl .list-section {
    direction: rtl;
}

body.rtl .section-header {
    flex-direction: row-reverse;
}

body.rtl .section-header h2 {
    text-align: right;
}

body.rtl .edit-badge {
    direction: ltr; /* Keep numbers in LTR */
}

body.rtl .action-buttons-group {
    flex-direction: row-reverse;
}

body.rtl .data-table th,
body.rtl .data-table td {
    text-align: right;
}

body.rtl .card-item-header {
    flex-direction: row-reverse;
}

body.rtl .card-item-row {
    flex-direction: row-reverse;
}

body.rtl .card-item-label {
    text-align: right;
}

body.rtl .card-item-value {
    text-align: left;
}

body.rtl .card-item-actions {
    direction: rtl;
}

body.rtl .floating-add-btn {
    left: 2rem;
    right: auto;
}

body.rtl .modal-header {
    flex-direction: row-reverse;
}

body.rtl .modal-close {
    order: -1;
}

/* Service Types Management Page RTL Support */
body.rtl .service-types-layout {
    direction: rtl;
}

body.rtl .admin-section {
    direction: rtl;
}

body.rtl .admin-section h2 {
    text-align: right;
}

/* Admin Dashboard RTL Support */
body.rtl .admin-stats {
    direction: rtl;
}

body.rtl .admin-stats .stat-card {
    text-align: center; /* Keep centered for stats */
}

body.rtl .admin-stats .stat-card::before {
    transform-origin: right; /* Flip animation origin for RTL */
}

body.rtl .action-buttons {
    direction: rtl;
}

body.rtl .action-buttons .btn {
    direction: rtl;
    text-align: center;
}

body.rtl .action-buttons .btn i {
    margin-left: var(--spacing-sm);
    margin-right: 0;
}

body.rtl .action-buttons .btn span {
    direction: ltr; /* Keep badge numbers LTR */
}

body.rtl .cms-form {
    direction: rtl;
}

body.rtl .form-group label {
    text-align: right;
}

body.rtl .form-group input[type="text"],
body.rtl .form-group input[type="number"],
body.rtl .form-group textarea,
body.rtl .form-group select {
    text-align: right;
}

body.rtl .form-group input[dir="rtl"],
body.rtl .form-group textarea[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

body.rtl .form-group input:not([dir="rtl"]),
body.rtl .form-group textarea:not([dir="rtl"]) {
    direction: ltr;
    text-align: left;
}

body.rtl .form-group select {
    background-position: left var(--spacing-sm) center;
    padding-left: calc(var(--spacing-md) + 16px);
    padding-right: var(--spacing-sm);
}

body.rtl .form-help {
    text-align: right;
}

body.rtl .form-actions {
    flex-direction: row-reverse;
}

body.rtl .table-actions {
    flex-direction: row-reverse;
}

body.rtl .inline-form {
    direction: rtl;
}

body.rtl .empty-state {
    text-align: center;
}

/* Manage Service Types Page (Provider View) RTL Support */
body.rtl .orders-page {
    direction: rtl;
}

body.rtl .page-title-mobile {
    direction: rtl;
}

body.rtl .page-title-content {
    text-align: right;
}

body.rtl .page-title-content h1 {
    text-align: right;
}

body.rtl .page-subtitle {
    text-align: right;
}

body.rtl .filters-section {
    direction: rtl;
}

body.rtl .filters-form {
    direction: rtl;
}

body.rtl .services-list {
    direction: rtl;
}

body.rtl .services-grid {
    direction: rtl;
}

body.rtl .service-card {
    direction: rtl;
    text-align: right;
}

body.rtl .service-info {
    text-align: right;
}

body.rtl .service-info h3 {
    text-align: right;
}

body.rtl .service-description {
    text-align: right;
}

body.rtl .service-footer {
    direction: rtl;
}

body.rtl .service-footer > div {
    flex-direction: row-reverse;
}

body.rtl .service-price {
    direction: ltr; /* Keep currency LTR */
    text-align: left;
}

body.rtl .service-duration {
    text-align: right;
}

body.rtl .status-badge-modern {
    direction: rtl;
}

body.rtl .status-text {
    text-align: right;
}

body.rtl .service-actions {
    direction: rtl;
}

body.rtl .service-actions form {
    direction: rtl;
}

body.rtl .no-results-modern {
    direction: rtl;
    text-align: center;
}

body.rtl .no-results-content {
    text-align: center;
}

body.rtl .no-results-title {
    text-align: center;
}

body.rtl .no-results-description {
    text-align: center;
}

/* Arabic text in cells */
body.rtl .sub-service-name-ar,
body.rtl .category-name-ar {
    direction: rtl;
    text-align: right;
}

/* Search input wrapper RTL */
body.rtl .search-input-wrapper {
    direction: ltr; /* Keep search input LTR for English */
}

body.rtl .search-input[dir="auto"] {
    direction: auto;
}

/* Filter select RTL */
body.rtl .filter-select {
    direction: ltr; /* Keep dropdowns LTR for English content */
    text-align: right;
}

/* Form inputs RTL */
body.rtl .form-group input[dir="rtl"],
body.rtl .form-group textarea[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

body.rtl .form-group input:not([dir="rtl"]),
body.rtl .form-group textarea:not([dir="rtl"]) {
    direction: ltr;
    text-align: left;
}

/* Results count RTL */
body.rtl .results-count {
    direction: ltr; /* Keep numbers LTR */
}

/* List actions RTL */
body.rtl .list-actions {
    flex-direction: row-reverse;
}

/* Dropdown menu */
body.rtl .dropdown-menu {
    right: auto;
    left: 0;
    text-align: right;
}

body.rtl .dropdown-item {
    text-align: right;
}

/* Input group */
body.rtl .input-group {
    flex-direction: row-reverse;
}

body.rtl .input-group-prepend,
body.rtl .input-group-append {
    order: 2;
}

body.rtl .input-group input {
    order: 1;
}

/* List items */
body.rtl ul,
body.rtl ol {
    padding-right: var(--spacing-lg);
    padding-left: 0;
}

body.rtl li {
    text-align: right;
}

/* Blockquote */
body.rtl blockquote {
    border-right: 4px solid var(--purple);
    border-left: none;
    padding-right: var(--spacing-md);
    padding-left: 0;
    margin-right: var(--spacing-lg);
    margin-left: 0;
}

/* Code blocks */
body.rtl code,
body.rtl pre {
    direction: ltr; /* Keep code in LTR */
    text-align: left;
}

/* Ensure proper text direction for mixed content */
body.rtl .ltr-content {
    direction: ltr;
    text-align: left;
}

/* Fix for icons that should not flip */
body.rtl .fa-chevron-right,
body.rtl .fa-chevron-left,
body.rtl .fa-arrow-right,
body.rtl .fa-arrow-left {
    direction: ltr;
}

/* Fix for number inputs and prices */
body.rtl input[type="number"],
body.rtl .price,
body.rtl .currency {
    direction: ltr;
    text-align: left;
}

/* Fix for dates and times */
body.rtl .date,
body.rtl .time {
    direction: ltr;
}

/* Profile Form RTL Support */
body.rtl .password-input-wrapper input {
    padding-right: var(--spacing-lg);
    padding-left: 50px;
}

body.rtl .password-toggle {
    right: auto;
    left: var(--spacing-md);
}

body.rtl .profile-section::before {
    left: auto;
    right: 0;
}

body.rtl .profile-section-header {
    flex-direction: row-reverse;
}

body.rtl .profile-form-actions {
    flex-direction: row-reverse;
}

@media (min-width: 768px) {
    body.rtl .profile-form-actions {
        flex-direction: row-reverse;
    }
    
    body.rtl .profile-form-actions .btn-secondary {
        order: 1;
    }
}

/* Offers Management Page (CMS) RTL Support */
body.rtl .offers-layout {
    direction: rtl;
}

body.rtl .offers-form-section,
body.rtl .offers-list-section {
    direction: rtl;
}

body.rtl .section-header {
    flex-direction: row-reverse;
}

body.rtl .section-header h2 {
    text-align: right;
}

body.rtl .offers-count {
    text-align: left;
}

body.rtl .offers-count .badge {
    direction: ltr; /* Keep numbers LTR */
}

body.rtl .banner-type-toggle-group {
    direction: rtl;
    text-align: right;
}

body.rtl .banner-type-toggle {
    direction: rtl;
}

body.rtl .banner-type-toggle .toggle-option span {
    text-align: center;
}

body.rtl .device-images-group {
    direction: rtl;
}

body.rtl .device-image-section {
    direction: rtl;
}

body.rtl .device-image-header {
    flex-direction: row-reverse;
}

body.rtl .device-info {
    text-align: right;
}

body.rtl .device-info strong,
body.rtl .device-info small {
    text-align: right;
}

body.rtl .device-image-toggle {
    flex-direction: row-reverse;
}

body.rtl .device-image-input {
    direction: rtl;
}

body.rtl .device-image-input input[type="url"] {
    direction: ltr;
    text-align: left;
}

body.rtl .file-upload-label {
    text-align: center;
}

body.rtl .file-upload-text,
body.rtl .file-upload-name {
    text-align: center;
}

body.rtl .remove-image-btn {
    right: auto;
    left: var(--spacing-xs);
}

body.rtl .image-dimensions-info {
    border-left: none;
    border-right: 3px solid var(--purple);
    text-align: right;
}

body.rtl .dimensions-header {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .dimensions-value {
    text-align: right;
}

body.rtl .banner-size-info {
    direction: rtl;
    text-align: right;
}

body.rtl .size-info-header {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .size-info-grid {
    direction: rtl;
}

body.rtl .size-info-item {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .size-info-content {
    text-align: right;
}

body.rtl .size-info-content strong {
    text-align: right;
}

body.rtl .size-details {
    text-align: right;
}

body.rtl .size-details span {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .size-details span::before {
    margin-left: var(--spacing-xs);
    margin-right: 0;
}

body.rtl .input-with-preview,
body.rtl .input-with-button {
    flex-direction: row-reverse;
}

body.rtl .input-with-preview .icon-preview {
    order: 2;
}

body.rtl .input-with-button .btn {
    order: 2;
}

body.rtl .color-scheme-selector {
    flex-direction: row-reverse;
}

body.rtl .color-preview {
    order: 2;
}

body.rtl .color-icon-display {
    flex-direction: row-reverse;
}

body.rtl .table-mobile-card {
    direction: rtl;
}

body.rtl .card-item {
    direction: rtl;
    text-align: right;
}

body.rtl .card-item-header {
    flex-direction: row-reverse;
}

body.rtl .card-item-row {
    flex-direction: row-reverse;
}

body.rtl .card-item-label {
    text-align: right;
}

body.rtl .card-item-value {
    text-align: right;
}

body.rtl .card-item-actions {
    flex-direction: row-reverse;
}

/* RTL Mobile Responsive for Offers Page */
@media (max-width: 768px) {
    body.rtl .size-info-item {
        flex-direction: column;
        text-align: center;
    }
    
    body.rtl .input-with-preview,
    body.rtl .input-with-button {
        flex-direction: column;
    }
    
    body.rtl .color-scheme-selector {
        flex-direction: column;
    }
}

/* Provider Approvals Page RTL Support */
body.rtl .filters-section {
    direction: rtl;
}

body.rtl .filters-form {
    direction: rtl;
}

body.rtl .table-container {
    direction: rtl;
}

body.rtl .table-mobile-card {
    direction: rtl;
}

body.rtl .card-item {
    direction: rtl;
    text-align: right;
}

body.rtl .card-item-header {
    flex-direction: row-reverse;
}

body.rtl .card-item-row {
    flex-direction: row-reverse;
}

body.rtl .card-item-label {
    text-align: right;
}

body.rtl .card-item-value {
    text-align: left;
}

body.rtl .card-item-actions {
    direction: rtl;
    flex-direction: row-reverse;
}

/* Notifications Page - RTL adjustments */
body.rtl .notifications-header-left {
    flex-direction: row-reverse;
}

body.rtl .notifications-search i {
    left: auto;
    right: 14px;
}

body.rtl .notifications-search input {
    padding: 10px 38px 10px 12px;
}

body.rtl .notification-menu {
    right: auto;
    left: 0;
}

/* RTL Notification Item Layout */
body.rtl .notifications-page .notification-item {
    direction: rtl;
    text-align: right;
}

body.rtl .notifications-page .notification-item {
    grid-template-columns: auto 1fr 64px;
}

body.rtl .notification-content {
    direction: rtl;
    text-align: right;
}

body.rtl .notification-header-row {
    flex-direction: row-reverse;
}

body.rtl .notification-title {
    text-align: right;
    direction: rtl;
    unicode-bidi: plaintext;
}

body.rtl .notification-message {
    text-align: right;
    direction: rtl;
    unicode-bidi: plaintext;
}

body.rtl .notification-meta {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

body.rtl .notification-meta-item {
    direction: rtl;
    unicode-bidi: plaintext;
}

body.rtl .notification-actions {
    direction: ltr; /* Keep actions in LTR for icons */
}

body.rtl .notification-item::before {
    left: auto;
    right: 0;
}

body.rtl .notification-item.notification-unread {
    border-left-width: 2px;
    border-right-width: 4px;
    border-left-color: rgba(15, 23, 42, 0.08);
    border-right-color: rgba(156, 39, 176, 0.3);
}

/* Mobile RTL adjustments */
@media (max-width: 768px) {
    body.rtl .notifications-page .notification-item {
        grid-template-columns: auto 1fr 52px;
    }
}

@media (max-width: 480px) {
    body.rtl .notifications-page .notification-item {
        grid-template-columns: auto 1fr 48px;
    }
}
