/* =========================================================
   headerTopEmega.isml (DESKTOP HEADER)
========================================================= */

@media (max-width: 768px) {
    html body .main-menu ul.navbar-nav,
    html body .main-menu .navbar-nav {
        display: block !important;
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }
}

.emega-header-top.container-fluid {
    max-width: 100%;
    padding: 0 12px;
}

@media (min-width: 769px) {
    .emega-header-top.container-fluid {
        background: #fff;
    }
}

/* desktop only */
@media (min-width: 769px) {
    .emega-header-top .emega-header-row {
        display: grid !important;
        grid-template-columns: max-content minmax(0, 1fr) max-content;
        column-gap: 16px;
        align-items: center;
        min-height: 64px;
        width: 100%;
        margin: 0;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .emega-header-top .emega-header-mobile {
        display: none !important;
    }

    .main-menu {
        display: block !important;
    }

    .emega-header-zone--logo,
    .emega-header-zone--search,
    .emega-header-zone--actions {
        min-width: 0;
        display: flex;
        align-items: center;
    }

    .emega-header-zone--logo {
        justify-content: flex-start;
    }

    .emega-header-zone--search {
        justify-content: stretch;
        width: 100%;
    }

    .emega-header-zone--actions {
        justify-content: flex-end;
    }

    .emega-header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        white-space: nowrap;
    }

    .emega-header-top .brand {
        display: flex !important;
        align-items: center !important;
        height: 64px;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        left: auto !important;
        transform: none !important;
        text-align: left !important;
    }

    .emega-header-top .logo-home,
    .emega-header-top .logo-home:hover,
    .emega-header-top .logo-home:focus {
        display: inline-flex;
        align-items: flex-end;
        text-decoration: none !important;
        margin: 0;
        padding: 0;
        line-height: 1;
    }

    .emega-header-top .logo-home img.d-lg-none {
        display: none !important;
    }

    .emega-header-top .emega-logoLockup {
        display: inline-flex;
        align-items: flex-end;
        gap: 4px;
    }

    .emega-header-top .emega-logoImg {
        display: block;
        height: 30px;
        width: auto;
        max-width: 260px;
        object-fit: contain;
    }

    .emega-header-top .emega-logoTld {
        display: inline-block;
        font-size: 18px;
        font-weight: 700;
        line-height: 1;
        color: #111;
        white-space: nowrap;
        text-decoration: none !important;
    }
}

/* mobile only */
@media (max-width: 768px) {
    .emega-header-top .emega-header-row {
        display: none !important;
    }

    .emega-header-top .emega-header-mobile {
        display: block !important;
    }

    .main-menu {
        display: none !important;
    }

    .emega-logoTld {
        display: none !important;
    }
}

/* =========================================================
   ACCOUNT DROPDOWN
========================================================= */

.emega-account {
    position: relative;
}

.emega-account__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: #111;
    text-decoration: none !important;
    cursor: pointer;
    font: inherit;
    position: relative;
    z-index: 10002;
}

.emega-account__hello,
.emega-account__label {
    font-size: 14px;
    line-height: 1;
}

.emega-account__link .fa {
    font-size: 16px;
}

.emega-account__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    z-index: 10000;
    pointer-events: none;
}

.emega-account--open .emega-account__overlay {
    pointer-events: auto;
}

.emega-account__menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 10002;
}

.emega-account__menu-link {
    display: block;
    padding: 10px 16px;
    color: #111;
    text-decoration: none !important;
}

.emega-account__menu-link:hover {
    background: #f5f5f5;
}

.emega-account__menu--guest {
    min-width: 260px;
    padding: 16px;
}

.emega-account__signin-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: center;
    background: #e50f11;
    color: #fff !important;
    border-radius: 4px;
    font-weight: 600;
}

.emega-account__signin-btn:hover {
    background: #c90d0f;
}

.emega-account__register-row {
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
}

.emega-account__register-text {
    color: #555;
}

.emega-account__register-link {
    color: var(--blue);
    text-decoration: underline !important;
    margin-left: 4px;
}

.emega-account--open .emega-account__overlay,
.emega-account--open .emega-account__menu {
    display: block;
}

/* =========================================================
   LEGACY FLOAT RESETS
========================================================= */

.emega-header-top .navbar-header,
.emega-header-top .pull-left,
.emega-header-top .pull-right {
    float: none !important;
    position: static !important;
}

.emega-header-top .logo-home * {
    text-decoration: none !important;
}
