/* ========================================= */
/* auth.css - Getix Event Tickets            */
/* Premium Split Design | Mobile-First       */
/* releases\dev\public_html\css\auth.css     */
/* ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;600;700;900&display=swap');

:root {
    /* ---- צבעים מקוריים ---- */
    --purple:        #7b2cbf;
    --purple-dark:   #5a189a;
    --purple-light:  #9d4edd;
    --purple-glow:   rgba(123, 44, 191, 0.25);
    --blue:          #3b82f6;
    --blue-dark:     #2563eb;
    --blue-glow:     rgba(59, 130, 246, 0.3);
    --green:         #10b981;
    --green-dark:    #059669;
    --green-glow:    rgba(16, 185, 129, 0.3);

    /* ---- מערכת עיצוב ---- */
    --surface:       #ffffff;
    --surface-2:     #f8fafc;
    --surface-3:     #f1f5f9;
    --border:        #e1e5ee;
    --text:          #1e293b;
    --text-muted:    #64748b;
    --text-light:    #94a3b8;
    --radius:        12px;
    --radius-lg:     20px;
    --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-card:   0 20px 50px rgba(90, 24, 154, 0.12), 0 4px 12px rgba(0,0,0,0.08);
}

/* ========================================= */
/* עטיפה ראשית                               */
/* ========================================= */

.auth-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 70px);
    padding: 100px 20px 48px;
    direction: rtl;
    font-family: 'Heebo', sans-serif;
}

/* ========================================= */
/* קופסה ראשית                               */
/* ========================================= */

.auth-box {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    width: 100%;
    max-width: 950px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    z-index: 10;
    animation: authAppear 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes authAppear {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========================================= */
/* צד המידע — gradient סגול                 */
/* ========================================= */

.auth-info-side {
    background: linear-gradient(145deg, var(--purple-light) 0%, var(--purple) 45%, var(--purple-dark) 100%);
    color: #ffffff;
    padding: 52px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* עיגול רקע עדין */
.auth-info-side::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -40%;
    width: 180%;
    height: 180%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.12) 0%, transparent 55%);
    pointer-events: none;
}

/* עיגול תחתי דקורטיבי */
.auth-info-side::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}

.auth-logo {
    max-width: 150px;
    margin-bottom: 40px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
    position: relative;
    z-index: 1;
}

.auth-info-content {
    position: relative;
    z-index: 1;
}

.auth-info-content h2 {
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    letter-spacing: -0.3px;
}

.auth-info-content p {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.88;
    margin-bottom: 20px;
}

.auth-info-content .divider {
    width: 44px;
    height: 3px;
    background: rgba(255,255,255,0.35);
    margin: 26px auto;
    border-radius: 3px;
}

.auth-info-content .small-text {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 14px;
    font-weight: 600;
}

.auth-switch-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.75);
    color: #ffffff;
    padding: 11px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Heebo', sans-serif;
    position: relative;
    overflow: hidden;
}

.auth-switch-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #ffffff;
    opacity: 0;
    transition: var(--transition);
}

.auth-switch-btn span {
    position: relative;
    z-index: 1;
    transition: color var(--transition);
}

.auth-switch-btn:hover {
    border-color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.auth-switch-btn:hover::before { opacity: 1; }
.auth-switch-btn:hover span    { color: var(--purple-dark); }

/* ========================================= */
/* צד הטפסים — לבן                           */
/* ========================================= */

.auth-form-side {
    padding: 56px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--surface);
}

.auth-form-container { display: none; }

.auth-form-container.active {
    display: block;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-form-container h2 {
    color: var(--text);
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 28px;
    text-align: center;
    letter-spacing: -0.3px;
}

/* ========================================= */
/* שדות קלט                                  */
/* ========================================= */

.form-group {
    position: relative;
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-group.half {
    flex: 1;
    min-width: 0;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 14px 44px 14px 14px;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text);
    transition: var(--transition);
    box-sizing: border-box;
    font-family: 'Heebo', sans-serif;
    -webkit-appearance: none;
}

.form-group input::placeholder {
    color: var(--text-light);
    font-size: 14px;
}

.form-group input:focus {
    border-color: var(--purple);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--purple-glow);
    outline: none;
}

/* אייקון */
.form-group .input-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 15px;
    pointer-events: none;
    transition: color var(--transition);
}

.form-group input:focus ~ .input-icon {
    color: var(--purple);
}

/* ========================================= */
/* אפשרויות טופס                              */
/* ========================================= */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.remember-me {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--purple);
    cursor: pointer;
}

