/* The left menu's folding groups and the floating „Restrânge tot / Extinde tot” button (app/nav.rs).
   Colours come from each theme's own .nav-group, .badge and button rules; this file only lays them out. */

/* The floating button stays on top of the list while it scrolls. */
.nav-fold-all { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; padding: .15rem 0 .25rem; }
.nav .nav-fold-btn {
    padding: .48rem .9rem; gap: .45rem; border-radius: 999px; font-size: .95rem; font-weight: 600;
    background: var(--surface-solid); color: var(--ink-2); border: 1px solid var(--line-strong);
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45);
}
.nav .nav-fold-btn:hover { color: var(--ink); border-color: var(--accent); }
.nav-fold-btn .icon { width: 19px; height: 19px; }

/* A group title is a button: the whole row folds the group. */
.nav .nav-group {
    display: flex; align-items: center; justify-content: flex-start; gap: .5rem; width: 100%;
    margin: .55rem 0 .1rem; padding: .5rem .8rem; border: 0; border-radius: 10px; background: transparent;
    font-family: inherit; line-height: 1.2; text-align: left; box-shadow: none;
}
.nav .nav-group:hover { background: var(--surface-hover); }
.nav-group .icon { width: 16px; height: 16px; flex: none; transform: rotate(90deg); transition: transform .2s; }
.nav-group.folded .icon { transform: none; }
.nav-group .badge { letter-spacing: 0; text-transform: none; font-size: .82rem; }

/* Folding slides the links shut; folded links are hidden from the keyboard too. */
.nav-items { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .22s ease; }
.nav-items.folded { grid-template-rows: 0fr; }
.nav-items-inner {
    min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 3px;
    margin: 0 -.9rem; padding: 0 .9rem; transition: visibility 0s;
}
.nav-items.folded .nav-items-inner { visibility: hidden; transition: visibility 0s .22s; }

@media (prefers-reduced-motion: reduce) {
    .nav-items, .nav-group .icon { transition: none; }
}
