/* ============================================================
   MAIN INTERFACE (HEADER & TOP NAV)
   ============================================================ */

/* 1. HIDE MESSAGES, NOTIFICATIONS & HOME LINK */
.popover-region-messages, 
.popover-region-notifications,
[data-region="popover-region-messages"],
#nav-notification-popover-container,
.nav-link[data-key="home"],
.primary-navigation .nav-item[data-key="home"],
.dropdown-item[data-key="home"] {
    display: none !important;
}

/* 2. REORDER: MOVE 'MY COURSES' TO THE FIRST POSITION */
.primary-navigation .nav-item[data-key="mycourses"] {
    order: -1 !important;
}

/* 3. ACADEMY BRANDED HEADER */
.navbar.fixed-top {
    border-bottom: 3px solid rgba(40, 149, 210, 0.5) !important;
    background-color: #f8f9fa !important;
    padding: 0.5rem 1rem !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
}

/* 4. USER PROFILE 'PILL' DESIGN */
.usermenu {
    border: 1px solid #d1d9e0 !important;
    border-radius: 8px !important; /* Reduced from 50px to match dropdown */
    padding: 4px 12px !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
}
/* Optional: Slight hover effect to make it feel interactive */
.usermenu:hover {
    background-color: #f8f9fa !important;
    border-color: #2895d2 !important; /* Your eHealthier Blue */
}


/* 5. SHRINK NAVBAR LOGO BY 20% */
.navbar-brand img {
    max-height: 40px !important; /* Reduced from 50px to 40px */
    width: auto !important;
    transition: all 0.3s ease !important;
}

/* Ensure the container doesn't force it back to full size */
.navbar-brand {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* ADD BREATHING ROOM BETWEEN MENU AND BLUE BAR */
.primary-navigation .nav-link.active {
    border-bottom: 3px solid #2895d2 !important; /* Matches your blue */
    padding-bottom: 8px !important; /* Pushes the text up away from the underline */
    margin-bottom: -3px !important; /* Offsets it so the underline doesn't touch the bar */
}

/* Ensure the navbar height accommodates the extra padding */
.navbar.fixed-top {
    min-height: 65px !important;
}

/* REMOVE FOCUS BOX AROUND NAV LINKS */
.primary-navigation .nav-link:focus,
.primary-navigation .nav-link:active,
.navbar-brand:focus,
.usermenu .dropdown-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure the underline remains the only indicator */
.primary-navigation .nav-link.active {
    border-bottom: 3px solid #2895d2 !important;
}

/* LIFT UNDERLINE AWAY FROM THE BLUE NAVBAR BORDER */
.primary-navigation .nav-item .nav-link.active {
    border-bottom: 3px solid #2895d2 !important;
    padding-bottom: 12px !important; /* Adjust this to move underline up/down */
    margin-bottom: 0 !important;
}

/* ============================================================
   PREMIUM PROFILE DROPDOWN
   ============================================================ */

/* 1. THE MAIN DROPDOWN CONTAINER */
.usermenu .dropdown-menu {
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    padding: 8px !important;
    margin-top: 8px !important;
    min-width: 220px !important;
}

/* 2. THE DROPDOWN ITEMS (Links) */
.usermenu .dropdown-item {
    border-radius: 4px !important;
    padding: 8px 12px !important;
    font-weight: 500 !important;
    color: #495057 !important;
    transition: all 0.2s ease !important;
}

/* 3. HOVER STATE: eHealthier Light Blue */
.usermenu .dropdown-item:hover,
.usermenu .dropdown-item:focus {
    background-color: rgba(40, 149, 210, 0.1) !important; /* Your blue at 10% */
    color: #2895d2 !important; /* Your blue text */
    padding-left: 20px !important; /* Subtle "slide" effect on hover */
}

/* 4. ICON STYLING */
.usermenu .dropdown-item i {
    color: #2895d2 !important; /* Tint icons blue */
    margin-right: 10px !important;
    font-size: 0.9rem !important;
}

/* 5. DIVIDER LINES */
.usermenu .dropdown-divider {
    border-top: 1px solid #f1f3f5 !important;
    margin: 8px 0 !important;
}

/* 6. LOGOUT LINK (Red Accent) */
.usermenu [data-key="logout"] {
    color: #dc3545 !important;
}

.usermenu [data-key="logout"]:hover {
    background-color: #fff5f5 !important;
}

/* ============================================================
   FULL-WIDTH SLIM ACADEMY FOOTER
   ============================================================ */

/* ============================================================
   STICKY FOOTER (EXCLUDING LOGIN PAGE)
   ============================================================ */

/* 1. Force wrapper height ONLY on normal pages (Not Login) */
body:not(#page-login-index):not(.pagelayout-login) #page-wrapper {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 2. Expand content area ONLY on normal pages */
body:not(#page-login-index):not(.pagelayout-login) #page {
    flex: 1 0 auto !important;
}

/* 3. Footer styles ONLY on normal pages */
body:not(#page-login-index):not(.pagelayout-login) #page-footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    background: transparent !important;
    border-top: 1px solid #dee2e6 !important;
    padding: 20px 0 !important;
    width: 100% !important;
}

/* 4. Footer Text (Global) - This is safe to keep */
#page-footer::before {
    content: "© 2026 VBHC Academy | Powered by eHealthier" !important;
    display: block !important;
    text-align: center !important;
    font-size: 0.85rem !important;
    color: #495057 !important;
}

/* 5. Hide default footer content */
#page-footer .container,
#page-footer .footer-content-visuals {
    display: none !important;
}

/* =================================================================
   FINAL HELP BUBBLE (Fixed Width for Login Screen)
   ================================================================= */

/* 1. HIDE DATA RETENTION & JUNK */
body .popover-body a[href*="retention"], 
body .popover-body a[href*="dataprivacy"] {
    display: none !important;
}

/* 2. STYLE THE SHELL (Width Fix Added) */
body .popover {
    border-radius: 8px !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    
    /* CRITICAL FIX: Forces bubble to be wide enough for the footer */
    min-width: 280px !important; 
}

/* 3. THE FOOTER: CENTERED WITH ICON */

/* Step A: Hide original text */
body .popover-body .footer-section:last-of-type {
    visibility: hidden !important;
    position: relative !important;
    min-height: 35px !important;
    margin-top: 10px !important;
    border-top: 1px solid #eee !important;
}

/* Step B: Inject 'Powered by eHealthier' */
body .popover-body .footer-section:last-of-type::after {
    content: "🎓  POWERED BY EHEALTHIER" !important;
    visibility: visible !important;
    position: absolute !important;
    
    /* CENTERING */
    top: 12px !important;
    left: 0 !important;
    width: 100% !important;
    text-align: center !important;
    
    /* PREVENT WRAPPING */
    white-space: nowrap !important; /* <--- Ensures text stays on one line */
    
    /* STYLING */
    color: #6c757d !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}