/**
 * Eau System Custom Header
 *
 * @since 1.57.5
 */

/* Reset body margin/padding for system pages */
body.eau-custom-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Hide default theme header on system pages */
body.eau-custom-header header:not(.eau-app-header),
body.eau-custom-header .site-header,
body.eau-custom-header #masthead,
body.eau-custom-header .elementor-location-header,
body.eau-custom-header [data-elementor-type="header"] {
    display: none !important;
}

/* Hide page title that appears before our header */
body.eau-custom-header .entry-title,
body.eau-custom-header .page-title,
body.eau-custom-header h1.entry-title,
body.eau-custom-header .elementor-page-title,
body.eau-custom-header article > header,
body.eau-custom-header .entry-header {
    display: none !important;
}

/* ==========================================================================
   Eau App Header
   ========================================================================== */

.eau-app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99999;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.eau-app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1.5rem;
    margin: 0 auto;
}

/* Add spacing for fixed header */
body.eau-custom-header .entry-content,
body.eau-custom-header .page-content,
body.eau-custom-header article.page,
body.eau-custom-header .elementor {
    padding-top: 70px !important;
}

/* Logo */
.eau-app-header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.eau-app-header-logo img {
    height: 44px;
    width: auto;
}

/* Right Side */
.eau-app-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* User Info */
a.eau-app-header-user,
a.eau-app-header-user:link {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    color: #374151 !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    padding: 0.375rem 0.5rem !important;
    border-radius: 6px !important;
    transition: background-color 0.15s ease !important;
    border: none !important;
    background: transparent !important;
}

a.eau-app-header-user:hover {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
    text-decoration: none !important;
}

a.eau-app-header-user:active,
a.eau-app-header-user:focus,
a.eau-app-header-user:visited {
    color: #374151 !important;
    text-decoration: none !important;
    outline: none !important;
    background: transparent !important;
}

.eau-app-header-user .eau-app-header-email {
    color: #374151 !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
}

.eau-app-header-user i,
.eau-app-header-user svg {
    width: 1.125rem;
    height: 1.125rem;
    color: #6b7280;
}

.eau-app-header-email {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .eau-app-header-inner {
        padding: 0.625rem 1rem;
    }

    .eau-app-header-logo img {
        height: 38px;
    }

    .eau-app-header-email {
        display: none;
    }

    .eau-app-header-user i,
    .eau-app-header-user svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

@media (max-width: 480px) {
    .eau-app-header-inner {
        padding: 0.5rem 0.75rem;
    }

    .eau-app-header-logo img {
        height: 32px;
    }
}

/* ==========================================================================
   WordPress Admin Bar Adjustment
   ========================================================================== */

body.admin-bar .eau-app-header {
    top: 32px;
}

body.admin-bar.eau-custom-header .entry-content,
body.admin-bar.eau-custom-header .page-content,
body.admin-bar.eau-custom-header article.page,
body.admin-bar.eau-custom-header .elementor {
    padding-top: 102px !important;
}

@media (max-width: 782px) {
    body.admin-bar .eau-app-header {
        top: 46px;
    }

    body.admin-bar.eau-custom-header .entry-content,
    body.admin-bar.eau-custom-header .page-content,
    body.admin-bar.eau-custom-header article.page,
    body.admin-bar.eau-custom-header .elementor {
        padding-top: 116px !important;
    }
}

/* ==========================================================================
   Fix sidebar menu spacing (ensure no extra gaps)
   ========================================================================== */

.eau-app-header .eau-sidebar-menu-wrapper {
    line-height: 1;
    display: flex;
    align-items: center;
}

/* Override any extra spacing on sidebar menu items when inside header */
.eau-app-header .eau-sidebar-menu-nav .eau-sidebar-menu-item {
    margin: 0 !important;
    padding: 0 !important;
}

.eau-app-header .eau-sidebar-menu-nav .eau-sidebar-menu-link {
    margin: 0 !important;
}

/* Ensure sidebar menu toggle button is properly styled */
.eau-app-header .eau-sidebar-menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

.eau-app-header .eau-sidebar-menu-toggle:hover {
    background: #f3f4f6 !important;
}

.eau-app-header .eau-sidebar-menu-toggle svg {
    width: 24px !important;
    height: 24px !important;
    color: #374151 !important;
}
