/* ===================================================================
   CONTACT AND FORM PAGES RTL STYLES
   ================================================================== */

/* ===================================================================
   1. CONTACT US HERO SECTION RTL STYLES
   ================================================================== */

/* Contact hero content alignment */
html[dir="rtl"] .contact-hero-mobile {
    text-align: right !important;
}

html[dir="rtl"] .contact-hero-title,
html[dir="rtl"] .contact-hero-subtitle {
    text-align: right !important;
}

/* Contact hero text container */
html[dir="rtl"] .contact-hero-mobile .text-white {
    padding-right: 0 !important;
    padding-left: 2.5rem !important;
}

/* ===================================================================
   2. CONTACT FORM RTL STYLES
   ================================================================== */

/* Form container layout */
html[dir="rtl"] .contact-form-container {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .contact-form-container .lg\\:flex-row {
    flex-direction: row-reverse !important;
}

/* Form labels */
html[dir="rtl"] .contact-form label {
    text-align: right !important;
}

/* Form inputs */
html[dir="rtl"] .contact-form input,
html[dir="rtl"] .contact-form textarea,
html[dir="rtl"] .contact-form select {
    text-align: right !important;
    direction: rtl !important;
}

/* Form placeholders */
html[dir="rtl"] .contact-form input::placeholder,
html[dir="rtl"] .contact-form textarea::placeholder {
    text-align: right !important;
    direction: rtl !important;
}

/* Radio button groups */
html[dir="rtl"] .contact-form .inline-flex {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .contact-form .inline-flex span {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

/* Checkbox groups */
html[dir="rtl"] .contact-form .checkbox-group {
    flex-direction: row-reverse !important;
}

/* Submit button */
html[dir="rtl"] .contact-form .submit-btn {
    transform: skewX(12deg) !important;
    border-right: none !important;
    border-left: 2px solid !important;
}

html[dir="rtl"] .contact-form .submit-btn span {
    transform: skewX(-12deg) !important;
}

/* ===================================================================
   3. TEST DRIVE FORM RTL STYLES
   ================================================================== */

/* Test drive hero */
html[dir="rtl"] .test-drive-hero {
    text-align: right !important;
}

html[dir="rtl"] .test-drive-hero h1,
html[dir="rtl"] .test-drive-hero p {
    text-align: right !important;
}

/* Test drive form layout */
html[dir="rtl"] .test-drive-form {
    direction: rtl !important;
}

html[dir="rtl"] .test-drive-form .flex {
    flex-direction: row-reverse !important;
}

/* Model selection */
html[dir="rtl"] .model-selection {
    text-align: right !important;
}

html[dir="rtl"] .model-selection label {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .model-selection span {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

/* Form fields */
html[dir="rtl"] .test-drive-form input,
html[dir="rtl"] .test-drive-form select,
html[dir="rtl"] .test-drive-form textarea {
    text-align: right !important;
    direction: rtl !important;
}

/* ===================================================================
   4. FIND US PAGE RTL STYLES
   ================================================================== */

/* Find us hero */
html[dir="rtl"] .findus-hero-mobile {
    text-align: right !important;
}

html[dir="rtl"] .findus-hero-mobile h1,
html[dir="rtl"] .findus-hero-mobile p {
    text-align: right !important;
}

/* Location search */
html[dir="rtl"] .location-search {
    direction: rtl !important;
}

html[dir="rtl"] .location-search input {
    text-align: right !important;
    padding-right: 3rem !important;
    padding-left: 0.75rem !important;
}

/* Search icon positioning */
html[dir="rtl"] .location-search .search-icon {
    right: auto !important;
    left: 0.75rem !important;
}

/* Location list */
html[dir="rtl"] .location-list {
    text-align: right !important;
}

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

html[dir="rtl"] .location-item h3,
html[dir="rtl"] .location-item p {
    text-align: right !important;
}

/* ===================================================================
   5. FORM VALIDATION RTL STYLES
   ================================================================== */

/* Error messages */
html[dir="rtl"] .form-error {
    text-align: right !important;
}

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

/* Success messages */
html[dir="rtl"] .form-success {
    text-align: right !important;
}

/* Field validation indicators */
html[dir="rtl"] .field-valid {
    border-right: 2px solid green !important;
    border-left: none !important;
}

html[dir="rtl"] .field-invalid {
    border-right: 2px solid red !important;
    border-left: none !important;
}

/* ===================================================================
   6. RESPONSIVE RTL ADJUSTMENTS
   ================================================================== */

/* Mobile RTL adjustments */
@media (max-width: 768px) {
    html[dir="rtl"] .form-mobile-content {
        text-align: right !important;
    }
    
    html[dir="rtl"] .form-mobile-layout {
        direction: rtl !important;
    }
    
    html[dir="rtl"] .mobile-form-field {
        text-align: right !important;
    }
}

/* Desktop RTL adjustments */
@media (min-width: 769px) {
    html[dir="rtl"] .form-desktop-layout {
        flex-direction: row-reverse !important;
    }
    
    html[dir="rtl"] .form-desktop-content {
        text-align: right !important;
    }
}

/* ===================================================================
   7. GRID AND LAYOUT RTL ADJUSTMENTS
   ================================================================== */

/* Form grid layouts */
html[dir="rtl"] .form-grid {
    direction: rtl !important;
}

/* Form flex layouts */
html[dir="rtl"] .form-flex {
    flex-direction: row-reverse !important;
}

/* Two column form layouts */
html[dir="rtl"] .form-two-column {
    flex-direction: row-reverse !important;
}

/* ===================================================================
   8. BUTTON AND CTA RTL STYLES
   ================================================================== */

/* Form CTA buttons */
html[dir="rtl"] .form-cta {
    text-align: center !important;
}

/* Button hover effects */
html[dir="rtl"] .form-btn:hover {
    transform: translateX(-2px) skewX(12deg) !important;
}

/* Button icons */
html[dir="rtl"] .form-btn svg {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
    transform: scaleX(-1) !important;
}

/* Loading states */
html[dir="rtl"] .form-loading {
    flex-direction: row-reverse !important;
}

/* ===================================================================
   9. ANIMATION RTL ADJUSTMENTS
   ================================================================== */

/* Form slide animations */
html[dir="rtl"] .form-slide-in-left {
    animation: slideInRight 0.6s ease-out !important;
}

html[dir="rtl"] .form-slide-in-right {
    animation: slideInLeft 0.6s ease-out !important;
}

/* Form fade animations */
html[dir="rtl"] .form-fade-in-left {
    animation: fadeInRight 0.8s ease-out !important;
}

html[dir="rtl"] .form-fade-in-right {
    animation: fadeInLeft 0.8s ease-out !important;
}

/* ===================================================================
   10. TYPOGRAPHY RTL ADJUSTMENTS
   ================================================================== */

/* Form headings */
html[dir="rtl"] .form-heading {
    text-align: right !important;
}

/* Form paragraphs */
html[dir="rtl"] .form-paragraph {
    text-align: right !important;
}

/* Form lists */
html[dir="rtl"] .form-list {
    text-align: right !important;
    padding-right: 1.5rem !important;
    padding-left: 0 !important;
}

/* ===================================================================
   11. SPECIFIC FORM COMPONENTS RTL
   ================================================================== */

/* Date picker */
html[dir="rtl"] .date-picker {
    direction: rtl !important;
}

/* Time picker */
html[dir="rtl"] .time-picker {
    direction: rtl !important;
}

/* File upload */
html[dir="rtl"] .file-upload {
    text-align: right !important;
}

html[dir="rtl"] .file-upload-label {
    text-align: right !important;
}

/* Progress indicators */
html[dir="rtl"] .form-progress {
    flex-direction: row-reverse !important;
}

/* Step indicators */
html[dir="rtl"] .form-steps {
    flex-direction: row-reverse !important;
}

/* ===================================================================
   12. ACCESSIBILITY RTL IMPROVEMENTS
   ================================================================== */

/* Focus indicators */
html[dir="rtl"] .form-focus:focus {
    border-right: 2px solid #172154 !important;
    border-left: none !important;
}

/* Screen reader text */
html[dir="rtl"] .form-sr-only {
    direction: rtl !important;
}

/* Required field indicators */
html[dir="rtl"] .required-indicator {
    right: auto !important;
    left: 0 !important;
}

/* ===================================================================
   13. PRINT STYLES RTL
   ================================================================== */

@media print {
    html[dir="rtl"] .form-print {
        direction: rtl !important;
        text-align: right !important;
    }
}
