/* ---- "Pages ▾" toggle in the main bar: collapses the strip below ---- */
.nav-pages-toggle {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Outranks the theme skins' `.nav-link { margin: … }` shorthands, which would
   otherwise reset the auto left margin that pushes the toggle right. */
.navbar .nav-link.nav-pages-toggle {
    margin-left: auto;
}

.nav-pages-toggle-arrow {
    font-size: var(--font-size-xl);
    transition: transform 0.15s;
}

.nav-pages-toggle.collapsed .nav-pages-toggle-arrow {
    transform: rotate(-90deg);
}

/* ---- bookmarks-style strip under the main bar (inside the sticky navbar,
   so theme backgrounds and shadows wrap both rows) ---- */
.navbar-pages-bar {
    border-top: var(--border-width) solid var(--color-border-subtle);
}

.navbar-pages-bar[hidden] {
    display: none;
}

/* The strip is slimmer than the main bar. */
.navbar-pages-bar .nav-link {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Page tabs scroll horizontally when they outgrow the strip; the new-page
   button stays fixed. */
.navbar-pages {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    flex: 0 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.navbar-pages::-webkit-scrollbar {
    display: none;
}

.nav-new-page-form {
    display: flex;
    align-items: stretch;
    margin: 0 0 0 8px;
}

.nav-new-page {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-base);
    line-height: 1;
    white-space: nowrap;
    color: var(--color-text-muted);
}

.nav-new-page:hover {
    color: var(--color-accent);
}

.nav-page-li {
    display: flex;
    align-items: stretch;
}

.nav-page-tab {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* When a page tab is active, its tab text hugs the edit pencil beside it. */
.nav-page-li .nav-page-tab.active {
    padding-right: 6px;
}

.nav-page-edit {
    display: flex;
    align-items: center;
    padding: 0 12px 0 4px;
    color: var(--color-border-hover);
    text-decoration: none;
    font-size: var(--font-size-base);
    border-bottom: 3px solid transparent;
}

.nav-page-edit:hover {
    color: var(--color-accent);
    background: var(--color-surface-hover);
}