
/* ELEA_STOREFRONT_RTL_V2 */

/*
 * Arabic font support:
 * Laravel uses "sa" for Arabic on this installation.
 * "ar" remains supported.
 */

html[dir="rtl"] body,
html[lang="sa"] body,
html[lang="ar"] body,
html[lang^="ar-"] body {
    font-family:
        "Cairo",
        "Open Sans",
        Tahoma,
        sans-serif !important;
}

/* Consistent typography for native form controls */

html[dir="rtl"] body input,
html[dir="rtl"] body textarea,
html[dir="rtl"] body select,
html[dir="rtl"] body button {
    font-family: inherit;
}

/*
 * Avoid reversing email addresses, telephone numbers,
 * URLs, and numerical input values.
 */

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="password"] {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Standard RTL alignment for form text */

html[dir="rtl"] .form-group > label,
html[dir="rtl"] .col-form-label,
html[dir="rtl"] .col-from-label {
    text-align: start;
}

/* Maintain correct Arabic wrapping */

html[dir="rtl"] body {
    overflow-wrap: break-word;
}

/* RTL-safe shared ÉLÉA spacing utilities */

.elea-inline-start {
    margin-inline-start: var(--elea-space-2, 8px);
}

.elea-inline-end {
    margin-inline-end: var(--elea-space-2, 8px);
}

.elea-text-start {
    text-align: start;
}

.elea-text-end {
    text-align: end;
}

.elea-padding-inline {
    padding-inline:
        var(--elea-space-4, 16px);
}

/* Theme-linked focus style for shared form controls */

body.elea-storefront .form-control:focus {
    border-color:
        var(--elea-theme-primary, var(--primary));
}

/* Consistent field-label appearance */

body.elea-storefront .form-group > label,
body.elea-storefront .col-form-label {
    font-family: inherit;
    font-size: var(--elea-text-sm, 13px);
    font-weight: var(--elea-weight-medium, 500);
}

/* Basic border consistency without forcing card sizes */

body.elea-storefront .form-control {
    border-radius: var(--elea-radius, 6px);
}

/*
 * Optional class for directional arrows only.
 * Do not reverse every icon or product image.
 */

html[dir="rtl"] .elea-rtl-mirror {
    transform: scaleX(-1);
}

/* Preserve natural direction for product codes */

.elea-ltr-value {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Mobile: prevent excessive text expansion */

@media (max-width: 767px) {
    body.elea-storefront {
        overflow-wrap: break-word;
    }
}
