/* =========================================
   GLOBAL JOURNALS REGISTRATION STYLES
   ========================================= */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --gj-primary: #1849c7;
    /* Vibrant Royal Blue */
    --gj-primary-dark: #123694;
    --gj-text-main: #0f172a;
    --gj-text-muted: #64748b;
    --gj-border: #e2e8f0;
    --gj-bg-light: #f8fafc;
    --gj-white: #ffffff;
    --gj-error: #ef4444;
    --gj-success: #1769ff;
    --gj-radius: 12px;
}

/* =========================================
   IMMERSIVE LAYOUT UTILS
   ========================================= */
/* Hide default theme header/footer to ensure full screen immersive experience */
.page-template-default .site-header,
.page-template-default .site-footer,
body.login-page header,
body.login-page footer,
#masthead,
#colophon,
header.site-header,
footer.site-footer,
.elementor-location-header,
.elementor-location-footer {
    display: none !important;
}

/* =========================================
   SPLIT LAYOUT (Fullscreen Overlay)
   ========================================= */
.gj-split-layout {
    position: fixed;
    /* Force fullscreen */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    background-color: var(--gj-primary);

    /* Overlay Gradient: Solid Blue Left -> Tinted Image Right */
    background:
        linear-gradient(90deg,
            #1849c7 0%,
            #1849c7 35%,
            rgba(24, 73, 199, 0.85) 60%,
            rgba(24, 73, 199, 0.4) 100%),
        url('/wp-content/uploads/login-scaled.jpg') no-repeat right center / cover;

    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    /* Allow numeric scaling scrolling */
}

/* Admin Bar Adjustment */
body.admin-bar .gj-split-layout {
    top: 32px;
    height: calc(100vh - 32px);
}

/* Left Side - Form Card */
.gj-layout-left {
    flex: 0 0 45%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    z-index: 20;
    background: transparent;
}

/* Right Side - Hero Text */
.gj-layout-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px;
    color: #ffffff;
    z-index: 10;
    position: relative;
}

.gj-hero-content {
    max-width: 700px;
}

.restore-password #qodef-page-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.gj-hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #ffffff;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.gj-hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    max-width: 550px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .gj-split-layout {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 100vh;
        flex-direction: column;
        background: #f8fafc;
        z-index: 100;
    }

    body.login-page #masthead,
    body.login-page header,
    .page-template-default .site-header {
        display: none !important;
    }

    .gj-layout-left {
        order: 2;
        width: 100%;
        flex: auto;
        padding: 40px 20px;
        background: #f8fafc;
    }

    .gj-layout-right {
        order: 1;
        width: 100%;
        flex: 0 0 auto;
        padding: 60px 30px;
        background: var(--gj-primary);
        align-items: center;
        text-align: center;
    }

    .gj-hero-title {
        font-size: 36px;
    }
}


/* =========================================
   AUTH CARD
   ========================================= */
.gj-auth-card {
    background: #ffffff;
    padding: 48px;
    border-radius: 28px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 480px;
    /* Wider for Registration */
    position: relative;
    overflow: visible;
}

/* Sidebar and Main Content - Hidden by default (shown only in fullwidth mode) */
.gj-reg-sidebar {
    display: none;
}

.gj-reg-main-content {
    width: 100%;
}

/* =========================================
   FULLWIDTH MODE (Phase 2 - 3 Step Form)
   ========================================= */
body.gj-reg-fullwidth-mode .gj-split-layout {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f8fafc;
    /* Light gray background */
    z-index: 99999;
    display: flex;
    flex-direction: row;
}

body.gj-reg-fullwidth-mode .gj-layout-left {
    flex: 1;
    max-width: none;
    padding: 0;
    background: #ffffff;
    justify-content: flex-start;
    align-items: flex-start;
}

body.gj-reg-fullwidth-mode .gj-layout-right {
    display: none;
    /* Hide hero section in fullwidth mode */
}

body.gj-reg-fullwidth-mode .gj-auth-card {
    max-width: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    display: flex;
    background: transparent;
}

