/**
 * FORCED RTL Support - Critical Override
 * 
 * This file contains !important rules to force RTL layout
 * when the Arabic language is active
 * 
 * @package Sokna
 * @since 1.0.0
 */

/* ============================================
   FORCE RTL DIRECTION GLOBALLY
   ============================================ */
html[dir="rtl"] {
    direction: rtl !important;
}

html[dir="rtl"] body {
    direction: rtl !important;
    text-align: start !important;
}

/* ============================================
   FORCE CAIRO FONT FOR ARABIC
   ============================================ */
html[dir="rtl"],
html[dir="rtl"] * {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}

/* ============================================
   FORCE LAYOUT FLIP
   ============================================ */

/* Container */
html[dir="rtl"] .container,
html[dir="rtl"] .container-fluid {
    direction: rtl !important;
}

/* Navigation */
html[dir="rtl"] .nav-wrapper {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .header-actions {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .nav-menu {
    flex-direction: row-reverse !important;
}

/* Mobile Drawer - Force Left Side */
html[dir="rtl"] .mobile-drawer {
    right: auto !important;
    left: 0 !important;
    transform: translateX(-100%) !important;
}

html[dir="rtl"] .mobile-drawer.is-open {
    transform: translateX(0) !important;
}

/* Search Form - Force RTL Grid */
html[dir="rtl"] .search-form {
    direction: rtl !important;
}

@media (min-width: 768px) {
    html[dir="rtl"] .search-form {
        grid-template-columns: auto 1.2fr 1.2fr 2fr !important;
    }
}

html[dir="rtl"] .search-field {
    direction: rtl !important;
}

html[dir="rtl"] .search-input,
html[dir="rtl"] .search-select {
    direction: rtl !important;
    text-align: start !important;
}

/* Search Button */
html[dir="rtl"] .search-submit {
    flex-direction: row-reverse !important;
}

/* Quick Links */
html[dir="rtl"] .quick-links {
    flex-direction: row-reverse !important;
}

/* Footer */
html[dir="rtl"] .footer-grid {
    direction: rtl !important;
}

html[dir="rtl"] .footer-bottom-inner {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .contact-item {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .footer-social {
    flex-direction: row-reverse !important;
}

/* Hero Section + تابز البحث: النص في وسط التاب */
html[dir="rtl"] .hero-search-tab {
    text-align: center !important;
}

html[dir="rtl"] .hero-text {
    direction: rtl !important;
    text-align: center !important;
}

html[dir="rtl"] .hero-title,
html[dir="rtl"] .hero-subtitle {
    direction: rtl !important;
    text-align: center !important;
}

/* Properties Grid */
html[dir="rtl"] .properties-grid {
    direction: rtl !important;
}

/* Value Props */
html[dir="rtl"] .props-grid {
    direction: rtl !important;
}

/* Buttons with Icons */
html[dir="rtl"] .btn {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .btn-account {
    flex-direction: row-reverse !important;
}

/* ============================================
   DROPDOWN ARROW POSITION
   ============================================ */
html[dir="rtl"] .search-select {
    background-position: 8px center !important;
    padding-inline-start: var(--space-3) !important;
    padding-inline-end: 0 !important;
}

/* ============================================
   TEXT ALIGNMENT
   ============================================ */
html[dir="rtl"] p,
html[dir="rtl"] span,
html[dir="rtl"] div {
    text-align: start !important;
}

html[dir="rtl"] .text-center {
    text-align: center !important;
}

/* ============================================
   DRAWER HEADER
   ============================================ */
html[dir="rtl"] .drawer-header {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .drawer-languages ul {
    flex-direction: row-reverse !important;
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
html[dir="rtl"] .language-switcher ul {
    flex-direction: row-reverse !important;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
html[dir="rtl"] :focus-visible {
    outline-offset: 2px !important;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    html[dir="rtl"] {
        direction: rtl !important;
    }
}

