/**
 * Primary navigation — nav-specific overrides.
 *
 * Style the LAST top-level item of the PRIMARY (header) nav as a button — the
 * client's Donate CTA — matching the site button defined in scss/_buttons.scss.
 * We can't add .wp-block-button__link to nav markup without a custom walker, so
 * the relevant button declarations are duplicated here (SCSS $primary-navy =
 * #24356E). Targeting :last-child (not a hardcoded label) means editors can
 * rename/reorder items and the last one always gets the button treatment.
 *
 * NOTE ON SELECTOR: the site's real navigation markup differs from a plain
 * `.wp-block-navigation > ul > li`:
 *   - The header nav wraps its <ul> in responsive-container / dialog <div>s, so
 *     the <ul> is NOT a direct child of .wp-block-navigation. We match the
 *     top-level list by its class (.wp-block-navigation__container) instead, and
 *     use `> li` so only top-level items (never submenu items, which live in
 *     .wp-block-navigation__submenu-container) are affected.
 *   - There is also a Footer Menu that IS a .wp-block-navigation, so we scope to
 *     `header` to avoid styling the footer's last item.
 *
 * Specificity here is high (0,5,3), and core navigation styles are emitted with
 * near-zero-specificity :where(), so no !important is needed.
 */

header .wp-block-navigation .wp-block-navigation__container > li.wp-block-navigation-item:last-child > a.wp-block-navigation-item__content,
header .wp-block-navigation .wp-block-navigation__container > li.wp-block-navigation-item:last-child > a.wp-block-navigation-item__content:visited {
    /* duplicated from .wp-block-button a/button in scss/_buttons.scss */
    color: #fff;
    background-color: #24356E;
    border: 2px solid #24356E;
    padding: 10px 20px;
    border-radius: 0;
    font-family: "Lato", sans-serif;
    font-weight: 700;
    font-size: 0.9375rem;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

header .wp-block-navigation .wp-block-navigation__container > li.wp-block-navigation-item:last-child > a.wp-block-navigation-item__content:hover,
header .wp-block-navigation .wp-block-navigation__container > li.wp-block-navigation-item:last-child > a.wp-block-navigation-item__content:focus,
header .wp-block-navigation .wp-block-navigation__container > li.wp-block-navigation-item:last-child > a.wp-block-navigation-item__content:focus-visible {
    /* matches .wp-block-button a:hover in scss/_buttons.scss (inverts to white bg / navy text) */
    color: #24356E;
    background-color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
