/*
 * Shared sticky page subnav — GS1 Assistant, EDI / Integration, etc.
 * Main site nav scrolls away; page subnav sticks to viewport top.
 */

html:has(.lfs-page-subnav) {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--subnav-h) + 1rem);
}

html:has(.lfs-page-subnav) #masthead {
    position: relative;
    top: auto;
}

.lfs-page-subnav-target {
    scroll-margin-top: calc(var(--subnav-h) + 1rem);
}

.lfs-page-subnav {
    position: sticky;
    top: 0;
    z-index: 90;
    height: var(--subnav-h);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.lfs-page-subnav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-sizing: border-box;
}

.lfs-page-subnav__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.lfs-page-subnav__brand img {
    height: 2rem;
    width: 2rem;
    border-radius: 6px;
}

.lfs-page-subnav__links {
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
    display: flex;
    gap: 0.1rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.lfs-page-subnav__links::-webkit-scrollbar {
    display: none;
}

.lfs-page-subnav__links a {
    display: block;
    padding: 0.35rem 0.6rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.lfs-page-subnav__links a:hover,
.lfs-page-subnav__links a.is-active {
    color: var(--emerald);
    background: var(--emerald-soft);
}

.lfs-page-subnav__cta {
    flex-shrink: 0;
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff !important;
    background: var(--green);
    border-radius: var(--r-pill);
    white-space: nowrap;
    transition: background 0.15s;
}

.lfs-page-subnav__cta:hover {
    background: var(--green-hover);
}

@media (max-width: 48rem) {
    .lfs-page-subnav__brand span {
        display: none;
    }

    .lfs-page-subnav__links {
        margin-left: 0;
    }

    .lfs-page-subnav__cta {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }
}
