/* RTL layout for Arabic registration page — load after styles.css */

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

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

html[dir="rtl"] .brand-pill-nav {
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
}

html[dir="rtl"] .brand-identity {
    flex-direction: row;
    justify-content: flex-end;
    order: 0;
    margin-inline-start: 0;
    margin-inline-end: 0;
}

/* Force logo on the right, Arabic brand text to its left */
html[dir="rtl"] .brand-mark-link {
    order: 2;
}

html[dir="rtl"] .brand-monks {
    order: 1;
}

html[dir="rtl"] .brand-actions {
    order: 0;
    margin-inline-start: 0;
    margin-inline-end: 0;
    direction: ltr;
}

/* Arabic brand word in RTL context */
html[dir="rtl"] .brand-monks .monks-word {
    direction: rtl;
    unicode-bidi: plaintext;
    display: inline-block;
}

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

html[dir="rtl"] .form-group label {
    text-transform: none;
    letter-spacing: 0.02em;
    text-align: right;
}

html[dir="rtl"] .form-group small {
    text-align: right;
    padding-right: 2px;
    padding-left: 0;
}

html[dir="rtl"] .form-group input {
    text-align: right;
}

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

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

html[dir="rtl"] .success-details strong {
    min-width: 0;
}

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

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

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

html[dir="rtl"] .showcase-track {
    animation-direction: reverse;
}

/* Keep Arabic page RTL, but make showcase marquee behave like English */
html[dir="rtl"] .showcase-carousel,
html[dir="rtl"] .showcase-track {
    direction: ltr;
}

html[dir="rtl"] .showcase-track {
    animation-direction: normal;
}

html[dir="rtl"] .lang-switch {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

/* Responsive fixes for Arabic mobile layout */
@media (max-width: 768px) {
    html[dir="rtl"] .brand-pill-nav {
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    html[dir="rtl"] .brand-identity {
        justify-content: flex-end;
        width: auto;
        gap: 10px;
        min-width: 0;
    }

    html[dir="rtl"] .brand-actions {
        display: inline-flex;
        margin-inline-start: 0;
        margin-inline-end: 0;
        direction: ltr; /* Keep AR + menu icon visual order stable */
    }
}

@media (max-width: 600px) {
    html[dir="rtl"] .brand-pill {
        align-items: center;
        flex-direction: row;
    }

    html[dir="rtl"] .brand-pill-nav {
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
    }

    html[dir="rtl"] .brand-identity {
        order: 0;
        width: auto;
        justify-content: flex-end;
        margin-inline-start: 0;
        margin-inline-end: 0;
    }

    html[dir="rtl"] .brand-actions {
        order: 0;
        display: inline-flex;
        margin-inline-start: 0;
        margin-inline-end: 0;
    }

    html[dir="rtl"] .brand-monks .monks-word {
        font-size: clamp(20px, 7.2vw, 28px);
    }

    html[dir="rtl"] .promo-panel {
        min-height: 300px;
        padding: 18px 14px;
    }

    html[dir="rtl"] .promo-line-static,
    html[dir="rtl"] .promo-rotator-track span {
        font-size: clamp(34px, 11vw, 48px);
        line-height: 1.08;
    }

    html[dir="rtl"] .promo-subtitle {
        font-size: 16px;
        line-height: 1.35;
    }
}
