/*!
 * Bootstrap 5 Compatibility Shim
 *
 * PURPOSE:
 * The site's bootstrap.min.css is still Bootstrap 3.3.7, but the JavaScript
 * layer (bootstrap.legacy.js) delegates to the real Bootstrap 5 JS runtime.
 * Bootstrap 5 uses different state classes than Bootstrap 3 to reveal
 * modals/collapses (e.g. ".show" instead of ".in"), so without this shim,
 * components are toggled correctly by JS but remain visually hidden because
 * the old Bootstrap 3 CSS has no rules for the new class names.
 *
 * This file ONLY adds the minimal visibility rules needed to bridge the
 * two versions. It does not replace or override Bootstrap 3 layout/theme
 * styles used throughout the site.
 */

/* ---- Modal: Bootstrap 5 uses .show, Bootstrap 3 CSS only handles .in ---- */
.modal.show {
    display: block;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -25%);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal.fade:not(.show) {
    opacity: 0;
    pointer-events: none;
}

.modal.fade.show {
    opacity: 1;
}

/* Bootstrap 5 backdrop uses .show for opacity; Bootstrap 3 CSS lacks this rule */
.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* ---- Collapse: Bootstrap 5 uses .show, Bootstrap 3 CSS only handles .in ---- */
.collapse:not(.show) {
    display: none;
}

.collapse.show {
    display: block;
}

.collapsing {
    position: relative;
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}

/* ---- Tooltip / Popper positioning safety (BS5 tooltips are appended to body) ---- */
.tooltip.show {
    opacity: 0.9;
}
