/* =========================================================================
   Bootstrap 5 Transition Shim (Admin)
   -------------------------------------------------------------------------
   Stopgap styles for legacy Bootstrap 4 markup that has not yet been
   restructured. This file MUST be removed once every admin blade has been
   manually updated to Bootstrap 5 markup.
   ========================================================================= */

/* input-group-prepend / input-group-append wrappers were removed in BS5.
   Make them transparent so their children become direct flex items of the
   surrounding .input-group, restoring the BS5 layout for unmigrated markup. */
.input-group > .input-group-prepend,
.input-group > .input-group-append {
    display: contents;
}

/* form-inline was removed in BS5. Approximate horizontal layout. */
.form-inline {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: 0.5rem;
}
.form-inline > * {
    margin-bottom: 0;
}

/* `.form-text.text-muted` used to be a <small>. BS5 form-text is its own block.
   Keep small text rendering for legacy <small class="form-text"> markup. */
small.form-text {
    display: block;
    margin-top: 0.25rem;
    color: var(--bs-secondary-color, #6c757d);
}

/* Legacy: <button class="close"> patterns that may still appear in third-party
   plugins (bootstrap-notify, bootstrap-select). Map them to the BS5 close
   button visual so they don't render as bare text. */
button.close:not(.btn-close) {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #000;
    background: transparent var(--bs-btn-close-bg, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e")) center/1em auto no-repeat;
    border: 0;
    border-radius: 0.375rem;
    opacity: 0.5;
    font-size: 0;
    line-height: 0;
}
button.close:not(.btn-close) > * {
    display: none;
}
button.close:not(.btn-close):hover {
    opacity: 0.75;
}

/* badge-pill alias kept for any third-party widget still emitting the old class */
.badge-pill {
    border-radius: 50rem;
}
