/*--------------------------------------------------------------
# Imports
--------------------------------------------------------------*/
@import "_navigation.css";

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.site-header-wrapper {
    position: relative;
    margin: 0;
    padding-top: 5px;
    padding-bottom: 5px;
    border-top: 0;
    background: var(--color-header-bg);
    min-height: 51px;
    z-index: 999;
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.05), 0 5px 10px 0 rgba(189, 189, 189, 0.15);
}

.sticky-header .site-header-wrapper.has-sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
}

@media (max-width: 767px) {
    .site-header-wrapper {
        z-index: 9999;
    }
}

.sticky-header .site-header-wrapper.has-sticky-header {
    box-shadow: 0 1px 0 0 rgba(206, 206, 206, 0.05), 0 5px 10px 0 rgba(132, 132, 132, 0.15);
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.header-image {
    margin: 0 auto;
}

.header-image img {
    display: block;
    margin: 0 auto;
}

.custom-logo-link {
    display: block;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo-wrapper>a {
    margin-inline-end: 15px;
}

.site-branding img {
    width: auto;
    max-height: 64px;
    object-fit: contain;
}

/* Dark-mode logo swap. Both <img> render in the same anchor; CSS shows
   the right one based on the resolved color mode. The visitor's explicit
   light / dark choice always wins over the body class that marks the
   active style preset itself as dark - otherwise picking "Dark"
   variation locks the logo regardless of the visitor's toggle (the
   symptom on BuddyX free 5.1.0 release-review). Cascade reads as:
     1. Default - light logo visible, dark logo hidden.
     2. Body.buddyx-dark-style-variation - admin picked a Dark variation;
        becomes the dark default when visitor hasn't overridden.
     3. Visitor explicit light / dark - wins via higher-specificity
        selector chain (:root[data-bx-mode="..."] body .custom-logo--*). */
.custom-logo--dark {
    display: none;
}

/* Admin's "Dark variation" default - applies when visitor has no
   explicit mode override (data-bx-mode unset). */
body.buddyx-dark-style-variation .custom-logo--light {
    display: none;
}

body.buddyx-dark-style-variation .custom-logo--dark {
    display: inline-block;
}

/* Visitor explicit light always wins. The body descendant in the
   selector chain bumps specificity to (0,3,2), one above the body-class
   rule (0,2,1), so the body-class default cannot clobber a visitor's
   light toggle even when the Dark variation is active. */
:root[data-bx-mode="light"] body .custom-logo--light {
    display: inline-block;
}

:root[data-bx-mode="light"] body .custom-logo--dark {
    display: none;
}

/* Visitor explicit dark always wins (same specificity ladder). */
:root[data-bx-mode="dark"] body .custom-logo--light {
    display: none;
}

:root[data-bx-mode="dark"] body .custom-logo--dark {
    display: inline-block;
}

.site-title {
    margin: 0;
    margin-bottom: 6px;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-site-title);
}

.site-title a {
    text-decoration: none;
    color: var(--color-site-title);
}

.site-title:hover,
.site-title a:hover {
    color: var(--color-site-title-hover);
}

.site-description {
    margin: -5px 0 0;
    font-size: 14px;
    font-weight: inherit;
    line-height: 1.4;
    word-wrap: break-word;
    color: var(--color-site-tagline);
}

/* Phones: a text title plus tagline filled about 200px of the screen and pushed
   the menu toggle off it. Drop the tagline and let the title shrink. */
@media (max-width: 480px) {
    .site-branding {
        min-width: 0;
        padding-inline-end: 8px;
    }

    .site-title {
        margin-bottom: 0;
        font-size: clamp(20px, 6vw, 26px);
        line-height: 1.2;
    }

    .site-description {
        display: none;
    }

    /* Without this the title cannot shrink below its text and runs over the header icons. */
    .site-branding-inner {
        min-width: 0;
    }

    /* With a logo and a title side by side, the logo keeps a readable width and
       the title is the part that gives way. */
    .site-logo-wrapper {
        flex: 0 1 auto;
        min-width: 72px;
        max-width: 100%;
    }

    .site-logo-wrapper > a {
        margin-inline-end: 8px;
    }

    .site-branding .custom-logo-link img {
        min-width: 72px;
        max-width: 100%;
        max-height: 40px;
    }

    .site-title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

nav div.wp-block-navigation__responsive-dialog {

	@media (--narrow-menu-query) {
		margin: 1em;
	}
}



/*--------------------------------------------------------------
# Site Sub Header Layout
--------------------------------------------------------------*/

.bp-user .site-sub-header,
.single-item.groups .site-sub-header,
.group-create .site-sub-header {
    display: none;
}

.site-sub-header {
    position: relative;
    color: var(--bx-color-subheader-fg, var(--color-subheader-title));
    margin-bottom: 1rem;
    padding: 30px 0;
    background: var(--bx-color-subheader-bg);
    /* Full-bleed band (matches site header + footer behavior) regardless of
     * boxed/full-width layout. The 100vw + negative margin trick spans
     * viewport width even when ancestor is constrained. */
    width: 100vw;
    margin-left: -50vw;
    left: 50%;
}

.site-sub-header>.container,
.site-sub-header .woocommerce-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-flow: row wrap;
    padding: 0 15px;
}

.site-sub-header .woocommerce-products-header {
    width: 100%;
    padding: 0;
}

.site-sub-header>.container::before {
    content: none;
}

@media (max-width: 991px) {
    .site-sub-header>.container {
        padding: 0 20px;
    }
}

.archive-description p {
    margin: 0;
}

.site-sub-header .entry-header .entry-title,
.site-sub-header .page-header .page-title,
.site-sub-header .entry-header,
.site-sub-header .page-header,
.site-sub-header .entry-title,
.site-sub-header .page-title {
    position: relative;
    margin: 0;
    z-index: 1;
}

.site-sub-header .entry-title,
.site-sub-header .page-title,
.site-sub-header .page-header,
.site-sub-header .entry-header-title {
    color: var(--color-subheader-title);
    margin-right: auto;
}

.site-sub-header .entry-title a,
.site-sub-header .page-title a,
.site-sub-header .page-header a,
.site-sub-header .entry-header-title a {
    color: inherit;
}

@media (--narrow-menu-query) {

    .site .site-sub-header .entry-title,
    .site .site-sub-header .page-title {
        font-size: 24px;
    }
}


/*--------------------------------------------------------------
# Breadcrumbs
--------------------------------------------------------------*/

.buddyx-breadcrumbs,
#breadcrumbs {
    font-size: 14px;
    margin: 0;
}

.buddyx-breadcrumbs a,
#breadcrumbs a {
    color: var(--bx-color-accent-text, var(--color-theme-primary));
}

/* In dark mode the breadcrumb sits in the sub-header (#1c1c1c), a step above the page surface the base brand text
   shade is tuned for. A darker brand colour then reads 4.3:1 there. Use the shade made for raised
   greys; a brand colour that already passes (the default) is unchanged. */
:root[data-bx-mode="dark"] .site-sub-header .buddyx-breadcrumbs a,
:root[data-bx-mode="dark"] .site-sub-header #breadcrumbs a {
    color: var(--bx-color-accent-text-raised, var(--bx-color-accent-text, var(--color-theme-primary)));
}

.buddyx-breadcrumbs a:hover,
#breadcrumbs a:hover {
    text-decoration: underline;
}

.buddyx-trail-items {
    list-style: none;
}

.buddyx-trail-items,
.buddyx-trail-items li {
    display: inline-block;
    margin: 0;
    padding: 0;
    border: none;
    background: inherit;
    text-indent: 0;
}

.buddyx-trail-items li:not(.trail-end)::after {
    padding: 0 0.3em;
    content: "\00bb";
}
