/* Site-specific additions on top of AdminLTE 4. */

.brand-link .brand-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin: 0 .5rem 0 .6rem;
    color: var(--bs-warning);
    vertical-align: middle;
}

.header-search {
    max-width: 32rem;
}

.rule-table th a:hover {
    text-decoration: underline !important;
}

.sort-button {
    border: 0;
    padding: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    white-space: nowrap;
}

.sort-button i {
    font-size: .75em;
    color: var(--bs-secondary-color);
}

th[aria-sort] .sort-button i {
    color: var(--bs-primary);
}

.rule-title {
    max-width: 44rem;
}

.rule-facts dt {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--bs-secondary-color);
}

.rule-facts dd {
    margin-bottom: .9rem;
}

.add-box {
    max-width: 48rem;
}

.login-logo-icon {
    font-size: 2.5rem;
    line-height: 1;
    color: var(--bs-warning);
}

.error-box {
    width: min(32rem, calc(100vw - 2rem));
}

.error-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Menu items with a count: keep the text clear of the count badge, wrapping
   long labels instead of running under it. Only while the menu is expanded. */
body:not(.sidebar-collapse) .sidebar-menu .nav-link:has(> p > .nav-badge) > p {
    display: inline-block;
    max-width: calc(100% - 4.75rem);
    white-space: normal;
    vertical-align: middle;
    line-height: 1.25;
}

/* The top bar's bottom border must line up with the one under the logo, which
   is 3.5rem tall including its border. The bar is otherwise 1px taller. */
.app-header.navbar {
    padding-bottom: calc(var(--bs-navbar-padding-y) - 1px);
}

/* Long lists inside a card scroll on their own. */
.children-list {
    max-height: 32rem;
    overflow-y: auto;
}

.children-list thead th {
    position: sticky;
    top: 0;
    background: var(--bs-body-bg);
    z-index: 1;
}

.children-list .table > :not(caption) > * > :first-child {
    padding-left: 1rem;
}

.children-list .table > :not(caption) > * > :last-child {
    padding-right: 1rem;
}
