@keyframes lx-panel-enter {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lx-col--entering {
    animation: lx-panel-enter 1s cubic-bezier(0.25, 0.2, 0.25, 1) both;
}

.lx-col--open-enter {
    animation: lx-panel-enter 0.50s cubic-bezier(0.25, 0.2, 0.25, 1) both;
}

@keyframes lx-overlay-enter-right {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

/* ---- Item row base ---- */
.submenu-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 15px;
    padding: 12px 8px;
    cursor: pointer;
    border-left: 5px solid transparent;
    background: transparent;
    transition: background 0.12s ease, border-color 0.12s ease;
    gap: 8px;
    flex-shrink: 0;
}

.menu-link {
    font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
    color: #333333;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    flex: 1;
    white-space: normal;
    transition: color 0.12s ease, font-weight 0.1s ease;
    text-transform: none;
}

.submenu-item .chevron-right-icon,
.submenu-item .chevron-left-icon {
    background-color: #aaa !important;
    flex-shrink: 0;
}
.submenu-item .chevron-right-icon::before { background-color: #aaa; }
span.icon.chevron-right-icon.arrow-right,
span.icon.chevron-left-icon.arrow-right { min-width: 12px; }

/* ---- Active state (JS adds .menu-hover-active on the <li>) ---- */
.submenu-item.menu-hover-active > .submenu-wrapper {
    background: #ffffff;
    border-left-color: #0080ff;
}
.submenu-item.menu-hover-active > .submenu-wrapper .menu-link {
    color: #0080ff;
    font-weight: 600;
}
.submenu-item.menu-hover-active > .submenu-wrapper .chevron-right-icon,
.submenu-item.menu-hover-active > .submenu-wrapper .chevron-left-icon {
    background-color: #0080ff !important;
}
.submenu-item.menu-hover-active > .submenu-wrapper .chevron-right-icon::before {
    background-color: #0080ff;
}

/* ---- Smooth hover glider (desktop col-1 only) ---- */
@media (min-width: 1200px) {
    .lx-hover-glider {
        position: absolute;
        top: 0;
        left: 15px;
        right: 15px;
        border-left: 5px solid #0080ff;
        background: #ffffff;
        pointer-events: none;
        opacity: 0;
        z-index: 0;
        will-change: transform, opacity;
        transition: transform 0.22s cubic-bezier(0.25, 0.2, 0.25, 1), opacity 0.15s ease;
    }

        .lx-hover-glider.lx-glider--visible {
            opacity: 1;
        }

        .lx-hover-glider.lx-glider--instant {
            transition: none !important;
        }
    /* Items must sit above the glider */
    .lx-col-1 .submenu-item {
        position: relative;
        z-index: 1;
    }

    /* Col-1: glider owns the bg + border — remove from CSS :hover */
    .lx-col-1 .submenu-wrapper:hover {
        background: transparent;
        border-left-color: transparent;
    }

        .lx-col-1 .submenu-wrapper:hover .menu-link {
            color: #0080ff;
            font-weight: 600;
        }
    /* Col-1: glider owns the bg + border — remove from JS active state */
    .lx-col-1 .submenu-item.menu-hover-active > .submenu-wrapper {
        background: transparent;
        border-left-color: transparent;
    }
}

/* ---- Tablet overrides (768px–1199px) ---- */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .submenu-wrapper {
        margin: 0 !important;
        padding: 12px 16px !important;
        height: auto;
        min-height: auto;
        border-bottom: none;
        border-left: none;
    }

    .submenu-item.menu-hover-active > .submenu-wrapper {
        background: transparent !important;
        border-left-color: transparent !important;
    }
    .submenu-item.menu-hover-active > .submenu-wrapper > .menu-link {
        color: #0080ff !important;
        font-weight: 600 !important;
    }
    .submenu-item.menu-hover-active > .submenu-wrapper .chevron-right-icon,
    .submenu-item.menu-hover-active > .submenu-wrapper .chevron-left-icon {
        background-color: #0080ff !important;
    }
    .menu-link {
        letter-spacing: normal !important;
    }
    .submenu-item .chevron-right-icon { background-color: #aaa !important; }
    .submenu-item .chevron-right-icon::before { background-color: #aaa; }
}

@media (max-width: 767.98px) {
    .submenu-wrapper {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 56px;
        min-height: 56px;
        margin: 0 16px !important;
        padding: 0 !important;
        border-bottom: 1px solid #EFEFEF;
        border-left: none !important;
        background: transparent !important;
    }
    .menu-link {
        font-size: 16px !important;
        color: #333 !important;
        font-weight: 400 !important;
        letter-spacing: normal !important;
        white-space: nowrap;
    }
    /* Active item — !important needed to override mobile colour reset */
    .submenu-item.menu-hover-active > .submenu-wrapper > .menu-link {
        color: #0080ff !important;
        font-weight: 600 !important;
    }
    /* Figma: active label is blue but its chevron stays dark (#333) */
    .submenu-item.menu-hover-active > .submenu-wrapper .chevron-right-icon {
        background-color: #333 !important;
    }
    .submenu-item .chevron-right-icon {
        background-color: #333 !important;
        width: 16px;
        height: 24px;
    }
    .submenu-item .chevron-right-icon::before { background-color: #333; }

    .lx-col-3 .submenu-wrapper {
        height: 56px !important;
        min-height: 56px !important;
        margin: 0 16px !important;
        padding: 0 !important;
    }
}

.lx-mobile-root-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    z-index: 99999;
    background: #f9f9f9;
    flex-direction: column;
    overflow: hidden;
}
.lx-mobile-root-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 8px 4px;
    flex-shrink: 0;
}
.lx-root-close-btn {
    background: none;
    border: none;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: end;
    min-width: 44px;
    min-height: 44px;
}
.lx-root-close-btn .icon {
    width: 20px;
    height: 24px;
    background-color: #333;
    display: block;
}
.lx-mobile-root-list {
    flex: 1;
    overflow-y: auto;
}
.lx-root-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    min-height: 56px;
    margin: 0 16px;
    padding: 0;
    border-bottom: 1px solid #EFEFEF;
    -webkit-tap-highlight-color: transparent;
}
.lx-root-item-label {
    font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: normal;
    color: #333;
}
.lx-root-item--active .lx-root-item-label {
    color: #0080ff;
    font-weight: 600;
}
.lx-root-chevron {
    background-color: #333 !important;
    width: 16px;
    height: 24px;
}
.lx-root-item--active .lx-root-chevron { background-color: #333 !important; }

.nav-links.lx-overlay-active {
    display: block !important;
}

nav#header.lx-overlay-open {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 100000 !important;
}

@media (max-width: 1199.98px) {

    .submenu-wrapper-bg.level-1.lx-submenu-entering {
        animation: lx-overlay-enter-right 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    }

    .lx-mobile-header {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 8px;
        border-bottom: 1px solid #e5e5e5;
        background: #fff;
        z-index: 2;
    }
    .lx-back-btn,
    .lx-close-btn {
        background: none;
        border: none;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: end;
        min-width: 40px;
        min-height: 40px;
    }
    .lx-back-btn .icon,
    .lx-close-btn .icon {
        width: 20px;
        height: 24px;
        display: block;
        background-color: #333;
    }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    .lx-back-btn { display: flex !important; }
    .lx-mobile-header {
        justify-content: space-between;
        background: #f9f9f9;
        border-bottom: none;
        height: 56px;
    }
    .lx-slide-exit-right {
        transform: translateX(100%) !important;
        transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        will-change: transform;
        pointer-events: none;
    }
}
@media (max-width: 767.98px) {
    .lx-mobile-header {
        background: #f9f9f9;
        border-bottom: none;
        padding: 0;
        margin: 0 16px;
        height: 56px;
    }

    .lx-back-btn,
    .lx-close-btn {
        padding: 0;
        min-width: 0;
        min-height: 0;
    }
}

/* ================================================================
   MOBILE HEADER TITLE  (< 768px)
   Shows the current menu level name — updates as user drills in/out
   ================================================================ */
@media (max-width: 767.98px) {
    .lx-header-title {
        flex: 1;
        text-align: center;
        font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
        font-size: 16px;
        font-weight: 600;
        color: #333;
        letter-spacing: normal;
        text-transform: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 8px;
        pointer-events: none;
    }

    @keyframes lx-root-slide-right {
        from { transform: translateX(100%); }
        to   { transform: translateX(0); }
    }

    .lx-mobile-root-overlay.lx-root-entering {
        animation: lx-root-slide-right 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    }

    @keyframes lx-overlay-enter-right {
        from { transform: translateX(100%); }
        to   { transform: translateX(0); }
    }

    .submenu-wrapper-bg.level-1.lx-submenu-entering {
        animation: lx-overlay-enter-right 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    }

    .lx-slide-prepare-right {
        transform: translateX(100%) !important;
        transition: none !important;
        will-change: transform;
    }

    .lx-slide-prepare-left {
        transform: translateX(-100%) !important;
        transition: none !important;
        will-change: transform;
    }

    .lx-slide-active {
        transform: translateX(0) !important;
        transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        will-change: transform;
    }

    .lx-slide-exit-left {
        transform: translateX(-100%) !important;
        transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        will-change: transform;
        pointer-events: none;
    }

    .lx-slide-exit-right {
        transform: translateX(100%) !important;
        transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        will-change: transform;
        pointer-events: none;
    }
}
