/**
 * Top bar, main navigation, main top padding under fixed/sticky header.
 * Depends on equinox-tokens.css (and loads after equinox-lang.css).
 */

.user-bar,
.navigation,
.navigation__container,
.navigation__wrapper,
.topmenu_wrapper,
.main-menu,
.main-menu__wrapper {
    border-color: var(--eq-glass-stroke-faint) !important;
}

.navigation,
.user-bar {
    border-radius: 20px;
}

/* Menu area must stay fully transparent (shell glass comes from body.equinox-shell rules below) */
.navigation,
.navigation__container,
.navigation__wrapper,
.topmenu_wrapper,
.main-menu,
.main-menu__wrapper,
.header__info,
.info_lang_menu_wrapper {
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    border: 0 !important;
}

.navigation::before,
.navigation::after,
.navigation__container::before,
.navigation__container::after,
.navigation__wrapper::before,
.navigation__wrapper::after,
.user-bar::before,
.user-bar::after,
.topmenu_wrapper::before,
.topmenu_wrapper::after,
.main-menu::before,
.main-menu::after {
    pointer-events: none !important;
}

.navigation a,
.user-bar a,
.main-menu a {
    color: #dbe6ff !important;
}

.navigation,
.navigation__container,
.navigation__wrapper,
.header__logo,
.header__logo-desktop,
.header__logo-mobile {
    z-index: 10 !important;
}

/* =============================================================================
 * body.equinox-shell — top utility bar + main nav + main padding compensation
 * ============================================================================= */

/* Top utility bar (lang/contacts/auth): smaller, but scrolls with page */
body.equinox-shell .user-bar {
    position: relative !important;
    top: auto !important;
    left: auto;
    width: 100%;
    z-index: 40 !important;
    border-radius: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--eq-glass-stroke-muted) !important;
    background: var(--eq-surface-userbar) !important;
    -webkit-backdrop-filter: blur(16px) saturate(130%) !important;
    backdrop-filter: blur(16px) saturate(130%) !important;
}

body.equinox-shell .user-bar__container {
    min-height: var(--eq-topbar-height);
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

body.equinox-shell .header__contacts a:not(.user-bar__link),
body.equinox-shell .user-bar a,
body.equinox-shell .user-bar__link {
    font-size: 1.2rem !important;
    line-height: 1.4rem !important;
}

body.equinox-shell .user-bar__link,
body.equinox-shell .header__auth .user-bar__link,
body.equinox-shell .auth-wrapper .user-bar__link,
body.equinox-shell .link-login,
body.equinox-shell .link-register {
    padding: 0.6rem 1.4rem !important;
    min-height: 2.8rem !important;
}

/* Main navigation: fixed on top (mobile default); desktop overrides to sticky below */
body.equinox-shell .navigation {
    position: fixed !important;
    top: calc(var(--eq-admin-offset) + var(--eq-topbar-height) + var(--eq-nav-viewport-offset)) !important;
    left: 0;
    width: 100%;
    z-index: 90 !important;
    border-radius: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--eq-glass-stroke) !important;
    background: var(--eq-surface-nav) !important;
    -webkit-backdrop-filter: blur(14px) saturate(130%) !important;
    backdrop-filter: blur(14px) saturate(130%) !important;
}

body.equinox-shell .nav-wrapper.sticky.active .user-bar,
body.equinox-shell .nav-wrapper.sticky.active .navigation,
body.equinox-shell .navigation.sticky,
body.equinox-shell .navigation.sticky.active {
    background: var(--eq-surface-nav) !important;
}

/* Compensate content for fixed navigation */
body.equinox-shell .main.no-margin,
body.equinox-shell .main-wrapper {
    padding-top: calc(var(--eq-topbar-height) + var(--eq-nav-viewport-offset) + var(--eq-nav-height)) !important;
}

