/* Compact desktop navigation: 1200–1599px keeps the primary menu visible
   without allowing the brand or utility controls to leave the viewport. */
@media (min-width: 1200px) and (max-width: 1599.98px) {
    .head-sticky .main-navbar {
        padding-inline: 10px !important;
        padding-block: 8px !important;
    }

    .head-sticky .main-navbar .container-fluid {
        gap: 5px;
    }

    .public-navbar-brand {
        gap: 6px;
    }

    .public-navbar-brand img {
        width: 38px;
        height: 38px;
    }

    /* The portal name remains visible; the repeated department line is
       withheld only while the navigation is space-constrained. */
    .public-navbar-brand small {
        display: none;
    }

    .public-navbar-brand strong {
        font-size: 18px;
    }

    .head-sticky .main-navbar .navbar-nav {
        gap: 0;
    }

    .head-sticky .main-navbar .navbar-nav .nav-link {
        gap: 4px;
        padding-inline: 5px !important;
        font-size: .84rem;
    }

    .head-sticky .main-navbar .navbar-nav .nav-link i {
        font-size: .9rem;
    }

    .head-sticky .global-menu-search { flex: 0 1 190px; }

    .head-sticky .global-menu-search__form {
        height: 38px;
    }

    .head-sticky .global-menu-search__submit {
        flex-basis: 38px;
    }

    .head-sticky .main-navbar .navbar-nav .language-dropdown-toggle,
    .head-sticky .main-navbar .navbar-nav .accessibility-nav-button {
        padding-inline: 5px;
    }

    .head-sticky .main-navbar .navbar-nav .login-pill .nav-link {
        min-width: 72px;
        padding-inline: 8px !important;
    }

}

/* On every desktop width, search owns the flexible gap and the language
   selector follows it. This keeps the complete search/utility group aligned
   to the right edge instead of leaving an empty strip between them. */
@media (min-width: 1200px) {
    .head-sticky .main-navbar .navbar-nav .global-menu-search {
        margin-inline: auto 0 !important;
    }

    .head-sticky .main-navbar .navbar-nav .lang-switch {
        margin-left: 0 !important;
    }

    /* The normal public-page focus ring is blue. Menu search already has a
       visible green focus treatment, so it should not receive a second ring. */
    .public-body .global-menu-search__input:focus-visible,
    .global-menu-search__input:focus-visible {
        outline: 0 !important;
        outline-offset: 0;
    }

    .global-menu-search__input:focus {
        box-shadow: inset 0 0 0 2px #0b7a2a;
    }
}
