/** Compact menu items within the native BuddyBoss header geometry. */
@media (min-width: 800px) {
    /* Move only the menu by five physical pixels; native logo/header sizes stay intact. */
    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) > .main-navigation #primary-navbar {
        position: relative;
        left: 5px;
    }

    /* Leave container, branding, navigation flex and account controls to the theme. */
    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li {
        padding-left: 6px;
        padding-right: 6px;
    }

    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li:first-child {
        padding-left: 0;
    }

    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.menu-item-has-children:not(.hideshow) {
        padding-right: 20px;
    }

    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li > a {
        font-size: 14px;
        letter-spacing: 0;
    }

    /* Menu Icons writes per-item sizes; only the first-level icons are normalized. */
    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li > a > ._mi {
        font-size: 20px !important;
        width: 20px;
        flex: 0 0 20px;
    }

    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li > a > ._before {
        margin-right: 6px;
    }

    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li > a > ._image,
    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li > a > ._svg {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }

    /* Template 2 puts its horizontal padding on the link instead of the LI. */
    body.dtfpro-compact-header.bb-template-v2.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li {
        padding: 0 3px;
    }

    body.dtfpro-compact-header.bb-template-v2.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li:first-child {
        padding-left: 0;
    }

    body.dtfpro-compact-header.bb-template-v2.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.menu-item-has-children:not(.hideshow) {
        padding-right: 3px;
    }

    body.dtfpro-compact-header.bb-template-v2.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li > a {
        padding: 0 5px;
    }

    body.dtfpro-compact-header.bb-template-v2.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.menu-item-has-children:not(.hideshow) > a {
        padding-right: 22px;
    }

    body.dtfpro-compact-header.bb-template-v2.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.menu-item-has-children:not(.hideshow):after {
        right: 3px;
    }

    /* The title remains intact in overflow/mobile menus and in the accessible name. */
    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.dtfpro-header-logout > a .dtfpro-header-logout-content {
        font-size: 0;
        display: inline-flex;
        align-items: center;
        gap: 0;
    }

    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.dtfpro-header-logout > a .dtfpro-header-logout-content > span:not(._mi) {
        font-size: 0;
    }

    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.dtfpro-header-logout > a .dtfpro-header-logout-content ._mi,
    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.dtfpro-header-logout > a .dtfpro-header-logout-content > i {
        font-size: 20px !important;
        width: 20px;
        flex: 0 0 20px;
        margin: 0;
    }

    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.dtfpro-header-logout > a .dtfpro-header-logout-content ._image,
    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.dtfpro-header-logout > a .dtfpro-header-logout-content ._svg,
    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.dtfpro-header-logout > a .dtfpro-header-logout-content > svg,
    body.dtfpro-compact-header.menu-style-standard .site-header--bb .default-header:not(.header-2) .primary-menu > li.dtfpro-header-logout > a .dtfpro-header-logout-content > img {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }

    body.dtfpro-compact-header .site-header--bb .main-navigation a:focus-visible,
    body.dtfpro-compact-header .site-header--bb .header-aside a:focus-visible {
        outline: 2px solid var(--bb-primary-color, #485bff);
        outline-offset: -2px;
        border-radius: 4px;
    }

    body.dtfpro-compact-header .site-header--bb .main-navigation .menu-item-has-children:focus-within > .sub-menu {
        opacity: 1;
        visibility: visible;
    }

    body.dtfpro-compact-header .site-header--bb #primary-menu .menu-item:focus-within > .ab-submenu,
    body.dtfpro-compact-header .site-header--bb #primary-navbar #navbar-collapse #navbar-extend .menu-item:focus-within > .ab-submenu {
        display: block;
        visibility: visible;
        opacity: 1;
    }

    body.dtfpro-compact-header .site-header--bb #primary-menu .ab-submenu .menu-item:focus-within > .ab-submenu {
        right: inherit;
        transform: translateX(-100%);
        top: -10px;
    }

    body.dtfpro-compact-header .site-header--bb #primary-menu .ab-submenu .menu-item:focus-within > .ab-submenu:before {
        display: none;
    }
}