/* Inner pages: small gap below fixed nav (mobile / default; homepage unchanged) */
body.equinox-shell:not(.home):not(.flarex-homepage-template) .main.no-margin,
body.equinox-shell:not(.home):not(.flarex-homepage-template) .main-wrapper {
    padding-top: calc(var(--eq-topbar-height) + var(--eq-nav-viewport-offset) + var(--eq-nav-height) + var(--eq-inner-content-offset)) !important;
}

/* Desktop: contacts strip scrolls away; main nav sticky; overflow-x clip for sticky */
@media only screen and (min-width: 641px) {
    html,
    body,
    body.equinox-shell {
        overflow-x: clip !important;
    }

    body.equinox-shell {
        --eq-topbar-height: 0px;
        --eq-nav-viewport-offset: 0px;
        /* Rough flow height of the compact contacts strip (for hero min-height math only). */
        --eq-userbar-compact: 4.8rem;
    }

    body.equinox-shell .user-bar {
        position: relative !important;
        top: auto !important;
        left: auto;
        width: 100%;
        z-index: 40 !important;
    }

    body.equinox-shell .user-bar__container {
        min-height: 0 !important;
        height: auto !important;
        padding-top: 0.2rem !important;
        padding-bottom: 0.2rem !important;
        gap: 1rem !important;
        align-items: center !important;
    }

    body.equinox-shell .user-bar .contacts_wrapper {
        display: flex !important;
        align-items: center !important;
    }

    body.equinox-shell .user-bar .header__contacts {
        column-gap: 2rem !important;
        row-gap: 0 !important;
    }

    body.equinox-shell .header__contacts a:not(.user-bar__link) {
        line-height: 1.2rem !important;
    }

    body.equinox-shell .user-bar__left {
        gap: 0.8rem !important;
    }

    body.equinox-shell .user-bar .header__dark-mode {
        width: 4.4rem !important;
        height: 4.4rem !important;
        min-width: 4.4rem !important;
        min-height: 4.4rem !important;
        padding: 1.2rem 1.2rem !important;
        margin-left: 0.8rem !important;
        background-size: 2rem 2rem !important;
    }

    body.equinox-shell .user-bar__link,
    body.equinox-shell .header__auth .user-bar__link,
    body.equinox-shell .auth-wrapper .user-bar__link,
    body.equinox-shell .link-login,
    body.equinox-shell .link-register {
        padding: 0.6rem 1.4rem !important;
        min-height: 2.8rem !important;
    }

    body.equinox-shell .navigation {
        position: sticky !important;
        top: var(--eq-admin-offset) !important;
        margin-top: 0 !important;
    }

    body.home.equinox-shell .main.no-margin,
    body.home.equinox-shell .main-wrapper,
    body.flarex-homepage-template.equinox-shell .main.no-margin,
    body.flarex-homepage-template.equinox-shell .main-wrapper {
        padding-top: 0 !important;
    }

    body.equinox-shell:not(.home):not(.flarex-homepage-template) .main.no-margin,
    body.equinox-shell:not(.home):not(.flarex-homepage-template) .main-wrapper {
        padding-top: var(--eq-inner-content-offset) !important;
    }

    body.equinox-shell .navigation__container {
        padding: 1.2rem 3.2rem !important;
    }

    body.equinox-shell .header__info img {
        height: 4.6rem !important;
    }
}

/* Mobile: shell variables + fixed top nav (rest of mobile menu stays in equinox-custom.css) */
@media only screen and (max-width: 640px) {
    body.equinox-shell {
        --eq-admin-offset: 0px;
        --eq-topbar-height: 0px;
        --eq-nav-height: 76px;
        --eq-mobile-gutter: 1.6rem;
    }

    body.equinox-shell.admin-bar {
        --eq-admin-offset: 46px;
    }

    body.equinox-shell .navigation {
        top: var(--eq-admin-offset) !important;
        z-index: 1200 !important;
        background: var(--eq-surface-nav-mobile) !important;
        -webkit-backdrop-filter: blur(16px) saturate(130%) !important;
        backdrop-filter: blur(16px) saturate(130%) !important;
    }
}
