/* The handful of rules the stylesheets of the library removed in #526 contributed that
 * Bootstrap 5.3 does not have,
 * and that this codebase actually depends on.
 *
 * The list is measured, not guessed: the class selectors of its three stylesheets were
 * diffed against bootstrap 5.3.3, which left 1003 classes only that library defined.
 * Intersected with the class tokens this repository actually writes in its own markup and its
 * own .razor.css that came down to three, plus one rule that no class name reveals. Everything
 * else it shipped - the grid utilities, jumbotron, steps, rating, flatpickr, the b-* internals
 * - was dead weight here.
 *
 * A correction to what this file said before: fs-1 to fs-4 DO need a shim, and the reason is
 * not that Bootstrap lacks them. Both define the same fluid base - .fs-1 is
 * `calc(1.375rem + 1.5vw)` in each - but Bootstrap caps it in a `min-width: 1200px` media
 * query and the old library did not, and its declaration came later, so the cap never
 * applied. Measured at a 1600px viewport: fs-1 was 46px and is 40px, fs-3 was 30.4px and is
 * 28px, fs-4 was 25.2px and is 24px. Forty places write one of the four.
 *
 * Reading that Bootstrap "defines them itself" and stopping there is what missed it. The
 * breakpoint variants (fs-md-3 and friends) really are the old library's alone, and really
 * are unused here.
 *
 * BZ-40 checked each rule against the markup that survived the migration. All four are still
 * carried by something - .btn-xs in twelve files, .btn-group-xs in three, .cursor-pointer in
 * one, .fs-xs in the two build stamps - so this file is no longer transitional. A rule goes
 * when the last markup using it goes, not before.
 */

/* Bootstrap leaves .modal at display:none and lets its JavaScript set display:block inline
 * when opening. NimbusModal drives visibility from Blazor and never runs that JavaScript, so
 * without this rule it renders a backdrop that swallows clicks in front of an invisible
 * dialog. The rule used to come from the removed library's own Bootstrap 5 stylesheet, which
 * meant the replacement dialog quietly depended on the thing it replaced. This is the copy
 * that outlived it. */
.modal.show {
    display: block;
}

/* Extra small buttons. Bootstrap stops at .btn-sm. Values taken verbatim from
 * the removed library's Bootstrap 5 stylesheet so the button size does not shift. */
.btn-xs,
.btn-group-xs > .btn {
    padding: .15rem .5rem;
    font-size: .75rem;
    line-height: 1.5;
}

/* The library's own rule ends with `border-radius: .15rem`, and it is deliberately not copied.
 * It never applied: the theme provider's `.btn { border-radius: .25rem }` came later in the
 * cascade and won at equal specificity, so an extra-small button measured 4px, not 2.4px.
 * Copying the declaration into this file - which loads after nimbus-tokens.css - would have
 * inverted that order and sharpened the corners of every btn-xs in the application. Measured
 * on the two on /cp/{domain}/orga. */

.cursor-pointer {
    cursor: pointer;
}

/* Bootstrap's font size scale stops at .fs-6, which is 1rem. Two build stamps in the side
 * menus are set in .fs-xs, a class of the removed library worth 0.75rem. Copied rather than
 * rounded up to
 * .fs-6, which would make the stamp the same size as the menu entries above it. */
.fs-xs {
    font-size: .75rem !important;
}

/* A dropdown toggle carries no border and no shadow.
 *
 * `.dropdown .btn.dropdown-toggle:not(.btn-outline){box-shadow:none;border:0}` came from the
 * removed library's Bootstrap stylesheet. Without it every toggle in the application grew by
 * the 2px Bootstrap's .btn spends on a transparent border - measured on the user menu of both
 * top bars: 177.03x52 before, 179.03x54 after, with padding, margin, box-sizing, line-height
 * and font size all identical.
 *
 * The compatibility analysis in BZ-07 could not find this one. It intersected the CLASS NAMES
 * the library defines with the ones this repository writes, and `dropdown`, `btn` and
 * `dropdown-toggle` all exist in Bootstrap on their own - only their combination was the
 * library's. A rule whose selector is a combination of shared names is invisible to a scan
 * over names.
 *
 * The :not() is copied rather than reasoned about: nothing here writes the bare `btn-outline`
 * that the library used, so the rule applied to outline toggles too, and keeping the selector
 * keeps that. */
.dropdown .btn.dropdown-toggle:not(.btn-outline) {
    box-shadow: none;
    border: 0;
}

/* The uncapped font scale.
 *
 * Bootstrap caps .fs-1 to .fs-4 from 1200px up; the removed library declared the fluid value
 * without a cap and won on order, so on any wide screen these four were larger than Bootstrap
 * alone makes them. Restored here so the removal changes nothing by itself.
 *
 * This is transitional and named for acceptance in #526 (BZ-40): dropping it is a deliberate
 * decision to let forty headings shrink to Bootstrap's own scale, not a side effect of taking
 * a library out. Delete this block the day that decision is made. */
@media (min-width: 1200px) {
    .fs-1 { font-size: calc(1.375rem + 1.5vw) !important; }
    .fs-2 { font-size: calc(1.325rem + .9vw) !important; }
    .fs-3 { font-size: calc(1.3rem + .6vw) !important; }
    .fs-4 { font-size: calc(1.275rem + .3vw) !important; }
}

/* The close button keeps its old size.
 *
 * The removed library carried `.b-layout, .b-layout * { box-sizing: border-box }` - a class
 * selector, loaded after Bootstrap, so it beat every box-sizing Bootstrap declares inside the
 * application shell. Bootstrap declares exactly two: `.btn-close` and a carousel indicator
 * this codebase never renders. So that blanket rule had exactly one visible effect here, and
 * this is it.
 *
 * Bootstrap gives .btn-close `width: 1em; padding: .25em; box-sizing: content-box`, which is
 * 30px at this font size. Under the old cascade it was 20px. The notification panel's close
 * button is right aligned, so the 10px of growth moved its left edge 10px inwards - measured,
 * 386 before and 376 after.
 *
 * Written as one narrow rule rather than reproducing the blanket one: identical outcome for
 * this markup, and it says what it does. Not carried into the landing layouts on purpose -
 * they never had a .b-layout around them, so their close buttons were content-box before too,
 * and nimbus-bootstrap.css is loaded only where the old wrapper used to be.
 *
 * The comment in NimbusAppShell.razor.css said Bootstrap's reboot does the same thing as that
 * blanket rule. It does not: the reboot is `*`, specificity zero, and loses to any class rule.
 * That mistake is corrected there. */
.btn-close {
    box-sizing: border-box;
}
