/*
=====================================================
EBHAV LOGIN SYSTEM - STYLESHEET (FINAL & COMPLETE)
This version updates the Profile Page with the new wrapper structure as requested.
=====================================================
*/

/* --- 1. THE SHIELD & BODY LOCK --- */
#ebhav-login-shield {
    display: none;
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 99999;
}
#ebhav-login-shield.ebhav-active-shield {
    display: block;
}
body.ebhav-login-active {
    overflow: hidden !important;
}
.ebhav-is-hidden { display: none !important; }

/* --- 2. LOGIN PAGE OVERLAY (INSIDE THE SHIELD) --- */
#ebhav-login-shield .ebhav-auth-wrapper {
    display: flex; justify-content: center; align-items: center;
    width: 100%; height: 100%; padding: 20px;
    background-image: url('https://ebhav.com/wp-content/uploads/2025/08/vegitables-background.webp');
    background-size: cover; background-position: center;
    position: relative; box-sizing: border-box;
}
#ebhav-login-shield .ebhav-auth-wrapper::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

/* --- 3. THE LOGIN CARD & DISPLAY SYSTEM --- */
#ebhav-login-shield .ebhav-auth-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: rgba(30, 30, 30, 0.9); backdrop-filter: blur(10px);
    padding: 40px; border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%; max-width: 420px;
    text-align: center;
    position: relative; z-index: 2;
    opacity: 0; transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
#ebhav-login-shield .ebhav-auth-container.ebhav-visible { opacity: 1; transform: scale(1); }
#ebhav-login-shield .ebhav-auth-steps-container { position: relative; }
#ebhav-login-shield .ebhav-auth-step-wrapper { display: none; }
#ebhav-login-shield .ebhav-auth-step-wrapper.active-step { display: block; }

/* --- 4. LOGIN ELEMENTS (INSIDE THE SHIELD) --- */
#ebhav-login-shield .ebhav-auth-logo { margin-bottom: 25px; height: 40px; }
#ebhav-login-shield .ebhav-auth-logo img { max-width: 150px; height: 100%; object-fit: contain; filter: invert(1) brightness(2) drop-shadow(0 0 5px rgba(255,255,255,0.3)); }
#ebhav-login-shield h3 { font-size: 1.8em; font-weight: 600; margin: 0 0 10px; color: #f0f0f0; line-height: 1.2; }
#ebhav-login-shield p { color: #a0a0a0; margin: 0 0 20px; font-size: 1em; line-height: 1.6; }
#ebhav-login-shield .ebhav-form-group, 
#ebhav-login-shield .ebhav-form-group-icon { margin-bottom: 20px; text-align: left; position: relative; }
#ebhav-login-shield label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.9em; color: #a0a0a0; }
#ebhav-login-shield .ebhav-form-control { width: 100%; height: auto; padding: 14px 18px; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; font-size: 1em; background: #2c2c2c; transition: border-color 0.3s, box-shadow 0.3s; color: #f0f0f0; box-sizing: border-box; }
#ebhav-login-shield .ebhav-form-control:focus { border-color: #3a7bd5; box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.3); outline: none; }
#ebhav-login-shield .ebhav-country-code { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #a0a0a0; }
#ebhav-login-shield .ebhav-form-group-icon .ebhav-form-control { padding-left: 60px; }
#ebhav-login-shield .ebhav-btn-submit { background: linear-gradient(to right, #3a7bd5, #00d2ff); color: #fff; }
#ebhav-login-shield .ebhav-btn-submit, #ebhav-login-shield .ebhav-btn-secondary { width: 100%; padding: 14px; border: none; border-radius: 8px; font-size: 1.1em; font-weight: 600; cursor: pointer; transition: all 0.3s ease; position: relative; display: inline-flex; justify-content: center; align-items: center; }

/* --- 5. ONBOARDING MODAL --- */
#ebhav-onboarding-modal { display: flex; justify-content: center; align-items: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 100000; }
.ebhav-modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); }
.ebhav-modal-content { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: rgba(30, 30, 30, 0.9); backdrop-filter: blur(10px); padding: 40px; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); border: 1px solid rgba(255, 255, 255, 0.15); width: 100%; max-width: 450px; text-align: center; position: relative; z-index: 1; opacity: 0; transform: scale(0.95); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.ebhav-modal-content.ebhav-visible { opacity: 1; transform: scale(1); }
#ebhav-onboarding-modal .ebhav-onboarding-steps-container { position: relative; }
#ebhav-onboarding-modal .ebhav-onboarding-step-wrapper { display: none; }
#ebhav-onboarding-modal .ebhav-onboarding-step-wrapper.active-step { display: block; }
#ebhav-onboarding-modal h3 { font-size: 1.8em; font-weight: 600; margin: 0 0 10px; color: #f0f0f0; line-height: 1.2; }
#ebhav-onboarding-modal p { color: #a0a0a0; margin: 0 0 30px; font-size: 1em; line-height: 1.6; }
#ebhav-onboarding-modal .ebhav-btn-secondary { margin-top: 10px; background: #333; color: #f0f0f0; }


/*
=====================================================
--- 6. PROFILE PAGE STYLES (UPDATED STRUCTURE) ---
=====================================================
*/

