/**
 * OrgReach Unified Header - Critical Fixes
 * Version 3.2.5
 * 
 * CRITICAL: These fixes resolve z-index and icon color issues
 */

/* ===========================
   Z-INDEX HIERARCHY FIX
   =========================== */

/* Fix header z-index when floating */
.orgreach-unified-header {
    z-index: 2147483640 !important;
}

/* Ensure parent containers don't clip dropdowns */
.orgreach-unified-header,
.header-container,
.header-actions,
.services-dropdown,
.user-profile-dropdown {
    overflow: visible !important;
}

/* Ensure dropdowns appear above EVERYTHING including the header */
.services-dropdown-menu,
.user-profile-menu,
.facebook-chat-dropdown {
    position: absolute !important;
    z-index: 2147483647 !important; /* Maximum z-index value - above header */
}

/* SVG icons inherit color */
.orgreach-unified-header button svg {
    fill: currentColor !important;
}

/* Fix dropdown positioning */
.services-dropdown {
    position: relative !important;
}

.services-dropdown-menu {
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 10px !important;
}

/* Ensure dropdowns are visible when shown */
.services-dropdown-menu.show,
.user-profile-menu.show,
.facebook-chat-dropdown.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Override any parent z-index */
.elementor-section[style*="z-index"] .services-dropdown-menu,
.elementor-section[style*="z-index"] .user-profile-menu,
.elementor-section[style*="z-index"] .facebook-chat-dropdown {
    z-index: 2147483647 !important;
}

/* Fix 2: Improve hover visibility on purple background */
.orgreach-unified-header .header-navigation .header-nav-menu li a:hover,
.orgreach-unified-header .services-button:hover,
.orgreach-unified-header .user-profile-button:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.orgreach-unified-header .orgreach-email-icon:hover,
.orgreach-unified-header .orgreach-marketplace-icon:hover,
.orgreach-unified-header .facebook-chat-icon:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.1);
}

/* Fix 3: Ensure service links in dropdown are visible */
.services-dropdown-menu .service-link:hover {
    background-color: var(--orgreach-primary-light) !important;
    color: white !important;
}

/* Icons now controlled by Elementor settings */

/* Fix 5: Ensure floating header is fully visible */
.orgreach-unified-header.position-floating-top,
.orgreach-unified-header.position-floating-bottom {
    overflow: visible !important;
    min-height: 60px;
}

/* Fix 6: Mobile dropdown fixes */
@media (max-width: 768px) {
    .services-dropdown-menu,
    .user-profile-menu,
    .facebook-chat-dropdown {
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100vw - 20px) !important;
    }
}