/* RTL Layout Overrides for Jeffix Authentication */
/* Add this CSS file when you need RTL (Right-to-Left) layout support */

/* Update HTML element attributes for RTL */
html[data-textdirection="rtl"] {
    direction: rtl;
    text-align: right;
}

body.rtl {
    direction: rtl;
    text-align: right;
}

/* Hero Section RTL */
.rtl .jeffix-hero-content {
    text-align: right;
}

.rtl .jeffix-tagline {
    text-align: right;
}

.rtl .jeffix-logo {
    text-align: right;
}

.rtl .jeffix-main-heading {
    text-align: right;
}

.rtl .jeffix-description {
    text-align: right;
}

/* Login Section RTL */
.rtl .jeffix-login-header {
    text-align: center; /* Keep center alignment for titles */
}

.rtl .jeffix-welcome-title {
    text-align: center;
}

.rtl .jeffix-welcome-subtitle {
    text-align: center;
}

/* Form Elements RTL */
.rtl .jeffix-label {
    text-align: right;
}

/* Input Wrapper RTL - Flip icon positions */
.rtl .jeffix-input-wrapper {
    flex-direction: row-reverse;
}

.rtl .jeffix-input-icon {
    left: auto;
    right: 15px;
}

.rtl .jeffix-form-control {
    padding: 16px 45px 16px 50px; /* Flip padding for RTL */
    text-align: right;
}

.rtl .jeffix-toggle-password {
    right: auto;
    left: 15px;
}

/* Checkbox RTL */
.rtl .jeffix-checkbox-container {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rtl .jeffix-checkmark {
    margin-right: 0;
    margin-left: 10px;
}

.rtl .jeffix-checkbox-text {
    text-align: right;
}

/* Button Text RTL */
.rtl .jeffix-sign-in-btn {
    flex-direction: row-reverse;
}

.rtl .jeffix-btn-icon {
    transform: scaleX(-1); /* Flip arrow direction */}

.rtl .jeffix-sign-in-btn:hover .jeffix-btn-icon {
    transform: scaleX(-1) translateX(5px);
}

/* Additional Options RTL */
.rtl .jeffix-additional-options {
    text-align: center; /* Keep links centered */
}

/* Error Messages RTL */
.rtl .jeffix-error-message {
    text-align: right;
}

.rtl .invalid-feedback {
    text-align: right;
}

/* Language Switcher RTL */
.rtl .jeffix-language-switcher {
    direction: ltr; /* Keep language buttons in LTR order */
}

/* Animations RTL Adjustments */
@keyframes jeffix-fadeInRight-rtl {
    from {
        opacity: 0;
        transform: translateX(-30px); /* Flip direction for RTL */
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rtl .jeffix-login-container {
    animation: jeffix-fadeInRight-rtl 1s ease-out 0.5s both;
}

/* Responsive RTL Adjustments */
@media (max-width: 1024px) {
    /* RTL layout maintained in responsive breakpoints */
}

@media (max-width: 768px) {
    .rtl .jeffix-hero-content {
        text-align: right;
    }

    .rtl .jeffix-login-container {
        text-align: right;
    }

    .rtl .jeffix-login-header {
        text-align: center; /* Keep titles centered */
    }
}

@media (max-width: 480px) {
    .rtl .jeffix-form-control {
        padding: 14px 40px 14px 45px; /* Adjust padding for mobile RTL */
        text-align: right;
    }
}

/* Loading Spinner RTL */
.rtl .jeffix-loading-spinner {
    margin-left: 0;
    margin-right: 10px;
}

/* Custom Scrollbar RTL */
.rtl ::-webkit-scrollbar {
    /* Scrollbar appears on left side in RTL */
}

/* Grid Layout RTL Override for Desktop */
@media (min-width: 1025px) {
    .rtl .jeffix-container {
        /* In RTL, login form appears on left, hero on right */
        grid-template-columns: 1fr 1fr;
    }

    /* If you want to swap the order visually for RTL */
    .rtl .jeffix-hero-section {
        order: 2;
    }

    .rtl .jeffix-login-section {
        order: 1;
    }
}

/* Typography RTL */
.rtl body {
    font-family: 'Inter', 'Tajawal', 'Amiri', 'Noto Sans Arabic', sans-serif;
}

/* Text Selection RTL */
.rtl ::selection {
    direction: rtl;
}

.rtl ::-moz-selection {
    direction: rtl;
}

/* Laravel Form Integration RTL */
.rtl .form-group {
    text-align: right;
}

.rtl .text-bold-600 {
    text-align: right;
}

/* Bootstrap overrides for RTL */
.rtl .d-flex {
    flex-direction: row-reverse;
}

.rtl .justify-content-between {
    justify-content: space-between;
}

.rtl .align-items-center {
    /* Keep center alignment */
}
