/* RTL overrides for Arabic (ar) */

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

/* Mirror margins and paddings */
html[dir="rtl"] .wrapper {
    direction: rtl;
}

html[dir="rtl"] header {
    direction: rtl;
}

/* Form fields */
html[dir="rtl"] .field input,
html[dir="rtl"] .field textarea {
    text-align: right;
}

html[dir="rtl"] .field label {
    text-align: right;
}

/* Chat area */
html[dir="rtl"] .chat-area {
    direction: rtl;
}

html[dir="rtl"] .typing-area {
    flex-direction: row-reverse;
}

html[dir="rtl"] .typing-area .input-field {
    text-align: right;
}

html[dir="rtl"] .chat.outgoing {
    text-align: left;
}

html[dir="rtl"] .chat.incoming {
    text-align: right;
}

html[dir="rtl"] .chat.outgoing .details {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .chat.incoming .details {
    margin-right: 0;
    margin-left: auto;
}

/* Home page */
html[dir="rtl"] .user-info .box {
    flex-direction: row-reverse;
}

html[dir="rtl"] .user-info .box-text {
    text-align: right;
}

html[dir="rtl"] .link-name-home {
    direction: rtl;
}

html[dir="rtl"] .link-title-home {
    text-align: right;
}

/* Info chat back button */
html[dir="rtl"] .info-chat {
    flex-direction: row-reverse;
}

html[dir="rtl"] .info-chat .image i {
    transform: scaleX(-1);
}

/* Sidebar */
html[dir="rtl"] .chat-sidebar {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Copy buttons */
html[dir="rtl"] .copy-button {
    text-align: right;
}

/* Popup windows */
html[dir="rtl"] .window-popup-setting-link,
html[dir="rtl"] .window-popup-insert {
    direction: rtl;
    text-align: right;
}

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

/* Notification switches — keep LTR for toggles */
html[dir="rtl"] .checkbox {
    direction: ltr;
}

/* Statistics */
html[dir="rtl"] .wrapper-stat {
    direction: rtl;
    text-align: right;
}

/* Auth forms - Google button */
html[dir="rtl"] .google-btn {
    flex-direction: row-reverse;
}

/* Landing page */
html[dir="rtl"] body.landing-page {
    font-family: "Noto Sans Arabic", Inter, ui-sans-serif, system-ui, sans-serif;
}

@media (min-width: 1024px) {
    html[dir="rtl"] body.landing-page section[aria-labelledby="landing-hero-title"] > div > .flex {
        flex-direction: row-reverse;
    }
}

html[dir="rtl"] body.landing-page .hero-float-step {
    left: auto;
    right: 0;
}

html[dir="rtl"] body.landing-page .hero-float-inventory {
    right: auto;
    left: 0;
}

@media (min-width: 640px) {
    html[dir="rtl"] body.landing-page .hero-float-step {
        right: -2.5rem;
    }

    html[dir="rtl"] body.landing-page .hero-float-inventory {
        left: -2.5rem;
    }
}

html[dir="rtl"] body.landing-page .fa-check-circle.mr-3,
html[dir="rtl"] body.landing-page .fa-check.mr-2 {
    margin-right: 0;
}

html[dir="rtl"] body.landing-page .fa-check-circle.mr-3 {
    margin-left: 0.75rem;
}

html[dir="rtl"] body.landing-page .fa-check.mr-2 {
    margin-left: 0.5rem;
}
