/* RTL Support CSS for Default Theme */

/* Basic RTL Layout */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* Text Alignment */
[dir="rtl"] .text-left {
    text-align: right !important;
}

[dir="rtl"] .text-right {
    text-align: left !important;
}

[dir="rtl"] .text-start {
    text-align: right !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Margins and Paddings */
[dir="rtl"] .ms-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-4 { margin-right: 1.5rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-5 { margin-right: 3rem !important; margin-left: 0 !important; }

[dir="rtl"] .me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-3 { margin-left: 1rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-4 { margin-left: 1.5rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-5 { margin-left: 3rem !important; margin-right: 0 !important; }

[dir="rtl"] .ps-1 { padding-right: 0.25rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-2 { padding-right: 0.5rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-3 { padding-right: 1rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-4 { padding-right: 1.5rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-5 { padding-right: 3rem !important; padding-left: 0 !important; }

[dir="rtl"] .pe-1 { padding-left: 0.25rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-2 { padding-left: 0.5rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-3 { padding-left: 1rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-4 { padding-left: 1.5rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-5 { padding-left: 3rem !important; padding-right: 0 !important; }

/* Float */
[dir="rtl"] .float-left {
    float: right !important;
}

[dir="rtl"] .float-right {
    float: left !important;
}

[dir="rtl"] .float-start {
    float: right !important;
}

[dir="rtl"] .float-end {
    float: left !important;
}

/* Navigation */
[dir="rtl"] .navbar-nav {
    direction: rtl;
}

[dir="rtl"] .navbar-nav .nav-link {
    text-align: right;
}

[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
    text-align: right;
}

[dir="rtl"] .dropdown-menu .dropdown-item {
    text-align: right;
}

/* Breadcrumbs */
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-right: 0.5rem;
    padding-left: 0;
    content: "/";
}

/* Forms */
[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] .form-select {
    text-align: right;
    background-position: left 0.75rem center;
}

[dir="rtl"] .input-group .form-control:not(:first-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

[dir="rtl"] .input-group .form-control:not(:last-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Buttons */
[dir="rtl"] .btn-group > .btn:not(:first-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

[dir="rtl"] .btn-group > .btn:not(:last-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Cards */
[dir="rtl"] .card {
    text-align: right;
}

[dir="rtl"] .card-header {
    text-align: right;
}

[dir="rtl"] .card-body {
    text-align: right;
}

/* Tables */
[dir="rtl"] .table {
    text-align: right;
}

[dir="rtl"] .table th,
[dir="rtl"] .table td {
    text-align: right;
}

/* Modals */
[dir="rtl"] .modal-header {
    text-align: right;
}

[dir="rtl"] .modal-header .btn-close {
    margin: -0.5rem 0.5rem -0.5rem auto;
}

[dir="rtl"] .modal-body {
    text-align: right;
}

[dir="rtl"] .modal-footer {
    text-align: left;
}

/* Pagination */
[dir="rtl"] .pagination {
    direction: rtl;
}

[dir="rtl"] .page-link {
    text-align: center;
}

/* Language Switcher */
[dir="rtl"] .language-switcher {
    direction: ltr;
}

[dir="rtl"] .language-switcher .dropdown-menu {
    right: auto;
    left: 0;
}

/* Icons */
[dir="rtl"] .ri-arrow-left-line:before {
    content: "\ea78"; /* arrow-right */
}

[dir="rtl"] .ri-arrow-right-line:before {
    content: "\ea77"; /* arrow-left */
}

[dir="rtl"] .ri-arrow-left-s-line:before {
    content: "\ea7a"; /* arrow-right-s */
}

[dir="rtl"] .ri-arrow-right-s-line:before {
    content: "\ea79"; /* arrow-left-s */
}

/* Custom Components */
[dir="rtl"] .premium-car-card,
[dir="rtl"] .premium-bike-card,
[dir="rtl"] .trip-card {
    text-align: right;
}

[dir="rtl"] .premium-car-card .card-body,
[dir="rtl"] .premium-bike-card .card-body,
[dir="rtl"] .trip-card .card-body {
    text-align: right;
}

[dir="rtl"] .rating-stars {
    direction: ltr;
    display: inline-block;
}

/* Search and Filter Components */
[dir="rtl"] .search-form {
    text-align: right;
}

[dir="rtl"] .filter-sidebar {
    text-align: right;
}

/* Footer */
[dir="rtl"] .footer {
    text-align: right;
}

[dir="rtl"] .footer .footer-widget {
    text-align: right;
}

/* Responsive RTL */
@media (max-width: 768px) {
    [dir="rtl"] .mobile-menu {
        text-align: right;
    }
    
    [dir="rtl"] .mobile-search {
        text-align: right;
    }
}

/* RTL Date Pickers */
[dir="rtl"] .daterangepicker {
    direction: ltr;
}

[dir="rtl"] .flatpickr-calendar {
    direction: ltr;
}

/* Blog and Content */
[dir="rtl"] .blog-post {
    text-align: right;
}

[dir="rtl"] .blog-post .post-meta {
    text-align: right;
}

[dir="rtl"] .comment-section {
    text-align: right;
}

/* Booking Forms */
[dir="rtl"] .booking-form {
    text-align: right;
}

[dir="rtl"] .booking-summary {
    text-align: right;
}

[dir="rtl"] .price-breakdown {
    text-align: right;
}

/* Lightbox RTL */
[dir="rtl"] .lightbox-container {
    direction: ltr;
}

[dir="rtl"] .lightbox-nav {
    direction: ltr;
}
