/**
 * Bootstrap 5 Compatibility Layer (Slim)
 *
 * Minimal backwards compatibility for Bootstrap 4 classes still in use.
 * Most BS4 classes have been migrated to BS5 equivalents.
 */

/* ============================================
   FORM UTILITIES (still heavily used)
   ============================================ */

/* .form-group - removed in BS5, provides spacing for form elements */
.form-group {
    margin-bottom: 1rem;
}

/* .form-inline - still used in a few places */
.form-inline {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}

.form-inline .form-control {
    display: inline-block;
    width: auto;
    vertical-align: middle;
}

.form-inline .form-group {
    display: flex;
    flex: 0 0 auto;
    flex-flow: row wrap;
    align-items: center;
    margin-bottom: 0;
}

/* ============================================
   CLOSE BUTTON COMPATIBILITY
   ============================================ */

button.close {
    padding: 0;
    background-color: transparent;
    border: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
    cursor: pointer;
}

button.close:hover {
    opacity: 0.75;
}

/* ============================================
   MEDIA OBJECT (for legacy components)
   ============================================ */

.media {
    display: flex;
    align-items: flex-start;
}

.media-body {
    flex: 1;
}

/* ============================================
   LEGACY FALLBACKS (rarely used)
   ============================================ */

/* .btn-block - use w-100 instead */
.btn-block {
    display: block;
    width: 100%;
}

/* .no-gutters - use g-0 instead */
.no-gutters {
    margin-right: 0;
    margin-left: 0;
}

.no-gutters > .col,
.no-gutters > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

/* .sr-only - use visually-hidden instead */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Display utilities provided by Bootstrap 5 – do NOT re-declare here
   as it breaks responsive variants like d-none d-lg-table-cell */
