/*
 * FLRent Bootstrap 4 legacy content compatibility
 *
 * FLRent versions up to the legacy Camper theme loaded Bootstrap 4.0.0.
 * FLRent 0.7.x uses Bootstrap 5.3.x. Bootstrap 5 removed several Bootstrap 4
 * form-layout classes that are still present in existing WordPress page content.
 *
 * Keep this file intentionally narrow: restore removed layout helpers only.
 */

/* Bootstrap 4 form spacing. */
.form-group {
  margin-bottom: 1rem;
}

/* Bootstrap 4 compact form grid. Removed in Bootstrap 5. */
.form-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-right: -5px;
  margin-left: -5px;
}

.form-row > .col,
.form-row > [class*="col-"] {
  padding-right: 5px;
  padding-left: 5px;
}

/* Bootstrap 4 input-group wrappers. Bootstrap 5 expects direct children. */
.input-group-prepend,
.input-group-append {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.input-group-prepend .btn,
.input-group-append .btn {
  position: relative;
  z-index: 2;
}

.input-group-prepend .btn + .btn,
.input-group-prepend .btn + .input-group-text,
.input-group-prepend .input-group-text + .input-group-text,
.input-group-prepend .input-group-text + .btn,
.input-group-append .btn + .btn,
.input-group-append .btn + .input-group-text,
.input-group-append .input-group-text + .input-group-text,
.input-group-append .input-group-text + .btn {
  margin-left: -1px;
}

.input-group-prepend {
  margin-right: -1px;
}

.input-group-append {
  margin-left: -1px;
}

/* Bootstrap 4 used .custom-select. Preserve existing page markup without
 * changing Bootstrap 5's .form-select implementation. */
select.custom-select {
  display: inline-block;
  width: 100%;
  height: calc(2.25rem + 2px);
  padding: 0.375rem 1.75rem 0.375rem 0.75rem;
  line-height: 1.5;
  color: #495057;
  vertical-align: middle;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Bootstrap 4 custom radio/checkbox structural helpers. Keep native inputs
 * usable while restoring the old label/spacing model. */
.custom-control {
  position: relative;
  display: block;
  min-height: 1.5rem;
  padding-left: 1.5rem;
}

.custom-control-inline {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  margin-right: 1rem;
}

.custom-control-input {
  position: absolute;
  left: 0;
  z-index: 1;
  width: 1rem;
  height: 1.25rem;
  opacity: 1;
}

.custom-control-label {
  position: relative;
  margin-bottom: 0;
  vertical-align: top;
}
