
/*!
 * Bootstrap 4 → 5 Legacy Compatibility Layer
 * Drop this AFTER bootstrap@5.x CSS.
 * Scope: minimal aliases for common removed/renamed v4 classes.
 * Note: Prefer migrating templates to v5 natively. This is a stopgap.
 */

/* ---------------------------------------------
   Floats & text align (v4 → v5 start/end)
----------------------------------------------*/
.float-left  { float: left  !important; }
.float-right { float: right !important; }
.float-none  { float: none  !important; }

.text-left  { text-align: left  !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !important; }

/* ---------------------------------------------
   Buttons
----------------------------------------------*/
/* v4 .btn-block was removed → use .w-100; keep alias */
.btn-block { display: block; width: 100% !important; }
/* v4 .btn-default existed in some themes; map softly to secondary */
.btn-default { @apply btn btn-secondary; } /* will be ignored if Tailwind not present */

/* ---------------------------------------------
   Badges
----------------------------------------------*/
.badge-pill { border-radius: 10rem !important; padding-right: .6em; padding-left: .6em; }

/* ---------------------------------------------
   Forms
----------------------------------------------*/
/* v4 .form-group removed; keep spacing */
.form-group { margin-bottom: 1rem; }
/* v4 .form-row removed; closest is a tighter .row */
.form-row { display: flex; flex-wrap: wrap; margin-right: -.5rem; margin-left: -.5rem; }
.form-row > .col, .form-row > [class*="col-"] { padding-right: .5rem; padding-left: .5rem; }

/* v4 inline forms */
.form-inline { display: flex; flex-flow: row wrap; align-items: center; }

/* v4 custom controls → v5 form-check (lightweight shim) */
.custom-control { position: relative; display: block; min-height: 1.5rem; padding-left: 1.5rem; }
.custom-control-input { position: absolute; left: 0; top: .25rem; width: 1rem; height: 1rem; margin: 0; }
.custom-control-label { margin-bottom: 0; }
.custom-checkbox .custom-control-label::before,
.custom-radio .custom-control-label::before {
  content: ""; position: absolute; top: .25rem; left: 0; width: 1rem; height: 1rem;
  border: 1px solid var(--bs-border-color, rgba(0,0,0,.25)); background-color: #fff; border-radius: .25rem;
}
.custom-radio .custom-control-label::before { border-radius: 50%; }
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--bs-primary, #0d6efd); border-color: var(--bs-primary, #0d6efd); }