/* Phase 2 becomes the fullscreen layout */
body.gj-reg-fullwidth-mode #gj-reg-phase-2 {
    display: flex !important;
    flex-direction: row;
    width: 100%;
    height: 100%;
}

/* Left Sidebar with Steps */
body.gj-reg-fullwidth-mode .gj-reg-sidebar {
    flex: 0 0 320px;
    background: #ffffff;
    padding: 60px 40px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

body.gj-reg-fullwidth-mode .gj-reg-sidebar-header {
    margin-bottom: 40px;
}

body.gj-reg-fullwidth-mode .gj-reg-sidebar-brand {
    font-size: 13px;
    font-weight: 600;
    color: var(--gj-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

body.gj-reg-fullwidth-mode .gj-reg-sidebar-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--gj-text-main);
    margin: 0;
}

/* Vertical Steps in Sidebar */
body.gj-reg-fullwidth-mode .gj-reg-steps-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.gj-reg-fullwidth-mode .gj-reg-vstep {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    cursor: default;
    transition: all 0.2s;
}

body.gj-reg-fullwidth-mode .gj-reg-vstep.active {
    background: #f1f5f9;
}

body.gj-reg-fullwidth-mode .gj-reg-vstep.completed {
    background: #ecfdf5;
}

body.gj-reg-fullwidth-mode .gj-reg-vstep-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

body.gj-reg-fullwidth-mode .gj-reg-vstep.active .gj-reg-vstep-num {
    background: #000000;
    color: #ffffff;
}

body.gj-reg-fullwidth-mode .gj-reg-vstep.completed .gj-reg-vstep-num {
    background: #1769ff;
    color: #ffffff;
}

body.gj-reg-fullwidth-mode .gj-reg-vstep-label {
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
}

body.gj-reg-fullwidth-mode .gj-reg-vstep.active .gj-reg-vstep-label {
    color: #0f172a;
}

body.gj-reg-fullwidth-mode .gj-reg-vstep.completed .gj-reg-vstep-label {
    color: #1769ff;
}

body.gj-reg-fullwidth-mode .gj-reg-sidebar-footer {
    margin-top: auto;
}

/* Right Content Area */
body.gj-reg-fullwidth-mode .gj-reg-main-content {
    flex: 1;
    background: #ffffff;
    padding: 60px 80px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

body.gj-reg-fullwidth-mode .gj-reg-form {
    max-width: 600px;
}

/* Hide horizontal steps in fullwidth mode (we use vertical sidebar) */
body.gj-reg-fullwidth-mode .gj-reg-steps-horizontal {
    display: none;
}

/* Hide Phase 1 and Login Phase in fullwidth */
body.gj-reg-fullwidth-mode #gj-reg-phase-1,
body.gj-reg-fullwidth-mode #gj-reg-phase-login {
    display: none !important;
}

/* Mobile Responsive for Fullwidth */
@media (max-width: 900px) {
    body.gj-reg-fullwidth-mode .gj-reg-sidebar {
        display: none;
    }

    body.gj-reg-fullwidth-mode .gj-reg-steps-horizontal {
        display: flex !important;
    }

    body.gj-reg-fullwidth-mode .gj-reg-main-content {
        padding: 40px 24px;
    }
}

/* =========================================
   REGISTRATION SPECIFIC STYLES
   ========================================= */
.gj-auth-header {
    margin-bottom: 30px;
}

.gj-auth-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--gj-text-main);
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.gj-auth-subtitle {
    font-size: 15px;
    color: var(--gj-text-muted);
    font-weight: 500;
}

/* Steps Indicator (Horizontal) */
.gj-reg-steps-horizontal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 36px;
    position: relative;
    padding: 0 10px;
}

.gj-reg-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: default;
    flex: 1;
}

.gj-reg-step::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: -1;
}

.gj-reg-step:last-child::after {
    display: none;
}

