/**
 * Bootstrap 4 compatibility helpers for DCTLearn theme.
 * Keeps legacy Bootstrap 3 class names working after unifying on Bootstrap 4.6.2.
 * Safe to remove later when markup is fully migrated (or when moving to Bootstrap 5).
 */

/* BS3 collapse "open" class used by custom mobile nav JS */
.navbar-collapse.collapse.in {
  display: block;
}

@media (max-width: 991.98px) {
  .navbar-collapse.collapse.in {
    display: block !important;
  }
}

/* BS3 offset helpers → approximate BS4 offsets */
.col-xs-offset-1 { margin-left: 8.333333%; }
.col-sm-offset-1 { margin-left: 8.333333%; }
.col-md-offset-1 { margin-left: 8.333333%; }
.col-md-offset-2 { margin-left: 16.666667%; }
.col-sm-offset-2 { margin-left: 16.666667%; }
.col-md-offset-3 { margin-left: 25%; }

@media (max-width: 575.98px) {
  .col-xs-offset-1,
  .col-sm-offset-1,
  .col-md-offset-1,
  .col-md-offset-2,
  .col-sm-offset-2,
  .col-md-offset-3 {
    margin-left: 0;
  }
}

/* Map common Glyphicons (removed in BS4) to Font Awesome if available */
.glyphicon {
  position: relative;
  top: 1px;
  display: inline-block;
  font-family: "FontAwesome", "Font Awesome 5 Free", "Font Awesome 6 Free", sans-serif;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

.glyphicon-remove:before { content: "\f00d"; }
.glyphicon-pencil:before { content: "\f040"; }
.glyphicon-user:before { content: "\f007"; }
.glyphicon-info-sign:before { content: "\f05a"; }
.glyphicon-password:before,
.glyphicon-lock:before { content: "\f023"; }
.glyphicon-ok:before { content: "\f00c"; }
.glyphicon-plus:before { content: "\f067"; }
.glyphicon-minus:before { content: "\f068"; }
.glyphicon-chevron-right:before { content: "\f054"; }
.glyphicon-chevron-left:before { content: "\f053"; }

/* BS3 horizontal form labels still readable under BS4 */
.form-horizontal .control-label {
  padding-top: calc(0.375rem + 1px);
  margin-bottom: 0;
  text-align: right;
}

@media (max-width: 767.98px) {
  .form-horizontal .control-label {
    text-align: left;
  }
}
