/* 
 * Premium Custom Login Form for Janalight
 */

.jl-premium-auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    /* Background is now applied globally to body/wrapper via form-login.php */
}

.jl-premium-auth-container {
    display: flex;
    flex-direction: row-reverse; /* Arabic RTL */
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
}

/* Hero Section (Left side in RTL) */
.jl-auth-hero {
    flex: 1;
    background: #000; /* Dark premium background */
    color: #fff;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.jl-auth-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(219, 90, 0, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.jl-hero-icon {
    margin-bottom: 25px;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05); /* Very subtle circle */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden; /* Ensure logo stays inside */
    padding: 5px; /* Slight breathing room for logo */
}

.jl-hero-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.jl-hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff !important;
}

.jl-hero-desc {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
    margin-bottom: 30px;
}

/* Promotional Box */
.jl-promo-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    max-width: 350px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    margin-top: 20px;
}

.jl-promo-discount {
    position: absolute;
    top: 0;
    right: 0;
    background: #DB5A00;
    color: #fff;
    padding: 8px 15px;
    border-bottom-left-radius: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pulseDiscount 2s infinite;
}

@keyframes pulseDiscount {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(219, 90, 0, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(219, 90, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(219, 90, 0, 0); }
}

.jl-discount-text {
    font-size: 12px;
}

.jl-discount-value {
    font-size: 18px;
}

.jl-promo-content {
    margin-top: 30px;
    text-align: right;
}

.jl-promo-flex {
    display: flex;
    align-items: center;
    gap: 15px;
}

.jl-promo-img-wrapper {
    flex: 0 0 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 2px solid rgba(255,255,255,0.2);
}

.jl-promo-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jl-promo-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.jl-promo-title {
    font-size: 14px;
    color: #e2e8f0;
    margin-bottom: 8px !important;
    line-height: 1.4;
    font-weight: 600;
}

.jl-promo-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.jl-price-regular {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-decoration: line-through;
}

.jl-price-sale {
    font-size: 18px;
    color: #DB5A00;
    font-weight: bold;
}

.jl-promo-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    align-self: flex-start;
}

.jl-promo-btn:hover {
    background: #DB5A00;
    border-color: #DB5A00;
    color: #fff;
}

/* Form Area (Right side in RTL) */
.jl-auth-form-area {
    flex: 1.2;
    padding: 50px 60px;
    background: #fff;
}

/* Tab Buttons */
.jl-auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f1f3f5;
    padding: 6px;
    border-radius: 12px;
}

.jl-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jl-tab-btn.active {
    background: #fff;
    color: #DB5A00;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Panels */
.jl-auth-panels {
    position: relative;
    min-height: 400px;
}

.jl-auth-panel {
    display: none;
}

.jl-auth-panel.active {
    display: block;
}

/* Floating Labels & Inputs */
.jl-auth-panel p.form-row {
    margin-bottom: 20px;
    position: relative;
}

.jl-auth-panel label {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

/* Custom WooCommerce Notices Styling */
:is(.woocommerce-error, .woocommerce-info, .woocommerce-message) {
    background-color: #000000 !important;
    color: var(--notices-warning-color, #fff) !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* Inputs Enhanced Glowing Focus */
.jl-auth-panel input[type="text"],
.jl-auth-panel input[type="password"],
.jl-auth-panel input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: #fff;
    color: #212529;
}

.jl-auth-panel input:focus {
    border-color: #DB5A00 !important;
    box-shadow: 0 5px 15px rgba(219, 90, 0, 0.2) !important;
    transform: translateY(-1px);
    outline: none;
}

/* Custom Password Strength Meter */
.jl-auth-panel .woocommerce-password-strength {
    display: flex !important;
    align-items: center !important;
    height: 6px !important;
    border-radius: 4px !important;
    margin-top: 15px !important;
    margin-bottom: 5px !important;
    font-size: 0 !important; /* Hide text */
    overflow: hidden !important;
    position: relative !important;
    background: #e9ecef !important;
    padding: 0 !important;
    border: none !important;
}

.jl-auth-panel .woocommerce-password-strength::before {
    content: '' !important;
    position: absolute !important;
    right: 0 !important; /* RTL starts from right */
    top: 0 !important;
    height: 100% !important;
    transition: all 0.5s ease-in-out !important;
    border-radius: 4px !important;
}

.jl-auth-panel .woocommerce-password-strength.short::before { width: 25% !important; background: #dc3545 !important; box-shadow: 0 0 10px rgba(220, 53, 69, 0.6) !important; }
.jl-auth-panel .woocommerce-password-strength.bad::before { width: 50% !important; background: #ffc107 !important; box-shadow: 0 0 10px rgba(255, 193, 7, 0.6) !important; }
.jl-auth-panel .woocommerce-password-strength.good::before { width: 75% !important; background: #17a2b8 !important; box-shadow: 0 0 10px rgba(23, 162, 184, 0.6) !important; }
.jl-auth-panel .woocommerce-password-strength.strong::before { width: 100% !important; background: #28a745 !important; box-shadow: 0 0 10px rgba(40, 167, 69, 0.6) !important; }

/* Buttons */
.jl-auth-panel button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: #DB5A00;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 8px 15px rgba(219, 90, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.jl-auth-panel button[type="submit"]:hover {
    background: #cc5300;
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(219, 90, 0, 0.3);
}

/* Button Loading Spinner */
.jl-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: jlSpin 1s ease-in-out infinite;
}

@keyframes jlSpin {
    to { transform: rotate(360deg); }
}

/* Ken Burns Effect for Promo */
.jl-promo-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenBurns 5s ease-in-out infinite alternate;
    transform-origin: center;
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* Google Button Tweaks */
.jl-auth-panel .jl-google-login-container,
.jl-auth-panel .g_id_signin,
.jl-auth-panel .nsl-container {
    margin: 5px auto 10px auto !important; /* Reduced vertical space, centered horizontally */
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

/* Force Google/Social iframe or button to center */
.jl-auth-panel .g_id_signin iframe,
.jl-auth-panel .g_id_signin > div,
.jl-auth-panel .nsl-container .nsl-button {
    margin: 0 auto !important;
}

/* Slightly enlarge the button using scale if it's an unchangeable iframe */
.jl-auth-panel .g_id_signin {
    transform: scale(1.03);
    transform-origin: center;
}

/* Responsive */
@media (max-width: 900px) {
    .jl-premium-auth-wrapper {
        padding: 20px 15px; /* Reduced spacing on mobile */
        min-height: auto;
    }

    .jl-premium-auth-container {
        flex-direction: column-reverse; /* Form Area first, then Welcome Area */
    }
    
    .jl-auth-hero {
        padding: 25px 15px;
    }
    
    .jl-hero-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 15px;
    }
    
    .jl-hero-title {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .jl-hero-desc {
        margin-bottom: 20px;
    }
    
    .jl-auth-form-area {
        padding: 25px 15px;
    }
}

/* Animations */
@keyframes jlFadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
