/**
 * Theme Name: Overseas - Child Theme
 * Template:   butler-www
 */

 .primary-overseas-menu-container-wrapper {
    position: relative;
	display: flex;
    z-index: 10;
	justify-content: space-between;
	width: var(--content-width);
	max-width: 100vw;
	margin: auto;
 }

/* ONLY show on mobile */
@media (max-width: 768px) {
    .primary-overseas-menu-container-wrapper {
        display: none;
    }

    .primary-overseas-menu-container .menu {
        background-color: var(--color-theme-white);
    }

    #primary-menu {
        margin-left: 0;
        margin-bottom: 0;
        margin-top: 0;
    }

    .menu-toggle {
        display: block;
    }

    .nav--toggled-on .primary-overseas-menu-container-wrapper {
        display: flow;
    }

    #primary-menu li {
        padding: .25rem;
        padding-right: 0;
        padding-left: 0;
        display: flex;
        flex-wrap: wrap;
        
    }

    .menu-item-has-children:hover .sub-menu,
    .menu-item-has-children .sub-menu.toggle-show {
        position: unset;
        margin-top: .5rem;
    }

    #primary-menu a {
        width: 75%;
        padding-left: .5rem !important;
    }

    .dropdown-toggle {
        width: 25%;
    }

    .menu-item-has-children .sub-menu {
        width: 100%;
    }
    
    .sub-menu li:focus-within button,
    .menu-item--toggled-on button {
        transform: rotate(180deg);
    }

}
/* ONLY show on desktop */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    #primary-menu {
        margin-top: 0;
        margin-bottom: 0;
        /* This margin lines the buttons up with the logo. */
        margin-left: 1.75rem;
        width: 100%;
    }

    /* Main display for the menu on desktop */
    .primary-overseas-menu-container .menu {
        display: flex;
        column-gap: .5rem;
    }

    .nav--toggled-on .primary-overseas-menu-container-wrapper {
        display: flow;
        position: absolute;
    }

    #primary-menu li {
        padding: .25rem .5rem;
        display: flex;
    }

    .menu-item-has-children:hover .sub-menu,
    .menu-item-has-children .sub-menu.toggle-show {
        position: absolute;
    }

    .menu-item-has-children:hover .sub-menu {
        display: flow;
    }

    #primary-menu a {
        width: 100%;
    }

    .sub-menu {
        border-bottom: 2px solid var(--color-theme-blue);
    }

    .dropdown-toggle {
        border-radius: 50%;
    }
    .menu-item-has-children:hover .sub-menu,
    .sub-menu.toggle-show  {
        /* Aligns the menu with the top-level item */
        margin-left: -.5rem;
    }

}

.main-navigation {
    background-color: var(--color-theme-white);
    border-bottom: 1px solid var(--color-theme-blue);
}

.dropdown-toggle {
    border: none;
    background-color: transparent;
    background-image: url(./assets/images/dropdown-arrow.svg);
    background-repeat: no-repeat;
    background-position: center;
}

.menu-item-has-children .sub-menu {
    display: none;
}

.menu-item-has-children .sub-menu.toggle-show {
    display: flow;
}

.menu-item-has-children ul {
    list-style: none;
    margin-left: 0;
    padding: 0;
}

#primary-menu {
    list-style: none;
    padding-left: 0;
}

/* Styling for the background of each button. */

/* Styles all top-level list items. */
#primary-menu > li {
    background-color: var(--color-theme-grey-light);
}

.menu-toggle {
    border: none;
    background-color: var(--color-theme-white);
    font-size: 1.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.menu-toggle .butler-icon {
    color: var(--color-theme-primary)
}

.butler-icon span {
	position: relative;
}

#primary-menu a {
    font-weight: 300;
}

/* Change background color of top-level menu item when sub-menu is visible. */
.menu-item-has-children:hover,
.sub-menu li:hover {
    background-color: var(--color-theme-blue) !important;
}

/* Change the text color of the top-level item AND the hovered item to white. */
.menu-item-has-children:hover > a,
.sub-menu li:hover > a {
    color: var(--color-theme-white) !important;
}

.menu-item-has-children:hover button,
.sub-menu li:hover button,
.menu-item-has-children:focus-within button,
.sub-menu li:focus-within button {
    filter: brightness(100);
}

/***********************/

/* Styles ALL list items EXCEPT top-level items. */
.sub-menu li {
    background-color: var(--color-theme-grey-light);
}

.sub-menu li:not(:last-child) {
    /* We don't want a bottom margin on the last element in the list. */
    margin-bottom: 2px;
}

.sub-menu {
    /* This margin makes it so the menu does not overlap any buttons AND allows the bottom border to show through the top. */
    margin-top: calc(2.25rem + 2px);
    background-color: var(--color-theme-white);
}
/***********************/

/* Styling for the link inside of each button. */
#primary-menu li > a {
    color: var(--color-theme-primary);
    text-decoration: none;
    padding: inherit;
}

#primary-menu li:hover > a,
#primary-menu li:focus-within > a {
    text-decoration: underline;
}

/* Change background color of top-level menu item when link is focused. */
#primary-menu li:focus-within {
    background-color: var(--color-theme-blue);
}

/* Change the text color of the top-level item AND the focused link to white. */
#primary-menu li:focus-within > a {
    color: var(--color-theme-white) !important;
}

/* Change background color of sub-menu item when link is focused. */
.sub-menu li:focus-within {
    background-color: var(--color-theme-blue);
}

/* Change the text color of the sub-menu item AND the focused link to white. */
.sub-menu li:focus-within > a {
    color: var(--color-theme-white) !important;
}

.custom-logo {
    filter: unset !important;
    -webkit-filter: unset !important;
}

.mobile-logo {
    filter: unset !important;
    -webkit-filter: unset !important;
}

/*.menu-utility-visible li a:focus-visible, .menu-utility-visible li a:hover,
.candybox-menu-button:hover .candybox-closed-text,
.candybox-menu-button:hover .candybox-closed-text+.bi-candybox,
.internal-resources-menu-container-inner ul li a:focus, .internal-resources-menu-container-inner ul li a:hover {
    color: var(--color-theme-forest-alt) !important;
}
    
This is used to change the color of all the hoverable links. keeping just in case we need it later.
*/

.bu-font-secondary {
    font-family: var(--secondary-font-family) !important;
    font-size: 3rem !important
}

.custom-logo {
    width: 418px !important;
}