/* This is the NEW parent wrapper that holds the background image. */
.ebhav-profile-background-wrapper {
    width: 100%;
    margin: 0;
    background-image: url('https://ebhav.com/wp-content/uploads/2025/08/vegitables-background-black.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}
/* This is the dark overlay for the new background wrapper. */
.ebhav-profile-background-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* This is the inner wrapper that now controls spacing and centering. */
.ebhav-profile-wrapper {
    width: 100%;
    max-width: 1110px; /* Example: 950px card width + (80px * 2) side padding */
    margin: 0 auto; /* This centers the wrapper */
    padding: 20px 80px; /* 20px top/bottom, 80px left/right */
    position: relative; /* Must be relative to sit above the overlay */
    z-index: 2;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #f0f0f0;
}

/* This is the card inside the spacing wrapper. */
.ebhav-profile-container {
    max-width: 950px; /* The card's maximum width */
    margin: 0 auto; /* Center the card inside the wrapper */
    padding: 40px;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* The two-column grid for the profile form */
.ebhav-profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px 30px;
    margin-top: 20px;
}
@media (max-width: 768px) {
    .ebhav-profile-wrapper {
        padding: 20px; /* Reduce padding on mobile */
    }
    .ebhav-profile-form-grid {
        grid-template-columns: 1fr;
    }
}
.ebhav-profile-wrapper * { box-sizing: border-box; }
.ebhav-profile-wrapper h3 { font-size: 1.8em; font-weight: 600; margin-bottom: 8px; text-align: center; color: #fff; }
.ebhav-profile-wrapper p { margin-bottom: 25px; color: #a0a0a0; text-align: center; }
.ebhav-profile-wrapper .ebhav-auth-logo { margin: 0 auto 20px auto; height: 40px; display: block; text-align: center; }
.ebhav-profile-wrapper .ebhav-form-group { margin-bottom: 15px; }
.ebhav-profile-wrapper .ebhav-form-control { width: 100%; background: #2c2c2c; border-color: #444; border-radius: 8px; color: #f0f0f0; padding: 12px; }
.ebhav-profile-wrapper .ebhav-btn-submit { background: #3a7bd5; }
.ebhav-profile-wrapper .ebhav-danger-zone { margin-top: 30px; padding-top: 20px; border-top: 1px solid #444; text-align: center; }
.ebhav-profile-wrapper .ebhav-danger-zone h4 { color: #e74c3c; font-size: 1.2em; }
.ebhav-profile-wrapper .ebhav-btn-danger { background: #e74c3c; color: #fff; max-width: 250px; margin: 15px auto 0 auto; }
.ebhav-profile-wrapper .ebhav-alert { color: #1e1e1e; }

/* --- 7. COMMON ELEMENTS --- */
.ebhav-btn-submit, .ebhav-btn-secondary, .ebhav-btn-danger { width: 100%; padding: 14px; border: none; border-radius: 8px; font-size: 1.1em; font-weight: 600; cursor: pointer; transition: all 0.3s ease; position: relative; display: inline-flex; justify-content: center; align-items: center; }
.ebhav-spinner { visibility: hidden; width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; position: absolute; }
@keyframes spin { to { transform: rotate(360deg); } }
.ebhav-loading .ebhav-btn-text { visibility: hidden; }
.ebhav-loading .ebhav-spinner { visibility: visible; }
#ebhav-full-page-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 100001; display: flex; justify-content: center; align-items: center; }
#ebhav-profile-loader { display: flex; justify-content: center; align-items: center; min-height: 300px; }
#ebhav-full-page-loader .ebhav-spinner, #ebhav-profile-loader .ebhav-spinner { visibility: visible; position: static; width: 50px; height: 50px; border: 5px solid rgba(255,255,255,0.1); border-top-color: #3a7bd5; }
#ebhav-topbar-container { --menu-bg: #222; --menu-text: #f0f0f0; --menu-hover-bg: #333; --menu-border: #444; position: relative; }
.ebhav-topbar-login-btn, .ebhav-topbar-user-btn { background: var(--menu-bg); color: var(--menu-text); padding: 8px 15px; border-radius: 5px; text-decoration: none; font-weight: 600; border: 1px solid var(--menu-border); cursor: pointer; font-size: 1em; }
.ebhav-user-dropdown { display: block; position: absolute; right: 0; top: 100%; margin-top: 5px; background: var(--menu-bg); border: 1px solid var(--menu-border); border-radius: 5px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); min-width: 150px; z-index: 100; opacity: 0; transform: translateY(10px); visibility: hidden; transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s; }
#ebhav-topbar-container.active .ebhav-user-dropdown { opacity: 1; transform: translateY(0); visibility: visible; }
.ebhav-user-dropdown a { display: block; padding: 10px 15px; color: var(--menu-text); text-decoration: none; border-bottom: 1px solid var(--menu-border); transition: background-color 0.2s; }
.ebhav-user-dropdown a:last-child { border-bottom: none; }
.ebhav-user-dropdown a:hover { background: var(--menu-hover-bg); }

/* This hides the Google reCAPTCHA badge from the corner of the screen */
.grecaptcha-badge { 
    visibility: hidden; 
}