/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* containers */

.sidebar-nav-container {
    position: sticky;
    top: 230px; /* Adjust based on sticky header height */

    margin: 16px 0 72px;

    max-height: 70vh;
    overflow-y: auto;
}

.sidebar-nav-container::after {
    content: "";
    position: sticky;
    bottom: -1px;
    display: block;
    pointer-events: none;
    height: 60px;
    z-index: 2;
    background: linear-gradient(0deg, var(--white), transparent);
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* toggle */

.sidebar-nav__toggle {
    display: flex;
    width: 100%;
    padding: 14px 20px;

    cursor: pointer;
    border: none;
    background: var(--purple-dk);
    border-radius: var(--box-border-radius-sm) var(--box-border-radius-sm) 0 0;

    font-family: "Cachet";
    text-transform: uppercase;
    font-size: 22px;
    font-weight: 700;
    color: var(--white);

    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 2px; /* Small gap above list */
}

.sidebar-nav__toggle .toggle-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.sidebar-nav__toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* content */

.sidebar-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.sidebar-nav.is-open {
    max-height: 2500px; /* Allow for many links without cropping perfectly valid items! */
}

.sidebar-nav__list {
    list-style: none;
    padding: 0;
    margin: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav__item {
    border-left: 8px solid var(--blue-dk);
    transition: all 0.3s ease;
    overflow: hidden;
}
li.sidebar-nav__item .sidebar-nav__link {
    display: block;
    padding: 15px 18px;

    border: none;
    background: var(--blue-dk);
    border-radius: 0;

    font-family: "Cachet";
    text-transform: uppercase;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--white);

    transition: all 0.3s ease;
}
li.sidebar-nav__item:last-child {
    border-radius: 0 0 var(--box-border-radius-sm) var(--box-border-radius-sm);
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* hover & active states */
.sidebar-nav__item:hover {
    border-left: 8px solid #00aeef99;
}

.sidebar-nav__item.is-active {
    border-left: 8px solid var(--blue-lt);
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* mobile */

@media (max-width: 768px) {
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* containers */

    .sidebar-nav-container {
        position: relative;
        top: 0;
        max-height: 300px;
        margin: 30px 0;
    }

    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* hover & active states */

    .sidebar-nav__item.is-active {
        border-left: none;
    }
}
