/* ============================================
   AUTH MODAL - DARK GOLD SPLIT DESIGN
   Created for ESPOIR Golden Store
   ============================================ */

/* 1. MODAL CONTAINER - Split Design with Image - FORCED RTL */
.auth-modal-content.auth-split-design {
    display: flex !important;
    flex-direction: row !important;
    direction: rtl !important;
    /* Keep fixed RTL layout for all languages */
    background: #000 !important;
    max-width: 1100px !important;
    width: 95% !important;
    padding: 0 !important;
    border-radius: 20px !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(197, 160, 89, 0.3) !important;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden !important;
    will-change: transform, opacity;
}

/* Show Image Side - Left 65% */
.auth-image-side {
    display: flex !important;
    width: 65% !important;
    position: relative !important;
    background: #000 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

/* Form Side - Right 35% Dark Background */
.auth-form-side {
    width: 35% !important;
    padding: 2.5rem 2rem !important;
    background: #000 !important;
    position: relative !important;
    min-height: 500px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Custom Scrollbar for Auth Form - HIDDEN */
.auth-form-side::-webkit-scrollbar {
    display: none;
}

.auth-form-side {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Auth Benefits Overlay - Individual Golden Cards */
.auth-benefits-overlay {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: auto;
    max-width: 320px;
    padding: 0.5rem;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #fff;
    padding: 1rem 1.2rem;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.2), rgba(197, 160, 89, 0.1));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
    transition: all 0.3s ease;
    will-change: transform;
}

.benefit-item:hover {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.3), rgba(197, 160, 89, 0.15));
    border-color: rgba(197, 160, 89, 0.6);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.4);
    transform: translateX(-5px) scale(1.02);
}

.benefit-icon {
    font-size: 1.8rem;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.benefit-text {
    flex: 1;
}

.benefit-text h4 {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    font-family: var(--font-serif);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(0, 0, 0, 0.8),
        2px 2px 4px rgba(0, 0, 0, 1);
    letter-spacing: 0.3px;
}

.benefit-text p {
    color: rgba(255, 255, 255, 1);
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0;
    font-weight: 500;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9),
        0 0 15px rgba(0, 0, 0, 0.7),
        1px 1px 3px rgba(0, 0, 0, 1);
}

/* 2. PREMIUM CLOSE BUTTON - Top LEFT Position */
.close-auth-modal {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    right: auto !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 500;
    color: #666;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.close-auth-modal:hover {
    background: rgba(197, 160, 89, 0.15);
    color: var(--accent);
    border-color: var(--accent);
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}

/* 3. AUTH TABS - Gold Underline */
.auth-tabs {
    display: flex !important;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
    visibility: visible !important;
    opacity: 1 !important;
}

.auth-tab {
    background: none !important;
    border: none !important;
    color: #999 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    padding: 0.8rem 0 !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    visibility: visible !important;
}

.auth-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.auth-tab.active {
    color: var(--accent);
}

.auth-tab.active::after {
    transform: scaleX(1);
}

.auth-tab:hover:not(.active) {
    color: #ccc;
}

/* 4. FORM TITLE - Gold Welcome Text */
.auth-form h3 {
    color: var(--accent) !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-bottom: 2rem !important;
    font-family: var(--font-serif) !important;
    padding-bottom: 0 !important;
}

.auth-form h3::after {
    display: none !important;
}

/* 5. AUTH FIELD - Dark Theme Design */
.auth-field {
    position: relative;
    margin-bottom: 1.5rem;
}

.auth-field input,
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100% !important;
    padding: 1.2rem 1.5rem !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    text-align: right !important;
    direction: rtl !important;
}

.auth-field label {
    position: absolute !important;
    top: -10px !important;
    right: 12px !important;
    background: #000 !important;
    padding: 0 8px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.75rem !important;
    font-weight: 400 !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

.auth-field input:focus,
.auth-form input:focus {
    background: rgba(0, 0, 0, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15) !important;
}

.auth-field input:focus+label {
    color: #fff !important;
}

.auth-field input:hover:not(:focus),
.auth-form input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(0, 0, 0, 0.6) !important;
}

