/* =========================================
   BPage Nav Base — Shared structural behavior
   Loaded BEFORE theme CSS so themes override by cascade order.
   Does NOT set colors, fonts, backgrounds, or border-radius.
   ========================================= */

/* --- Nav Link Container Flex Layout --- */
.bpage-nav-links {
    display: flex;
    align-items: center;
    gap: var(--nav-gap, 0.25rem);
    flex-wrap: wrap;
}

/* --- Nav link transition (themes override via --nav-transition) --- */
.bpage-nav-links a,
.bpage-nav-links button {
    transition: var(--nav-transition, all 0.3s ease);
}

/* --- Active link weight boost --- */
.bpage-nav-links [aria-current="page"],
.bpage-nav-links .active > a,
.bpage-nav-links li.active a {
    font-weight: var(--nav-active-weight, 600);
}

/* --- CTA Hover Lift --- */
.bpage-nav-cta:hover {
    transform: translateY(var(--nav-cta-lift, -2px));
}

/* --- Focus-Visible (Haven-quality, theme-adaptive) --- */
.bpage-nav-links a:focus-visible,
.bpage-nav-cta:focus-visible {
    outline: 2px solid var(--nav-focus-color, var(--org, #F26122));
    outline-offset: 2px;
    border-radius: 4px;
}

/* Dark nav variant — white focus ring for visibility */
.bpage-nav-dark .bpage-nav-links a:focus-visible,
.bpage-nav-dark .bpage-nav-cta:focus-visible {
    outline-color: rgba(255, 255, 255, 0.9);
}

/* --- Legacy K3 ::after underline neutralization ---
   k3.css applies a ::after pseudo-element underline to .b_profile_tabs li a
   (width:77%, background:#000, changes to var(--org) on hover/active).
   Themes that use border-bottom for underlines instead must hide this ::after
   in their own CSS:  .{theme}-nav-tabs li a::after { display: none; }
   Currently needed by: Unity (.unity-nav-tabs), Editorial (.ed-nav-tabs).
   K3 keeps its own ::after (its nav class .k3-nav-tabs is not affected).
   The 6 themes without .b_profile_tabs class are inherently safe. */

/* --- Responsive Mobile Scroll (768px) --- */
@media (max-width: 768px) {
    .bpage-nav-links {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }
    .bpage-nav-links::-webkit-scrollbar {
        display: none;
    }
    .bpage-nav-links > * {
        white-space: nowrap;
        flex-shrink: 0;
    }
}