.forgot-password {
    color: var(--purple);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}

.forgot-password:hover {
    color: var(--purple-dark);
    text-decoration: underline;
}

/* ========================================= */
/* שורת תקנון                                */
/* ========================================= */

.terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 22px;
    cursor: pointer;
    user-select: none;
}

.terms-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

/* ========================================= */
/* כפתורי שליחה                              */
/* ========================================= */

.auth-submit-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--radius);
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Heebo', sans-serif;
    letter-spacing: 0.1px;
    position: relative;
    overflow: hidden;
}

/* Shimmer */
.auth-submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.55s ease;
}

.auth-submit-btn:hover::after { left: 150%; }
.auth-submit-btn:hover         { transform: translateY(-2px); }
.auth-submit-btn:active        { transform: translateY(0); }

/* התחברות — כחול */
.auth-submit-btn.main-action {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    box-shadow: 0 4px 15px var(--blue-glow);
}
.auth-submit-btn.main-action:hover {
    box-shadow: 0 8px 24px var(--blue-glow);
}

/* הרשמה — ירוק */
.auth-submit-btn.success-action {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    box-shadow: 0 4px 15px var(--green-glow);
}
.auth-submit-btn.success-action:hover {
    box-shadow: 0 8px 24px var(--green-glow);
}

/* ========================================= */
/* אנימציית מעבר                             */
/* ========================================= */

.auth-info-content          { display: none; }
.auth-info-content.active   { display: block; animation: slideUp 0.4s ease forwards; }

/* ========================================= */
/* OTP                                       */
/* ========================================= */

.otp-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    direction: ltr;
    margin: 28px 0;
}

.otp-box {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 28px;
    font-weight: 900;
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    transition: var(--transition);
    font-family: 'Heebo', monospace;
    -webkit-appearance: none;
}

.otp-box:focus {
    border-color: var(--purple);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px var(--purple-glow);
    transform: translateY(-2px);
}

.resend-btn {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Heebo', sans-serif;
    cursor: pointer;
    color: var(--purple);
    transition: color var(--transition);
}
.resend-btn:hover { color: var(--purple-dark); }

/* ========================================= */
/* רספונסיביות — טאבלט (780px)              */
/* ========================================= */

@media (max-width: 780px) {

    .auth-box {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    /* הפס העליון הסגול במובייל */
    .auth-info-side {
        padding: 22px 22px 20px;
        justify-content: center;
        align-items: center;
        text-align: center; /* ← שינוי מ-right ל-center */
    }

    .auth-info-side::after { display: none; }

    .auth-logo {
        max-width: 100px;
        margin-bottom: 0;
        order: 2;
        display: none;
    }

    .auth-info-content {
        display: flex !important;
        flex-direction: column;
        align-items: center; /* ← שינוי מ-flex-start ל-center */
        order: 1;
        animation: none !important;
    }

    #info-login-state:not(.active),
    #info-register-state:not(.active) {
        display: none !important;
    }

    .auth-info-content h2 {
        font-size: 19px;
        margin-bottom: 4px;
        text-shadow: none;
    }

    
    .auth-info-content .divider { display: none; }
    .auth-info-content .small-text { font-size: 12px; margin-bottom: 8px; }

    .auth-switch-btn {
        font-size: 13px;
        padding: 7px 18px;
    }

    .auth-form-side {
        padding: 34px 26px 40px;
    }

    .auth-form-container h2 {
        font-size: 22px;
        margin-bottom: 22px;
    }

    /* טור אחד בהרשמה */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ========================================= */
/* רספונסיביות — מובייל קטן (480px)         */
/* ========================================= */

@media (max-width: 480px) {

    .auth-page-wrapper {
        padding: 90px 12px 36px;
    }

    .auth-box {
        border-radius: 16px;
    }

    .auth-form-side {
        padding: 28px 18px 34px;
    }

    /* מונע zoom אוטומטי ב-iOS */
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="tel"] {
        font-size: 16px;
        padding: 13px 42px 13px 12px;
    }

    .auth-submit-btn {
        font-size: 16px;
        padding: 14px;
    }

    .otp-container { gap: 8px; }
    .otp-box { width: 44px; height: 52px; font-size: 24px; border-radius: 10px; }
}

/* ========================================= */
/* iPhone SE (360px)                         */
/* ========================================= */

@media (max-width: 360px) {
    .otp-container { gap: 5px; }
    .otp-box { width: 36px; height: 44px; font-size: 20px; border-width: 1.5px; }
}