.corpus-scope-menu {
    position: relative;
}

.corpus-scope-options {
    position: absolute;
    z-index: 5;
    width: max-content;
    max-width: min(22rem, calc(100vw - 2rem));
    border: 1px solid #d5e2da;
    border-radius: .5rem;
    background: white;
    box-shadow: 0 .25rem .75rem rgb(0 0 0 / 12%);
}

.corpus-scope-search {
    min-width: min(16rem, calc(100vw - 2rem));
}

.corpus-scope-search:not([hidden]) {
    display: block;
}

.corpus-scope-options ul {
    max-height: 16rem;
    overflow-y: auto;
    overflow-wrap: anywhere;
}

.corpus-scope-menu a {
    display: block;
    padding: .5rem .75rem;
}

.corpus-scope-menu a[aria-current] {
    font-weight: 700;
    background: #e5f0e9;
}

@media (max-width: 575.98px) {
    .corpus-scope-menu {
        position: static;
    }

    .corpus-scope {
        position: relative;
    }

    .corpus-scope-options {
        left: 0;
        right: 0;
    }
}

.corpus-book-option {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: .4rem;
    padding: .2rem .45rem;
}

.corpus-book-option > a {
    flex: 1 1 11rem;
}

.corpus-book-option-actions {
    display: flex;
    gap: .25rem;
    margin-inline-start: auto;
}

.corpus-book-option-actions a {
    padding: .25rem .45rem;
    white-space: nowrap;
}
