/* KW BuddyPress Customisation — transitional Divi adapter compatibility.
 *
 * Keep corrections limited to Divi Theme Builder header geometry on BuddyPress
 * screens. Icon/font ownership remains with Divi and menu integrations.
 */
body.kwbpc-buddypress-screen .et-l--header .et_pb_row,
body.kwbpc-buddypress-screen #main-header .container {
    width: 80%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* Restore the Theme Builder menu-row alignment on BuddyPress routes. */
body.kwbpc-buddypress-screen .et-l--header .et_pb_row--with-menu {
    display: flex;
    align-items: center;
}

body.kwbpc-buddypress-screen .et-l--header .et_pb_row--with-menu > .et_pb_column--with-menu.et-last-child {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Deliberately do not force a font on .et-pb-icon here. Divi, Dashicons and
 * optional integrations may use different icon sources in the same header.
 */

/*
 * Divi can omit part of the native Icon module wrapper geometry when a
 * Theme Builder header is rendered on a BuddyPress virtual route.
 * Restore Divi's normal wrapper metrics without targeting generated module IDs.
 */
body.kwbpc-buddypress-screen
.et-l--header
.et_pb_module.et_pb_icon
.et_pb_icon_wrap {
    display: inline-block !important;
    position: relative !important;
    line-height: 0 !important;
}
