/*
 * LexSummary primary menu fixes.
 *
 * The site has 11 top-level menu items (Home, Search, All Cases,
 * Daily Status, About, By Court, plus five IP-topic dropdowns:
 * Patent, Copyright, Trademark, Trade Secret, Other IP Topics).
 * At Astra's default link padding the row overflows on most
 * laptop viewports (≤1600px) and the last item wraps to a
 * second line. These rules tighten the spacing so all eleven
 * fit on a single row from ~1180px upward, while leaving the
 * mobile menu (which uses its own off-canvas layout) untouched.
 */

@media (min-width: 922px) {
    /* Cap the link padding on top-level primary-menu items so the
     * row width stays inside the header bar. Astra's default is
     * roughly 0 20px; at 0 10px we save ~220px across 11 items. */
    .main-header-menu > .menu-item > .menu-link {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Shrink the dropdown-chevron column so it doesn't add a
     * disproportionate amount of width per dropdown item. The
     * default arrow is sized for desktop touch targets; we don't
     * need that. */
    .main-header-menu > .menu-item-has-children > .menu-link
        .ast-header-navigation-arrow {
        margin-left: 2px !important;
    }
    .main-header-menu .ast-icon.icon-arrow {
        width: 0.7em !important;
        height: 0.7em !important;
    }

    /* Belt-and-suspenders: prevent any wrapping in the primary
     * menu UL itself. If the items still overflow at very narrow
     * desktop widths, they'll horizontally scroll instead of
     * wrapping (Astra's mobile layout takes over below 922px). */
    .main-header-menu.ast-flex {
        flex-wrap: nowrap !important;
    }
}

/* At narrower-but-still-desktop widths, shrink a little more to
 * defer the second-line wrap as long as possible. */
@media (min-width: 922px) and (max-width: 1280px) {
    .main-header-menu > .menu-item > .menu-link {
        padding-left: 7px !important;
        padding-right: 7px !important;
        font-size: 0.94em;
    }
}
