/**
 * Eau System Header Styles
 *
 * Styles for system page adjustments and profile dropdown.
 * The site Elementor header is used on all pages.
 *
 * @since 1.57.5
 * @since 1.77.0 Removed custom header styles; now uses site Elementor header
 */

/* ==========================================================================
   System Page: Hide theme fallback header and duplicate page titles
   ========================================================================== */

/* Hide the Hello Elementor fallback header on system pages
   (we inject the Elementor header template directly) */
body.eau-system-page #site-header.site-header {
    display: none !important;
}

/* Hide the Hello Elementor fallback footer on system pages */
body.eau-system-page #site-footer.site-footer {
    display: none !important;
}

/* System pages render their own titles in the content area */
body.eau-system-page .entry-title,
body.eau-system-page .page-title,
body.eau-system-page h1.entry-title,
body.eau-system-page .elementor-page-title,
body.eau-system-page article > header,
body.eau-system-page .entry-header {
    display: none !important;
}

/* ==========================================================================
   Profile Dropdown
   ========================================================================== */

/* Make the profile element a positioning context */
.list-icon-my-profile {
    position: relative !important;
}

/* User profile photo in the header (replaces placeholder icon) */
.eau-header-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* Dropdown container - hidden by default */
.eau-profile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    z-index: 99999;
    padding: 6px 0;
    margin-top: 4px;
}

/* Bridge element to prevent gap between trigger and dropdown */
.eau-profile-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

/* Show dropdown on hover */
.list-icon-my-profile:hover .eau-profile-dropdown {
    display: block;
}

/* Dropdown items — text right-aligned, icons left-aligned */
.eau-profile-dropdown-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding: 10px 16px !important;
    color: #374151 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
}

.eau-profile-dropdown-item:hover {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
    text-decoration: none !important;
}

.eau-profile-dropdown-item:visited {
    color: #374151 !important;
}

/* Icons stay on the left, push text to the right */
.eau-profile-dropdown-item svg {
    flex-shrink: 0;
    color: #6b7280;
    margin-right: auto !important;
}

.eau-profile-dropdown-item:hover svg {
    color: #374151;
}

/* ==========================================================================
   Profile Dropdown: Administration Flyout Menus
   ========================================================================== */

/* Separator between regular items and Administration */
.eau-profile-dropdown-separator {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}

.eau-profile-dropdown-label {
    padding: 6px 14px 2px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    pointer-events: none;
    text-align: right;
}

/* Item that has a submenu */
.eau-profile-has-submenu {
    position: relative;
}

/* Submenu trigger: looks like a dropdown-item but is a span (not a link) */
.eau-profile-submenu-trigger {
    cursor: pointer;
}

/* Arrow indicator on the left (submenu opens to the left) */
.eau-submenu-arrow {
    flex-shrink: 0;
    color: #9ca3af;
}

.eau-profile-has-submenu:hover > .eau-profile-submenu-trigger .eau-submenu-arrow {
    color: #374151;
}

/* Submenu flyout - opens to the LEFT (profile is on the right side of the page) */
.eau-profile-submenu {
    display: none;
    position: absolute;
    right: 100%;
    top: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    z-index: 99999;
    padding: 6px 0;
    margin-right: 4px;
}

/* Bridge to cover the gap between parent item and submenu */
.eau-profile-submenu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    width: 8px;
    height: 100%;
}

/* Show submenu on hover */
.eau-profile-has-submenu:hover > .eau-profile-submenu {
    display: block;
}

/* Level 3 submenus: same direction (left) */
.eau-profile-submenu .eau-profile-submenu {
    right: 100%;
    top: 0;
}
