/* Responsive single-row main menu with hamburger overflow */

#mainMenuContainer.menu {
    width: 100%;
    overflow: visible;
}

#mainMenuList {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    float: none;
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px 0 25px;
    overflow: visible;
}

#mainMenuList > li {
    float: none;
    flex: 0 0 auto;
    white-space: nowrap;
}

#mainMenuList > li > a {
    white-space: nowrap;
}

/* Hamburger / More button */
.menu-more {
    margin-left: auto;
    position: relative;
    flex-shrink: 0;
    z-index: 100001;
}

.menu-more > a.menu-more-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 40px;
    padding: 0 14px !important;
    line-height: 40px;
    text-decoration: none;
    gap: 6px;
}

.menu-more-label {
    font-size: 13px;
    color: #5d5d5d;
    line-height: 1;
}

.menu-hamburger-icon {
    display: block;
    width: 18px;
    height: 2px;
    background: #5d5d5d;
    position: relative;
    flex-shrink: 0;
}

.menu-hamburger-icon::before,
.menu-hamburger-icon::after {
    content: '';
    display: block;
    width: 18px;
    height: 2px;
    background: #5d5d5d;
    position: absolute;
    left: 0;
}

.menu-hamburger-icon::before {
    top: -6px;
}

.menu-hamburger-icon::after {
    top: 6px;
}

.menu-more.has-current > a.menu-more-toggle {
    background: #f28c38;
}

.menu-more.has-current .menu-hamburger-icon,
.menu-more.has-current .menu-hamburger-icon::before,
.menu-more.has-current .menu-hamburger-icon::after,
.menu-more.has-current .menu-more-label {
    background: transparent;
    color: #fff;
}

.menu-more.has-current .menu-hamburger-icon,
.menu-more.has-current .menu-hamburger-icon::before,
.menu-more.has-current .menu-hamburger-icon::after {
    background: #fff;
}

.menu-more.open > a.menu-more-toggle {
    background: #e8e8e8;
}

/* Overflow dropdown panel */
.menu > ul > li.menu-more > ul.menu-more-dropdown,
#menuMoreDropdown.menu-more-dropdown {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    min-width: 260px;
    width: 260px !important;
    height: auto !important;
    max-height: 75vh;
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 1 !important;
    visibility: visible;
    background: #fff !important;
    border: 1px solid #d5d5d5;
    border-top: 3px solid #f28c38;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    z-index: 100000;
    padding: 6px 0 !important;
    margin: 0;
    list-style: none;
    transition: none;
}

.menu-more.open > .menu-more-dropdown,
.menu > ul > li.menu-more.open > ul.menu-more-dropdown {
    display: block !important;
}

/* ---- Reset ALL inherited main.css rules inside more dropdown ---- */
#menuMoreDropdown,
#menuMoreDropdown ul {
    float: none !important;
}

#menuMoreDropdown li {
    float: none !important;
    display: block !important;
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
}

#menuMoreDropdown > li {
    border-bottom: 1px solid #ececec;
}

#menuMoreDropdown > li:last-child {
    border-bottom: none;
}

#menuMoreDropdown ul {
    display: none !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #f7f7f7 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
}

#menuMoreDropdown li.open > ul {
    display: block !important;
}

#menuMoreDropdown li:hover > ul {
    display: none !important;
}

#menuMoreDropdown li.open:hover > ul {
    display: block !important;
}

/* Top-level items in more menu */
#menuMoreDropdown > li > a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    color: #444 !important;
    line-height: 1.4 !important;
    padding: 11px 16px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    white-space: normal !important;
    background: #fff !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

#menuMoreDropdown > li > a b {
   
    padding: 0 !important;
    background: transparent !important;
    color: inherit !important;
    flex: 1;
}

#menuMoreDropdown > li.menu-more-has-children > a::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 10px;
    border-right: 2px solid #888;
    border-bottom: 2px solid #888;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

#menuMoreDropdown > li.menu-more-has-children.open > a::after {
    transform: rotate(45deg);
}

#menuMoreDropdown > li.current > a,
#menuMoreDropdown > li > a:hover {
    background: #fff5eb !important;
    color: #e07020 !important;
}

#menuMoreDropdown > li.current > a b {
    color: #e07020 !important;
}

/* Second-level submenu items */
#menuMoreDropdown > li > ul > li > a {
    display: block !important;
    color: #444 !important;
    line-height: 1.4 !important;
    padding: 9px 16px 9px 28px !important;
    font-size: 13px !important;
    white-space: normal !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    text-decoration: none !important;
}

#menuMoreDropdown > li > ul > li > a.arrow {
    padding-right: 36px !important;
    background-image: url(../images/sub-nav-arrow-n.png) !important;
    background-repeat: no-repeat !important;
    background-position: 92% 50% !important;
}

#menuMoreDropdown > li > ul > li > a:hover,
#menuMoreDropdown > li > ul > li.selected > a,
#menuMoreDropdown > li > ul > li.current > a {
    background: #f0f0f0 !important;
    color: #333 !important;
}

#menuMoreDropdown > li > ul > li.open > a.arrow {
    background-color: #f0f0f0 !important;    
    color: #333 !important;
}

/* Third-level submenu items */
#menuMoreDropdown > li > ul > li > ul {
    background: #efefef !important;
}

#menuMoreDropdown > li > ul > li > ul > li > a {
    display: block !important;
    color: #555 !important;
    padding: 8px 16px 8px 40px !important;
    font-size: 13px !important;
    white-space: normal !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    background: transparent !important;
}

#menuMoreDropdown > li > ul > li > ul > li > a:hover {
    background: #e4e4e4 !important;
    color: #f28c38 !important;
}

/* Hide empty placeholder submenu rows */
#menuMoreDropdown > li > ul > li:empty {
    display: none !important;
}