/* --- LANGUAGE SPECIFIC INPUT ALIGNMENT (Inside Fixed RTL Modal) --- */

/* Arabic (Default inside RTL modal) */
.auth-field input {
    text-align: right !important;
    direction: rtl !important;
}

.auth-field label {
    right: 12px !important;
    left: auto !important;
}

.toggle-password {
    left: 12px !important;
    right: auto !important;
}

/* English & French (LTR Text flow) */
html[dir="ltr"] .auth-field input {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] .auth-field label {
    left: 12px !important;
    right: auto !important;
}

html[dir="ltr"] .toggle-password {
    right: 12px !important;
    left: auto !important;
}

/* Password field padding adjustments to avoid overlapping with the eye */
.password-wrapper input {
    padding-left: 3rem !important;
    /* Space for eye on the left (RTL) */
    padding-right: 1.2rem !important;
}

html[dir="ltr"] .password-wrapper input {
    padding-right: 3rem !important;
    /* Space for eye on the right (LTR) */
    padding-left: 1.2rem !important;
}

.auth-helper {
    text-align: right;
    margin-bottom: 1.5rem;
}

html[dir="ltr"] .auth-helper {
    text-align: left !important;
}

/* --- END LANGUAGE SPECIFIC --- */

/* 6. PASSWORD FIELD - Fixed Eye Icon Style */
.toggle-password {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    color: #666 !important;
    cursor: pointer !important;
    padding: 5px !important;
    display: flex !important;
    align-items: center !important;
    z-index: 10 !important;
    transition: color 0.3s ease !important;
}

.toggle-password:hover {
    color: var(--accent) !important;
}

/* 7. FORGOT PASSWORD LINK */
.auth-helper a {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.auth-helper a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

/* 8. CAPTCHA CONTAINER */
.auth-captcha {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

/* 9. AUTH BUTTONS - Gold Theme */
.btn-auth {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-auth-primary {
    background: linear-gradient(135deg, #d4af37, #c5a059);
    color: #000;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.btn-auth-primary:hover {
    background: linear-gradient(135deg, #c5a059, #b8933d);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.4);
    transform: translateY(-2px);
}

.btn-auth-primary:active {
    transform: translateY(0);
}

/* 10. AUTH DIVIDER */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    opacity: 0.5;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.auth-divider span {
    padding: 0 1rem;
    color: #999;
    font-size: 0.9rem;
}

/* 11. GOOGLE BUTTON */
.btn-auth-google {
    background: #fff;
    color: #444;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.btn-auth-google:hover {
    background: #f8f8f8;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .auth-modal-content.auth-split-design {
        flex-direction: column !important;
        max-width: 95% !important;
        width: 95% !important;
        border-radius: 16px !important;
        max-height: 95vh;
    }

    .auth-image-side {
        width: 100% !important;
        height: 45vh !important;
        min-height: 45vh !important;
        max-height: 45vh !important;
        order: -1;
    }

    .auth-benefits-overlay {
        top: 1rem;
        right: 0.5rem;
        max-width: 170px;
        padding: 0.3rem;
        gap: 0.5rem;
    }

    .benefit-item {
        padding: 0.5rem 0.6rem;
        gap: 0.4rem;
    }

    .benefit-icon {
        font-size: 1.1rem;
        min-width: 24px;
        height: 24px;
    }

    .benefit-text h4 {
        font-size: 0.65rem;
        margin-bottom: 0.1rem;
    }

    .benefit-text p {
        font-size: 0.55rem;
        line-height: 1.1;
    }

    .auth-form-side {
        width: 100% !important;
        padding: 2rem 1.5rem !important;
        min-height: auto !important;
    }

    .close-auth-modal {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        top: 15px !important;
        left: 15px !important;
    }

    .auth-form h3 {
        font-size: 1.2rem !important;
    }

    .auth-tabs {
        gap: 2rem;
    }

    .auth-tab {
        font-size: 0.9rem;
    }
}