/*
RTL (Right-to-Left) Styles for RentQ Theme
*/

/* RTL Direction */
body.rtl {
    direction: rtl;
    text-align: right;
}

/* Typography RTL */
.rtl h1, .rtl h2, .rtl h3, .rtl h4, .rtl h5, .rtl h6 {
    text-align: right;
}

/* Navigation RTL */
.rtl .main-navigation ul {
    flex-direction: row-reverse;
}

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

.rtl .site-branding {
    margin-left: 0;
    margin-right: auto;
}

.rtl .header-actions {
    margin-right: 0;
    margin-left: auto;
}

/* Forms RTL */
.rtl .search-form-grid {
    direction: rtl;
}

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

.rtl .form-input,
.rtl .form-select {
    text-align: right;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

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

.rtl .car-basic-info {
    flex-direction: row-reverse;
}

.rtl .car-basic-info span:not(:last-child)::after {
    margin-right: 0;
    margin-left: 0.5rem;
}

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

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

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

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

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

/* Footer RTL */
.rtl .footer-content {
    direction: rtl;
}

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

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

/* Breadcrumb RTL */
.rtl .breadcrumb nav {
    direction: rtl;
}

.rtl .separator {
    transform: scaleX(-1);
}

/* Buttons RTL */
.rtl .btn {
    direction: rtl;
}

.rtl .btn-icon {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Grid RTL */
.rtl .cars-grid {
    direction: rtl;
}

.rtl .features-grid {
    direction: rtl;
}

.rtl .steps-grid {
    direction: rtl;
}

/* Filters RTL */
.rtl .filters-grid {
    direction: rtl;
}

.rtl .active-filters-list {
    flex-direction: row-reverse;
}

.rtl .filter-group {
    text-align: right;
}

/* Single Car RTL */
.rtl .car-details-grid {
    direction: rtl;
}

.rtl .specs-grid {
    direction: rtl;
}

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

.rtl .features-grid {
    direction: rtl;
}

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

/* Gallery RTL */
.rtl .thumbnail-images {
    direction: rtl;
}

/* Responsive RTL */
@media (max-width: 768px) {
    .rtl .header-content {
        flex-direction: column;
    }
    
    .rtl .main-navigation ul {
        flex-direction: column;
    }
    
    .rtl .search-form-grid {
        direction: rtl;
    }
    
    .rtl .car-actions {
        flex-direction: column;
    }
}

/* Animation RTL */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.rtl .slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.rtl .slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Custom RTL Utilities */
.rtl .text-right {
    text-align: right !important;
}

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

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

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

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

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

/* Persian/Arabic Number Support */
.rtl .persian-numbers {
    font-feature-settings: "ss01" on;
}

/* Fix for Persian fonts */
.rtl {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
}

/* Custom scrollbar RTL */
.rtl ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.rtl ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.rtl ::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.rtl ::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Table RTL */
.rtl table {
    direction: rtl;
}

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

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

.rtl li {
    text-align: right;
}

/* Quote RTL */
.rtl blockquote {
    border-right: 4px solid #3b82f6;
    border-left: none;
    padding-right: 1rem;
    padding-left: 0;
    margin-right: 0;
    margin-left: 1rem;
}

/* Code RTL */
.rtl code,
.rtl pre {
    direction: ltr;
    text-align: left;
}

/* Image alignment RTL */
.rtl .alignright {
    float: left;
    margin: 0 1rem 1rem 0;
}

.rtl .alignleft {
    float: right;
    margin: 0 0 1rem 1rem;
}

/* WordPress specific RTL */
.rtl .wp-caption {
    text-align: right;
}

.rtl .wp-caption-text {
    text-align: right;
}

/* Comments RTL */
.rtl .comment-list {
    padding-right: 0;
    padding-left: 0;
}

.rtl .comment {
    text-align: right;
}

/* Menu RTL */
.rtl .menu-toggle {
    margin-left: 0;
    margin-right: auto;
}

.rtl .menu-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* Dropdown RTL */
.rtl .user-dropdown {
    right: auto;
    left: 0;
}

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

.rtl .page-numbers {
    margin: 0 0.25rem;
}

/* Search RTL */
.rtl .search-form {
    direction: rtl;
}

.rtl .search-input {
    text-align: right;
    padding-right: 1rem;
    padding-left: 3rem;
}

.rtl .search-button {
    right: auto;
    left: 0.5rem;
}

/* Modal RTL */
.rtl .modal-content {
    direction: rtl;
    text-align: right;
}

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

.rtl .modal-close {
    margin-right: auto;
    margin-left: 0;
}

/* Tooltip RTL */
.rtl .tooltip {
    direction: rtl;
}

/* Tab RTL */
.rtl .tab-list {
    flex-direction: row-reverse;
}

.rtl .tab-content {
    text-align: right;
}

/* Accordion RTL */
.rtl .accordion-header {
    text-align: right;
}

.rtl .accordion-icon {
    margin-left: 0;
    margin-right: auto;
}

/* Progress RTL */
.rtl .progress-bar {
    direction: ltr;
}

/* Badge RTL */
.rtl .badge {
    margin-left: 0;
    margin-right: 0.5rem;
}

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

.rtl .alert-icon {
    margin-left: 0;
    margin-right: 0.75rem;
}

/* Loading RTL */
.rtl .loading-spinner {
    direction: ltr;
}

/* Print RTL */
@media print {
    .rtl * {
        direction: rtl !important;
        text-align: right !important;
    }
    
    .rtl code,
    .rtl pre {
        direction: ltr !important;
        text-align: left !important;
    }
}

