/* RTL Support for Arabic Language - Scoped to rer_case_api_ticket_website module only */

/* RTL Layout for Arabic - Only for this module's pages */
.rer-case-portal-page[lang="ar"], 
.rer-case-portal-page[lang="ar_001"],
.rer-case-portal-page.o_rtl {
    direction: rtl;
    text-align: right;
}

/* Form elements RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .form-group {
    text-align: right;
}

.rer-case-portal-page.o_rtl .form-control {
    text-align: right;
    direction: rtl;
}

.rer-case-portal-page.o_rtl .form-control::placeholder {
    text-align: right;
}

/* Labels RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl label {
    text-align: right;
    float: right;
}

/* Form row RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .form-row {
    direction: rtl;
}

.rer-case-portal-page.o_rtl .form-row .form-group {
    float: right;
}

/* Mobile input RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl #countrycode {
    float: right;
    margin-left: 0;
    margin-right: 2%;
}

.rer-case-portal-page.o_rtl #mobile {
    float: left;
    width: 75%;
}

/* Captcha RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .captcha-box {
    direction: rtl;
}

.rer-case-portal-page.o_rtl .captcha-box input {
    float: right;
    margin-left: 0;
}

.rer-case-portal-page.o_rtl .captcha-box canvas {
    float: right;
    margin-left: 0;
}

.rer-case-portal-page.o_rtl .captcha-box i {
    float: right;
    border-right: 1px solid #CED4DA;
    border-left: none;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    width: 14% !important;
}

/* Button RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .btn {
    text-align: center;
}

.rer-case-portal-page.o_rtl .pull-right {
    float: left !important;
}

.rer-case-portal-page.o_rtl .pull-left {
    float: right !important;
}

/* Table RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .cases-table {
    direction: rtl;
}

.rer-case-portal-page.o_rtl .cases-table th,
.rer-case-portal-page.o_rtl .cases-table td {
    text-align: right;
}

/* Search container RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .search-container {
    direction: rtl;
}

.rer-case-portal-page.o_rtl .search-container .form-control {
    text-align: right;
}

/* Modal RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .modal-content {
    direction: rtl;
}

.rer-case-portal-page.o_rtl .modal-body {
    text-align: right;
}

.rer-case-portal-page.o_rtl .modal-close-i {
    left: 15px;
    right: auto;
}

/* Phone selection modal - keep phone numbers LTR and centered */
.rer-case-portal-page.o_rtl #phone-list-container .form-check {
    direction: ltr;
    text-align: center;
}

.rer-case-portal-page.o_rtl #phone-list-container .form-check-label {
    direction: ltr;
}

/* Error messages RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .error-msg {
    text-align: right;
    direction: rtl;
}

/* Loading text RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .loader-text {
    text-align: center;
    direction: rtl;
}

/* User info RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .user-info {
    text-align: center;
    direction: rtl;
}

/* Case card RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .case-card {
    direction: rtl;
}

.rer-case-portal-page.o_rtl .case-header {
    direction: rtl;
}

.rer-case-portal-page.o_rtl .case-meta {
    direction: rtl;
}

/* Radio button RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl input[type="radio"] {
    margin-left: 8px;
    margin-right: 0;
}

/* Submit button container RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .submit-btn-div {
    direction: rtl;
}

.rer-case-portal-page.o_rtl .submit-btn-div .form-group {
    float: right;
}

/* OTP modal RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .grvotp-div {
    direction: rtl;
}

.rer-case-portal-page.o_rtl .grvotp-div .form-group {
    text-align: right;
}

.rer-case-portal-page.o_rtl .resend-otp-p {
    text-align: center;
    direction: rtl;
}

/* Error template RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .error-card {
    direction: rtl;
    text-align: center;
}

.rer-case-portal-page.o_rtl .error-message {
    text-align: center;
    direction: rtl;
}

/* No cases message RTL support - Scoped to this module */
.rer-case-portal-page.o_rtl .no-cases {
    text-align: center;
    direction: rtl;
}

/* Responsive RTL support - Scoped to this module */
@media (max-width: 768px) {
    .rer-case-portal-page.o_rtl .form-row .form-group {
        float: none;
        width: 100%;
    }
    
    .rer-case-portal-page.o_rtl #countrycode,
    .rer-case-portal-page.o_rtl #mobile {
        float: none;
        width: 100%;
        margin: 0;
    }
    
    .rer-case-portal-page.o_rtl .captcha-box input,
    .rer-case-portal-page.o_rtl .captcha-box canvas {
        float: none;
        width: 100%;
        margin: 0 0 10px 0;
    }
}

/* Font support for Arabic - Scoped to this module */
.rer-case-portal-page.o_rtl {
    font-family: 'Cairo', 'Tajawal', 'Amiri', 'Noto Sans Arabic', sans-serif;
}

/* Ensure proper text direction for mixed content - Scoped to this module */
.rer-case-portal-page.o_rtl .mixed-content {
    unicode-bidi: bidi-override;
}

/* Fix for reCAPTCHA in RTL - Scoped to this module */
.rer-case-portal-page.o_rtl .g-recaptcha {
    float: right;
    direction: ltr;
}

/* Fix for form validation messages - Scoped to this module */
.rer-case-portal-page.o_rtl .form-group.error .error-msg {
    text-align: right;
    direction: rtl;
}

/* Fix for table headers in RTL - Scoped to this module */
.rer-case-portal-page.o_rtl .cases-table thead th {
    text-align: right;
}

/* Fix for case number display - Scoped to this module */
.rer-case-portal-page.o_rtl .case-number {
    text-align: right;
    direction: ltr; /* Keep numbers LTR */
}

/* Fix for mobile number display - Scoped to this module */
.rer-case-portal-page.o_rtl .case-mobile {
    text-align: right;
    direction: ltr; /* Keep numbers LTR */
}

/* Fix for email display - Scoped to this module */
.rer-case-portal-page.o_rtl .case-email {
    text-align: right;
    direction: ltr; /* Keep email LTR */
}