/*
 * "Toolkits" dropdown in the main navigation (all pages).
 * Desktop: floating menu under the button. Below 1024px (dark drawer): the two links
 * open inline under the button.
 */
.nav-dd {
    position: relative;
    display: flex;
    flex-direction: column;
}

.nav-dd__btn {
    gap: 0.35rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.nav-dd__btn .bi {
    font-size: 0.75em;
    transition: transform 0.2s;
}

.nav-dd__btn[aria-expanded="true"] .bi {
    transform: rotate(180deg);
}

.nav-dd__btn[aria-current="page"] {
    color: #000;
    font-weight: 700;
}

.nav-dd__btn:focus-visible,
.nav-dd__menu a:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

.nav-dd__menu {
    display: none;
    margin: 0;
    padding: 0.25rem;
    list-style: none;
}

.nav-dd.is-open .nav-dd__menu {
    display: block;
}

.nav-dd__menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    color: #000;
    white-space: nowrap;
    text-decoration: none;
}

.nav-dd__menu a:hover {
    background: var(--accent-soft, #eceffa);
    color: #000;
    text-decoration: none;
}

.nav-dd__menu a[aria-current="page"] {
    font-weight: 700;
    background: var(--accent-soft, #eceffa);
}

@media (min-width: 1024px) {
    .nav-dd__menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%);
        z-index: 40;
        min-width: 260px;
        border: 1px solid #000;
        border-radius: 5px;
        background: #fff;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    }
}

@media not all and (min-width: 1024px) {
    .nav-dd {
        align-items: flex-end;
    }

    .nav-dd__btn[aria-current="page"] {
        color: #fff;
    }

    .nav-dd__menu {
        text-align: right;
    }

    .nav-dd__menu a {
        color: #fff;
        white-space: normal;
    }

    .nav-dd__menu a:hover,
    .nav-dd__menu a[aria-current="page"] {
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
    }

    .nav-dd__btn:focus-visible,
    .nav-dd__menu a:focus-visible {
        outline-color: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-dd__btn .bi { transition: none; }
}