.gj-reg-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gj-reg-step.active .gj-reg-step-num {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gj-reg-step.completed .gj-reg-step-num {
    background: #1769ff;
    color: #ffffff;
}

.gj-reg-step-label {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    transition: color 0.3s;
}

.gj-reg-step.active .gj-reg-step-label {
    color: #0f172a;
}

.gj-reg-step.completed .gj-reg-step-label {
    color: #1769ff;
}

/* =========================================
   FORMS & INPUTS
   ========================================= */
.gj-reg-simple-form,
.gj-reg-form {
    width: 100%;
}

.gj-reg-row {
    display: flex;
    gap: 16px;
}

.gj-reg-row .gj-reg-field {
    flex: 1;
}

@media(max-width: 480px) {
    .gj-reg-row {
        flex-direction: column;
    }
}

.gj-reg-field {
    margin-bottom: 24px;
}

.gj-auth-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    margin-left: 2px;
}

.gj-auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.gj-auth-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--gj-text-main);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
    font-weight: 500;
    cursor: text;
}

.gj-auth-input:focus {
    border-color: #000000;
}

.gj-auth-input::placeholder {
    color: #94a3b8;
}

.gj-auth-input.is-invalid {
    border-color: var(--gj-error);
    background-color: #fff9f9;
}

.gj-reg-field-error {
    font-size: 13px;
    color: var(--gj-error);
    margin-top: 5px;
    font-weight: 500;
}

/* Buttons */
.gj-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 56px;
    padding: 10px 32px !important;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    width: 100%;
    border: 1px solid;
}

.gj-auth-btn-primary {
    background: #000000;
    color: #ffffff;
}

html body .gj-auth-btn-primary:hover {
    background: transparent !important;
    color: #0e202a !important;
    border: 1px solid #0e202a !important;
    box-shadow: none !important;
    transform: none !important;
}

.gj-auth-btn-primary svg {
    stroke: currentColor;
    transition: stroke 0.3s;
}

.gj-auth-btn-primary:hover svg {
    stroke: #0e202a;
}


/* Navigation Buttons */
.gj-reg-actions {
    margin-top: 32px;
}

/* Footer / Login Link */
.gj-auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    color: var(--gj-text-muted);
}

.gj-auth-link {
    color: var(--gj-primary);
    text-decoration: none;
    font-weight: 600;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.gj-auth-link:hover {
    text-decoration: underline;
}

/* Animation */
.gj-hidden {
    display: none !important;
}

.gj-visible {
    display: block !important;
    animation: fadeIn 0.4s ease-out;
}

.gj-reg-step-content {
    display: none;
    animation: slideUp 0.3s ease-out;
}

.gj-reg-step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-loader {
    display: inline-flex;
    animation: spin 1s linear infinite;
}

.spinner {
    width: 22px;
    height: 22px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   PASSWORD REQUIREMENTS & BUTTONS
   ========================================= */
.gj-reg-password-requirements {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gj-req-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #64748b;
    /* Slate 500 */
    transition: all 0.2s ease;
}

.gj-req-item svg {
    opacity: 0;
    color: #1769ff;
    /* Emerald 500 */
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gj-req-item.met {
    color: #1769ff;
}

.gj-req-item.met svg {
    opacity: 1;
    transform: scale(1);
}

/* Action Buttons */
/* Action Buttons */
.gj-reg-actions {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.gj-auth-btn {
    flex: 1;
    /* EQUAL WIDTH */
    width: 100%;
    height: 52px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Back Button (Outline Style) */
.gj-btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    padding: 0 20px;
    box-shadow: none;
    justify-content: center;
}

.gj-btn-outline:hover {
    background: transparent;
    border: 1px solid #0e202a;
    color: #0e202a;
    box-shadow: none;
    transform: none;
}

/* Primary Button (Continue / Create) */
.gj-auth-btn-primary {
    /* Inherits flex: 1 */
}

/* =========================================
   LOGIN PHASE COMPONENTS
   ========================================= */
/* User Badge */
.gj-auth-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gj-text-main);
    margin-top: 12px;
}

.gj-auth-edit-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--gj-text-muted);
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.gj-auth-edit-btn:hover {
    background: #e2e8f0;
    color: var(--gj-text-main);
}

/* Alerts */
.gj-auth-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.gj-auth-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

.gj-auth-alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #d1fae5;
}

/* Password Toggle */
.gj-auth-password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 !important;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.gj-auth-password-toggle:hover {
    color: #0f172a;
}