/* Reserve space for the menu toggle and brand on narrow screens. */
.proconta-header .navbar-brand {
    flex-shrink: 0;
    font-size: 1.375rem;
}

.proconta-header-search {
    flex: 0 1 20rem;
    min-width: 0;
}

.proconta-header-search > .nav-item,
.proconta-header-search .search-box,
.proconta-header-search .search-input {
    width: 100%;
    min-width: 0;
}

.proconta-header-search .proconta-search-results {
    left: 0;
    top: calc(100% + .35rem);
    width: 100%;
    min-width: 0;
    max-height: min(20rem, 50vh);
    overflow-y: auto;
}

.proconta-search-results .dropdown-item {
    white-space: normal;
    overflow-wrap: anywhere;
}

.proconta-header-company {
    width: 210px;
    min-width: 0;
}

@media (max-width: 1199.98px) {
    /* The expanded mobile menu must remain above the extra header rows. */
    .navbar-vertical.navbar-expand-xl {
        z-index: 1021;
    }

    /* Keep the taller header in flow so it cannot cover the page content. */
    .navbar-vertical.navbar-expand-xl + .content {
        padding-top: 0;
    }

    .navbar-vertical.navbar-expand-xl + .content .navbar-top.proconta-header {
        position: sticky;
        width: auto;
        max-width: none !important;
    }

    .navbar-top.proconta-header {
        flex-wrap: wrap;
        height: auto;
        padding-top: .75rem;
        padding-bottom: .75rem;
        row-gap: .75rem;
    }

    .proconta-header-search {
        order: 2;
        flex: 0 0 100%;
    }

    .proconta-header .navbar-nav-icons {
        min-width: 0;
        max-width: 100%;
    }

    .proconta-header-company {
        flex: 0 1 210px;
    }
}

@media (max-width: 575.98px) {
    .proconta-header .navbar-nav-icons {
        flex: 0 0 100%;
    }

    .proconta-header-company {
        flex: 1 1 0;
        width: auto;
    }
}