/* v4 input-group prepend/append wrappers */
.input-group-prepend, .input-group-append { display: flex; }
.input-group-prepend .btn, .input-group-append .btn,
.input-group-prepend .input-group-text, .input-group-append .input-group-text { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group-prepend > .btn, .input-group-prepend > .input-group-text { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group-append > .btn, .input-group-append > .input-group-text { margin-left: -1px; }
.input-group-prepend > .btn + .btn, .input-group-append > .btn + .btn { margin-left: -1px; }

/* labels */
.col-form-label { padding-top: calc(.375rem + var(--bs-border-width,1px)); padding-bottom: calc(.375rem + var(--bs-border-width,1px)); margin-bottom: 0; }

/* Help text */
.form-text { display: block; margin-top: .25rem; }

/* ---------------------------------------------
   Accessibility helpers
----------------------------------------------*/
/* v4 .sr-only → v5 .visually-hidden */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sr-only-focusable:active, .sr-only-focusable:focus {
  position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal;
}

/* ---------------------------------------------
   Media object
----------------------------------------------*/
.media { display: flex; align-items: flex-start; }
.media-body { flex: 1; }

/* ---------------------------------------------
   Cards layout helpers removed in v5
----------------------------------------------*/
/* .card-deck: simple responsive flex wrap */
.card-deck { display: flex; flex-direction: row; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; }
.card-deck .card { flex: 1 0 0%; margin: 0 15px 30px; }
/* .card-columns → masonry-like with CSS columns */
.card-columns { column-count: 3; column-gap: 1.25rem; }
@media (max-width: 991.98px) { .card-columns { column-count: 2; } }
@media (max-width: 575.98px) { .card-columns { column-count: 1; } }
.card-columns .card { display: inline-block; width: 100%; }

/* ---------------------------------------------
   Embeds (v4 .embed-responsive → v5 .ratio)
----------------------------------------------*/
.embed-responsive { position: relative; display: block; width: 100%; }
.embed-responsive::before { display: block; content: ""; }
.embed-responsive .embed-responsive-item,
.embed-responsive iframe, .embed-responsive embed, .embed-responsive object, .embed-responsive video {
  position: absolute; top: 0; bottom: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.embed-responsive-21by9::before { padding-top: 42.8571%; }
.embed-responsive-16by9::before { padding-top: 56.25%; }
.embed-responsive-4by3::before  { padding-top: 75%; }
.embed-responsive-1by1::before  { padding-top: 100%; }

/* ---------------------------------------------
   Display utilities (no change, ensure presence)
----------------------------------------------*/
.d-inline       { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block        { display: block !important; }
.d-table        { display: table !important; }
.d-table-row    { display: table-row !important; }
.d-table-cell   { display: table-cell !important; }
.d-flex         { display: flex !important; }
.d-inline-flex  { display: inline-flex !important; }

/* ---------------------------------------------
   Spacing RTL aliases (optional)
   v4 used ml-/mr-; v5 prefers ms-/me-. Keep popular v4 aliases.
----------------------------------------------*/
[class*="ml-"] { }
[class*="mr-"] { }
/* Minimal common steps */
.ml-0 { margin-left: 0 !important; } .mr-0 { margin-right: 0 !important; }
.ml-1 { margin-left: .25rem !important; } .mr-1 { margin-right: .25rem !important; }
.ml-2 { margin-left: .5rem !important; }  .mr-2 { margin-right: .5rem !important; }
.ml-3 { margin-left: 1rem !important; }   .mr-3 { margin-right: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; } .mr-4 { margin-right: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; }   .mr-5 { margin-right: 3rem !important; }

.pl-0 { padding-left: 0 !important; } .pr-0 { padding-right: 0 !important; }
.pl-1 { padding-left: .25rem !important; } .pr-1 { padding-right: .25rem !important; }
.pl-2 { padding-left: .5rem !important; }  .pr-2 { padding-right: .5rem !important; }
.pl-3 { padding-left: 1rem !important; }   .pr-3 { padding-right: 1rem !important; }
.pl-4 { padding-left: 1.5rem !important; } .pr-4 { padding-right: 1.5rem !important; }
.pl-5 { padding-left: 3rem !important; }   .pr-5 { padding-right: 3rem !important; }

/* .no-gutters → .g-0 */
.no-gutters { --bs-gutter-x: 0; --bs-gutter-y: 0; margin-right: 0; margin-left: 0; }
.no-gutters > .col, .no-gutters > [class*="col-"] { padding-right: 0; padding-left: 0; }

/* ---------------------------------------------
   Utilities kept for convenience
----------------------------------------------*/
.rounded-lg { border-radius: .3rem !important; } /* v4 alias */
.font-weight-light { font-weight: 300 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-bold { font-weight: 700 !important; }
.text-monospace { font-family: var(--bs-font-monospace) !important; }

/* ---------------------------------------------
   Alerts: .alert-link still works; keep safe tweaks
----------------------------------------------*/
.alert-heading { font-size: 1.5rem; margin-bottom: .5rem; }

/* ---------------------------------------------
   Navbar minor aliases
----------------------------------------------*/
.navbar-toggleable-md, .navbar-toggleable-sm, .navbar-toggleable-xs { /* ancient v3/v4-alpha */ }
.navbar-toggler-icon { background-size: 1.5em 1.5em; }



/* v5 Reboot.scss */
a {
   text-decoration: none;
}