/**
 * Bootstrap 5 backward compatibility styles
 * Provides BS4 classes that were removed in BS5
 */

/* BS4 column positioning: BS5 removed position:relative from columns.
   This is critical for ::after overlays and absolutely positioned children
   that rely on the column as their positioning context. */
.col,
[class*="col-"] {
    position: relative;
}

/* Contain ::after overlays within their column stacking context.
   Without z-index, position:relative alone doesn't create a stacking context,
   so absolutely positioned ::after pseudo-elements can paint above later sections. */
.text-columns .image {
    z-index: 0;
    overflow: hidden;
}

/* BS5 .row > * fix: prevent BS5 from applying column behavior to non-column
   direct children of .row (BS4 only styled actual col-* elements).
   BS5 adds gutter padding and flex-shrink:0 to all .row children;
   BS4 only did this for col-* elements. Width is NOT reset here because
   some non-column children (e.g. .green-gradient) rely on width:100%. */
.row > *:not([class*="col-"]):not(.col) {
    padding-right: 0;
    padding-left: 0;
    max-width: none;
    flex-shrink: 1;
}

/* .has-feedback / .has-success / .has-error (BS3 form validation, still used by settings) */
.has-feedback {
    position: relative;
}
.has-feedback .form-control-feedback {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    display: block;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    pointer-events: none;
}
.has-success .form-control {
    border-color: #198754;
}
.has-error .form-control {
    border-color: #dc3545;
}
